【ChatGLM-6B+StableDiffusion+网络搜索】本地部署可绘图
(已解决)遇到的问题:RuntimeError: CUDA Error: no kernel image is available for execution on the
原因:ChatGlm在使用量化(节省显存技术)时会在较老的架构上出错
解决方法:
在api.py中第57行
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).quantize(4).half().cuda()
更改为
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
也就是将.quantize(4)删去
!!!!
注意,对显存要求高,占用约12g显存
感谢UP主耐心解答

