Model currently broken
#1
by
marshalljiang
- opened
As of 2/6/24 with diffusers version 0.26.2, using the code in the documentation, an error is raised running on Google Colab and personal installtion.
from diffusers import DiffusionPipeline
import PIL.Image
import numpy as np
model_id = "fusing/ddim-lsun-church"
# load model and scheduler
ddpm = DiffusionPipeline.from_pretrained(model_id)
# run pipeline in inference (sample random noise and denoise)
image = ddpm(eta=0.0, num_inference_steps=50)
# process image to PIL
image_processed = image.cpu().permute(0, 2, 3, 1)
image_processed = (image_processed + 1.0) * 127.5
image_processed = image_processed.numpy().astype(np.uint8)
image_pil = PIL.Image.fromarray(image_processed[0])
# save image
image_pil.save("test.png")
with error
AttributeError: module diffusers has no attribute DDIM
Similarly, using the documented code on https://huggingface.co/docs/diffusers/en/api/pipelines/ddim
from diffusers import DDIMPipeline
import PIL.Image
import numpy as np
# load model and scheduler
pipe = DDIMPipeline.from_pretrained("fusing/ddim-lsun-bedroom")
# run pipeline in inference (sample random noise and denoise)
image = pipe(eta=0.0, num_inference_steps=50)
# process image to PIL
image_processed = image.cpu().permute(0, 2, 3, 1)
image_processed = (image_processed + 1.0) * 127.5
image_processed = image_processed.numpy().astype(np.uint8)
image_pil = PIL.Image.fromarray(image_processed[0])
# save image
image_pil.save("test.png")
results in
AttributeError: module diffusers has no attribute UNetModel
Any help is appreciated.