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

learn_sigma must be True? #57

Open
MordehayM opened this issue Jul 14, 2024 · 1 comment
Open

learn_sigma must be True? #57

MordehayM opened this issue Jul 14, 2024 · 1 comment

Comments

@MordehayM
Copy link

According to this line:

assert model_output.shape == (B, C * 2, *x.shape[2:])

I think the lean_sigma argument must be True.
If that is true, please mention this!

Thank

@wdcww
Copy link

wdcww commented Nov 15, 2024

Hi, I think this may be related to the pre-trained model used. (I used celeba256_250000.pt)
When I change learn_sigma in .yml from True to False, it will prompt:

RuntimeError: Error(s) in loading state_dict for UNetModel:
	size mismatch for out.2.weight: copying a param with shape torch.Size([6, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([3, 256, 3, 3]).
	size mismatch for out.2.bias: copying a param with shape torch.Size([6]) from checkpoint, the shape in current model is torch.Size([3]).

And I noticed that in the create_model function in ./guided_diffusion/script_util.py, where the value is
returned , It is as follows:

return UNetModel(
        image_size=image_size,
        in_channels=3,
        model_channels=num_channels,
        out_channels=(3 if not learn_sigma else 6),  ## here!
        num_res_blocks=num_res_blocks,
        ... ...

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