latent_diffusion not found
#1
by
milyiyo
- opened
Hi :)
I was trying to recreate the example in the modelcard of this model in a Colab, but I am getting the following error:
OSError: file /root/.cache/huggingface/hub/models--fusing--latent-diffusion-text2im-large/snapshots/d5eab56148ae55791834277fe9ee6d095066f607/latent_diffusion not found
I am using these dependencies:
I already solved it doing this:
!pip install git+https://github.com/patil-suraj/transformers@ldm-bert
!git clone https://github.com/huggingface/diffusers
!cd diffusers && pip install -e .
!pip install git+file:///content/diffusers
!pip install torch
After that, this worked well:
from diffusers import DiffusionPipeline
import torch
pipeline = DiffusionPipeline.from_pretrained("fusing/latent-diffusion-text2im-large")
generator = torch.manual_seed(42)
prompt = "A painting of a squirrel eating a burger"
image = pipeline([prompt], generator=generator, eta=0.3, guidance_scale=6.0, num_inference_steps=50)