Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Just a minute please, Can I use another model in Pipeline?
#18170
by
DamarJati
- opened
So far I can only use the model from "CompVis/stable-diffusion-v1-4", can I use a different source, for example from "civitai" where the model is only 1 .safetensor file.
So I want to use civitai model in this pipeline
!pip install diffusers==0.11.1
!pip install transformers scipy ftfy accelerate
import torch
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "girl, beach,short hair,"
image = pipe(prompt).images[0]
image.save(f"astronaut_rides_horse.png")
image
DamarJati
changed discussion title from
Can I use other models in Pipeline?
to Just a minute please, Can I use another model in Pipeline?