haofanwang / T2I-Adapter-for-Diffusers

Transfer the T2I-Adapter with any basemodel in diffusers🔥
MIT License
131 stars 8 forks source link

加载pth文件报错 #2

Open yanchaoguo opened 1 year ago

yanchaoguo commented 1 year ago

你好 使用下面方式读取权重时报错 adapter = T2IAdapter.from_config("../diffusers-t2i-adapter/models/config.json") adapter.load_state_dict(torch.load("../diffusers-t2i-adapter/models/t2iadapter_style_sd14v1.pth"))

RuntimeError: Error(s) in loading state_dict for T2IAdapter: Missing key(s) in state_dict: "body.0.block1.weight", "body.0.block1.bias", "body.0.block2.weight", "body.0.block2.bias", "body.1.block1.weight", "body.1.block1.bias", "body.1.block2.weight", "body.1.block2.bias", "body.2.block1.weight", "body.2.block1.bias", "body.2.block2.weight", "body.2.block2.bias", "bod

diyiiyiii commented 1 year ago

请问你在哪里找到的stable_diffusion/pipeline_stable_diffusion_adapter.py文件呢?