File size: 788 Bytes
9b8fb3a 6b6aa5c 9b8fb3a afea186 6b6aa5c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
---
license: openrail++
tags:
- text-to-image
- stable-diffusion
---
This is a copy of the sdxl base (stabilityai/stable-diffusion-xl-base-1.0) with the unet replaced
with the LCM distilled unet (latent-consistency/lcm-sdxl) and scheduler config set to default to the LCM Scheduler.
This makes LCM SDXL run as a standard Diffusion Pipeline
```py
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"Vargol/lcm_sdxl_full_model", variant='fp16', torch_dtype=torch.float16
).to("mps")
prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"
generator = torch.manual_seed(0)
image = pipe(
prompt=prompt, num_inference_steps=4, generator=generator, guidance_scale=8.0
).images[0]
image.save('distilled.png')
``` |