Downloads · 30 days
0
shiroppo/sd_xl_turbo_lora
sd_xl_turbo_lora is a text-to-image model from shiroppo. Use it when you need an image from a text prompt. The card lists the license as creativeml-openrail-m.
LoRA based on Stability AI SDXL-Turbo, for more information on the main model: https://huggingface.co/stabilityai/sdxl-turbo
Downloads · 30 days
0
Access
Public
Updated Dec 30, 2023
Repo size
1.3 GB
Likes
21
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
LoRA based on Stability AI SDXL-Turbo, for more information on the main model: https://huggingface.co/stabilityai/sdxl-turbo

pip install diffusers transformers accelerate --upgrade
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]