Spaces:
Sleeping
Sleeping
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 |