AI-Writer icon indicating copy to clipboard operation
AI-Writer copied to clipboard

AttributeError: 'dict' object has no attribute 'state_dict'

Open codeloversky opened this issue 2 years ago • 4 comments

你好,这个模型跑起来还是挺强的,我用cpu模型可以正常使用,但是在换成gpu模式的时候出了点问题,在使用n卡模型运行时提示出错Loading model for gpu... Traceback (most recent call last): File "run.py", line 90, in m2 = torch.load(MODEL_NAME + '.pth', map_location='cpu').state_dict() AttributeError: 'dict' object has no attribute 'state_dict' 都检查了一遍,模型没问题,网上查找了很多相关的问题,都没能解决,能否请教一下怎么解决掉?非常感谢!!

codeloversky avatar Jan 25 '23 05:01 codeloversky

同样的问题

rootdgy avatar Jan 25 '23 10:01 rootdgy

huggingface的模型用ChatRWKV运行。AI-writer的模型用这个:https://github.com/BlinkDL/AI-Writer/releases/tag/v2022-02-15

BlinkDL avatar Jan 25 '23 17:01 BlinkDL

大佬,我应该是用错模型了,我是直接在你的huggingface上面找的模型,现在用N卡模型可以了,谢谢

codeloversky avatar Jan 27 '23 04:01 codeloversky

6GB的

chilldenpa avatar Feb 10 '23 04:02 chilldenpa