Instructions to use Vargol/lcm_sdxl_full_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Vargol/lcm_sdxl_full_model with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Vargol/lcm_sdxl_full_model", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
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
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')
- Downloads last month
- 4