|
--- |
|
license: creativeml-openrail-m |
|
--- |
|
LoRA based on Stability AI SDXL-Turbo, for more information on the main checkpoints: https://huggingface.co/stabilityai/sdxl-turbo |
|
![xyz_grid-0007-2494203713-20231130151159.png](https://cdn-uploads.huggingface.co/production/uploads/64186a8b5d6f3d15c64cd821/L1-TOyK9XEErR0M5lwu4W.png) |
|
|
|
Text-to-image: |
|
|
|
import torch |
|
from diffusers import LCMScheduler, AutoPipelineForText2Image |
|
|
|
model_id = "stabilityai/stable-diffusion-xl-base-1.0" |
|
adapter_id = "latent-consistency/lcm-lora-sdxl" |
|
|
|
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("shiroppo/sd_xl_turbo_lora") |
|
pipe.fuse_lora() |
|
|
|
prompt = "1 girl, wind" |
|
|
|
image = pipe(prompt=prompt, num_inference_steps=4, guidance_scale=0).images[0] |