Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

权重与模型不匹配 #23

Open
cementwise opened this issue Dec 4, 2024 · 1 comment
Open

权重与模型不匹配 #23

cementwise opened this issue Dec 4, 2024 · 1 comment

Comments

@cementwise
Copy link

作者您好,
unet_config:
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
params:
image_size: 32
in_channels: 8 # doubled for concat-mode
但是lusn模型的输入似乎只有4
size mismatch for model.diffusion_model.input_blocks.0.0.weight: copying a param with shape torch.Size([192, 4, 3, 3]) from checkpoint, the shape in current model is torch.Size([192, 8, 3, 3]).
size mismatch for model_ema.diffusion_modelinput_blocks00weight: copying a param with shape torch.Size([192, 4, 3, 3]) from checkpoint, the shape in current model is torch.Size([192, 8, 3, 3]).

@lin-tianyu
Copy link
Owner

lin-tianyu commented Dec 4, 2024

哈喽,请提供详细信息哦,具体是哪个配置文件,以及你运行的命令,等等

以及这是否是报错?还是只是红色/绿色的输出,然后代码正常运行?如果正常运行的话是没问题的,因为预训练参数是crossattn版本,而SDSeg修改成了concat模式,所以输入层参数不匹配。对于这个问题,SDSeg将多出来的参数使用0来初始化。这是一个在文章里面没有提到的点。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants