LoRA based on Stability AI SDXL-Turbo, for more information on the main model: https://huggingface.co/stabilityai/sdxl-turbo xyz_grid-0015-2494203713-20231201144837.png

Diffusers

pip install diffusers transformers accelerate --upgrade
  • Text-to-image:
import torch
from diffusers import LCMScheduler, AutoPipelineForText2Image

model_id = "stabilityai/stable-diffusion-xl-base-1.0"
adapter_id = "shiroppo/sd_xl_turbo_lora"

pipe = AutoPipelineForText2Image.from_pretrained(model_id, torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
pipe.to("cuda")

pipe.load_lora_weights(adapter_id)
pipe.fuse_lora()

prompt = "the_prompt"

image = pipe(prompt=prompt, num_inference_steps=4, guidance_scale=0).images[0]
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Unable to determine this model's library. Check the docs .

Collection including shiroppo/sd_xl_turbo_lora