Replies: 1 comment
-
Hi @justin4ai. Could you try this: with torch.no_grad():
for key, value in li.items():
if <some condition>:
denoising_unet.state_dict()[key].copy_(value) You can examine the network structure just by typing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm quite new to diffusers package and trying to implement fine-tuning code that uses the saved checkpoints initialized with
UNet2/3DConditionModel.from_pretrained
method as shown below:The checkpoint I try to load is saved from the previous training of
UNet2/3DConditionModel objects
withstate_dict = model.state_dict()
andtorch.save(state_dict, save_path)
. But I have no Idea about how to directly assign certain values to specific layers in those class objects.If you help me out with this, I will be so much glad! Looking forward to your help. Also please let me know if my description of the situation is not enough for you to help me out.
Cheers,
Junstin
Beta Was this translation helpful? Give feedback.
All reactions