shiroppo commited on
Commit
cb4cc24
1 Parent(s): 6d8f4d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -1
README.md CHANGED
@@ -2,4 +2,23 @@
2
  license: creativeml-openrail-m
3
  ---
4
  LoRA based on Stability AI SDXL-Turbo, for more information on the main checkpoints: https://huggingface.co/stabilityai/sdxl-turbo
5
- ![xyz_grid-0007-2494203713-20231130151159.png](https://cdn-uploads.huggingface.co/production/uploads/64186a8b5d6f3d15c64cd821/L1-TOyK9XEErR0M5lwu4W.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: creativeml-openrail-m
3
  ---
4
  LoRA based on Stability AI SDXL-Turbo, for more information on the main checkpoints: https://huggingface.co/stabilityai/sdxl-turbo
5
+ ![xyz_grid-0007-2494203713-20231130151159.png](https://cdn-uploads.huggingface.co/production/uploads/64186a8b5d6f3d15c64cd821/L1-TOyK9XEErR0M5lwu4W.png)
6
+
7
+ Text-to-image:
8
+
9
+ import torch
10
+ from diffusers import LCMScheduler, AutoPipelineForText2Image
11
+
12
+ model_id = "stabilityai/stable-diffusion-xl-base-1.0"
13
+ adapter_id = "latent-consistency/lcm-lora-sdxl"
14
+
15
+ pipe = AutoPipelineForText2Image.from_pretrained(model_id, torch_dtype=torch.float16, variant="fp16")
16
+ pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
17
+ pipe.to("cuda")
18
+
19
+ pipe.load_lora_weights("shiroppo/sd_xl_turbo_lora")
20
+ pipe.fuse_lora()
21
+
22
+ prompt = "1 girl, wind"
23
+
24
+ image = pipe(prompt=prompt, num_inference_steps=4, guidance_scale=0).images[0]