[ValueError]DeciDiffusion has been incorrectly initialized
#6
by
ritwikraha
- opened
Anyone facing an error while trying to run the code in the documentation?
Colab: https://colab.research.google.com/drive/1ufSrcd9JqSE1zt6hBTHLIrrun5nBZlHo?usp=sharing
# pip install diffusers transformers torch
from diffusers import StableDiffusionPipeline
import torch
device = 'cuda' if torch.cuda.is_available() else 'cpu'
checkpoint = "Deci/DeciDiffusion-v1-0"
pipeline = StableDiffusionPipeline.from_pretrained(checkpoint, custom_pipeline=checkpoint, torch_dtype=torch.float16)
pipeline.unet = pipeline.unet.from_pretrained(checkpoint, subfolder='flexible_unet', torch_dtype=torch.float16)
pipeline = pipeline.to(device)
img = pipeline(prompt=['A photo of an astronaut riding a horse on Mars']).images[0]