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

inpaint.sd won't work out of the box. #20

Open
Pirog17000 opened this issue Aug 23, 2022 · 2 comments
Open

inpaint.sd won't work out of the box. #20

Pirog17000 opened this issue Aug 23, 2022 · 2 comments

Comments

@Pirog17000
Copy link

Pirog17000 commented Aug 23, 2022

instructions are pretty clear, yet it doesn't work out of the box

  1. inpaint_sd.py been placed in root project folder to catch the subfolders and structure
  2. inpaint_sd.py, string 109, default="models/ldm/inpainting_big/last.ckpt",
  3. inpaint_sd.py, string 122, config="configs/stable-diffusion/inpainting/v1-finetune-for-inpainting-laion-iaesthe.yaml"
  4. stable-diffusion\configs\stable-diffusion\inpainting, v1-finetune-for-inpainting-laion-iaesthe.yaml: string 18 changed to ckpt_path: "models/ldm/inpainting_big/last.ckpt

so looks like everything is hooked right now, yet, when I run the script with:
python inpaint_sd.py --indir data/inpainting_examples/ --outdir outputs/inpainting_results

it gives out me these errors:
\stable-diffusion\inpaint_sd.py", line 124, in <module> model = instantiate_from_config(config.model)
\stable-diffusion\ldm\util.py", line 79, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict()))
\stable-diffusion\ldm\models\diffusion\ddpm.py", line 1627, in __init__ self.init_from_ckpt(ckpt_path, ignore_keys)
\stable-diffusion\ldm\models\diffusion\ddpm.py", line 1648, in init_from_ckpt new_entry[:, :self.keep_dims, ...] = sd[k]

RuntimeError: The expanded size of the tensor (4) must match the existing size (7) at non-singleton dimension 1. Target sizes: [320, 4, 3, 3]. Tensor sizes: [256, 7, 3, 3]

So, what I can do to fix the issue? why it even happening? 🤔

@pandoras-rabbithole
Copy link

same issue here

@abhay-agarwal
Copy link

Where are you getting the checkpointed model?

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

3 participants