Spaces:
Sleeping
Sleeping
File size: 375 Bytes
2ec2ebd |
1 2 3 4 5 6 7 8 |
from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
pipeline = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)
def get_images(prompt, skip_layers=0):
images = pipeline(prompt, skip_layers=skip_layers, num_images_per_prompt=1)
return images |