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

Convert model weights from InstructDiffusion failed #39

Open
liming-ai opened this issue Oct 20, 2024 · 0 comments
Open

Convert model weights from InstructDiffusion failed #39

liming-ai opened this issue Oct 20, 2024 · 0 comments

Comments

@liming-ai
Copy link

Hi @yuzhou914 @yxgeee ,

Thanks a lot for your work, I tried to reproduce the training progress but always failed when I tried to convert the InstructDiffusion weights to diffusers as the instruction in the README:

/home/code/SmartEdit/convert_from_ckpt.py:57: FutureWarning: Importing `DiffusionPipeline` or `ImagePipelineOutput` from diffusers.pipeline_utils is deprecated. Please import from diffusers.pipelines.pipeline_utils instead.
  from diffusers.pipeline_utils import DiffusionPipeline
Traceback (most recent call last):
  File "/home/liming/code/SmartEdit/convert_original_stable_diffusion_to_diffusers.py", line 157, in <module>
    pipe = download_from_original_stable_diffusion_ckpt(
  File "/home/liming/code/SmartEdit/convert_from_ckpt.py", line 1401, in download_from_original_stable_diffusion_ckpt
    set_module_tensor_to_device(unet, param_name, "cpu", value=param)
  File "/home/tiger/miniconda3/envs/smartedit/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 286, in set_module_tensor_to_device
    raise ValueError(
ValueError: Trying to set a tensor of shape torch.Size([320, 4, 3, 3]) in "weight" (which has shape torch.Size([320, 8, 3, 3])), this looks incorrect.

Could you please check this procedure and give me some instructions? Thanks again.

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

1 participant