Thanks. I have tried that but I don’t know why, even though I have changed nothing and loading the same model, I get size mismatch error on every layer:
RuntimeError: Error(s) in loading state_dict for UNet:
	size mismatch for conv_final.weight: copying a param with shape torch.Size([1, 8, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 64, 1, 1]).
.
.
.

I don’t know how the number of channels went to 8 from 64.
That’s why I was trying to load the whole model and edit it from there.
For reference, this is the model definition 1 and these are the weights 1