stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

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

Open Pirog17000 opened this issue 2 years ago • 2 comments

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? 🤔

Pirog17000 avatar Aug 23 '22 19:08 Pirog17000

same issue here

pandoras-rabbithole avatar Aug 31 '22 13:08 pandoras-rabbithole

Where are you getting the checkpointed model?

abhay-agarwal avatar Sep 13 '22 17:09 abhay-agarwal