mkshing / ziplora-pytorch

Implementation of "ZipLoRA: Any Subject in Any Style by Effectively Merging LoRAs"
MIT License
481 stars 33 forks source link

Breaks with img2img pipeline #19

Open imiraoui opened 7 months ago

imiraoui commented 7 months ago

I believe it breaks the prepare_latents for the img2img pipeline unfortunately:

`~/.local/lib/python3.8/site-packages/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py in prepare_latents(self, image, timestep, batch_size, num_images_per_prompt, dtype, device, generator, add_noise) 859 noise = randn_tensor(shape, generator=generator, device=device, dtype=dtype) 860 # get latents --> 861 init_latents = self.scheduler.add_noise(init_latents, noise, timestep) 862 863 latents = init_latents

~/.local/lib/python3.8/site-packages/diffusers/schedulers/scheduling_euler_discrete.py in add_noise(self, original_samples, noise, timesteps) 474 ) -> torch.FloatTensor: 475 # Make sure sigmas and timesteps have the same device and dtype as original_samples --> 476 sigmas = self.sigmas.to(device=original_samples.device, dtype=original_samples.dtype) 477 if original_samples.device.type == "mps" and torch.is_floating_point(timesteps): 478 # mps does not support float64

AttributeError: 'list' object has no attribute 'to'`