-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
StableDiffusionInpaintPipeline does not work with LMSDiscreteScheduler
Reason
- This seems to be because of the absence of special operations for
LMSDiscreteScheduleras performed inStableDiffusionImg2ImgPipeline
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
Lines 206 to 212 in 429dace
| if isinstance(self.scheduler, LMSDiscreteScheduler): | |
| timesteps = torch.tensor( | |
| [num_inference_steps - init_timestep] * batch_size, dtype=torch.long, device=self.device | |
| ) | |
| else: | |
| timesteps = self.scheduler.timesteps[-init_timestep] | |
| timesteps = torch.tensor([timesteps] * batch_size, dtype=torch.long, device=self.device) |
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
Line 245 in 429dace
| timesteps = torch.tensor([timesteps] * batch_size, dtype=torch.long, device=self.device) |
Proposal:
I think it is better to unify pipelines as proposed in #551, since most processes are the same.
Reproduction
No response
Logs
"/path/to/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py", line 245, in __call__
timesteps = torch.tensor([timesteps] * batch_size, dtype=torch.long, device=self.device)
TypeError: only integer tensors of a single element can be converted to an indexSystem Info
- diffusers 429dace
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working