You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stable Diffusion v1-3 crashes with TypeError: step() got an unexpected keyword argument 'eta' #170
When attempting text-to-image synthesis, Stable Diffusion v1-3 crashes with TypeError: step() got an unexpected keyword argument 'eta'
EDIT: I didn't realize someone started a thread about this same bug in the Community tab of the model's HuggingFace page, though there's no discussion there yet. Sorry if this shouldn't have been opened, please let me know if I should close this, thanks.
Reproduction
!pip install git+https://github.com/huggingface/diffusers.git
!pip install transformers
import torch
from diffusers import LDMTextToImagePipeline
access_token = # insert access token here
pipe = LDMTextToImagePipeline.from_pretrained("CompVis/stable-diffusion-v1-3-diffusers", use_auth_token=access_token)
prompt = "19th Century wooden engraving of Elon musk" # or any other prompt
seed = torch.manual_seed(1024)
images = pipe([prompt], num_inference_steps=50, guidance_scale=7.5, generator=seed)["sample"]
# save images
for idx, image in enumerate(images):
image.save(f"image-{idx}.png")
Logs
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-a43d8871a546>in<module>()
7
8 seed = torch.manual_seed(1024)
----> 9 images = pipe([prompt], num_inference_steps=50, guidance_scale=7.5, generator=seed)["sample"]
10
11 # save images
1 frames
/usr/local/lib/python3.7/dist-packages/torch/autograd/grad_mode.py in decorate_context(*args, **kwargs)
25 def decorate_context(*args, **kwargs):
26 with self.clone():
---> 27 return func(*args, **kwargs)
28 return cast(F, decorate_context)
29
/usr/local/lib/python3.7/dist-packages/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py in __call__(self, prompt, batch_size, generator, torch_device, eta, guidance_scale, num_inference_steps, output_type)
87
88 # compute the previous noisy sample x_t -> x_t-1
---> 89 latents = self.scheduler.step(noise_pred, t, latents, **extra_kwrags)["prev_sample"]
90
91 # scale and decode the image latents with vae
TypeError: step() got an unexpected keyword argument 'eta'
I meet the same problem when running the following code given by the official repo of DDIM
fromdiffusersimportDDIMPipelinemodel_id="google/ddpm-cifar10-32"# load model and schedulerddim=DDIMPipeline.from_pretrained(model_id)
# run pipeline in inference (sample random noise and denoise)image=ddim(num_inference_steps=50).images[0]
# save imageimage.save("ddim_generated_image.png")
Activity
patil-suraj commentedon Aug 13, 2022
Thanks for reporting, updating
mainshould fix this this.pip install -U git+https://github.com/huggingface/diffusers.gitwyf0912 commentedon Dec 13, 2022
I meet the same problem when running the following code given by the official repo of DDIM
patrickvonplaten commentedon Dec 16, 2022
@wyf0912 could you please try upgraded your diffusers version:
pip install --upgrade diffusersand try again?Fix deeplab&mobilebert tflite test bug (huggingface#170)