clementchadebec
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -111,7 +111,7 @@ from PIL import Image
|
|
111 |
from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel, LCMScheduler
|
112 |
from diffusers.utils import load_image, make_image_grid
|
113 |
|
114 |
-
|
115 |
|
116 |
image = load_image(
|
117 |
"https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png"
|
@@ -141,10 +141,9 @@ pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
141 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
142 |
|
143 |
# Load LoRA
|
144 |
-
pipe.load_lora_weights(
|
145 |
pipe.fuse_lora()
|
146 |
|
147 |
-
generator = torch.manual_seed(0)
|
148 |
image = pipe(
|
149 |
"picture of the mona lisa",
|
150 |
image=canny_image,
|
@@ -152,7 +151,6 @@ image = pipe(
|
|
152 |
guidance_scale=0,
|
153 |
controlnet_conditioning_scale=0.5,
|
154 |
cross_attention_kwargs={"scale": 1},
|
155 |
-
generator=generator,
|
156 |
).images[0]
|
157 |
make_image_grid([canny_image, image], rows=1, cols=2)
|
158 |
```
|
|
|
111 |
from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel, LCMScheduler
|
112 |
from diffusers.utils import load_image, make_image_grid
|
113 |
|
114 |
+
flash_lora_id = "jasperai/flash-sdxl"
|
115 |
|
116 |
image = load_image(
|
117 |
"https://hf.co/datasets/huggingface/documentation-images/resolve/main/diffusers/input_image_vermeer.png"
|
|
|
141 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
142 |
|
143 |
# Load LoRA
|
144 |
+
pipe.load_lora_weights(flash_lora_id)
|
145 |
pipe.fuse_lora()
|
146 |
|
|
|
147 |
image = pipe(
|
148 |
"picture of the mona lisa",
|
149 |
image=canny_image,
|
|
|
151 |
guidance_scale=0,
|
152 |
controlnet_conditioning_scale=0.5,
|
153 |
cross_attention_kwargs={"scale": 1},
|
|
|
154 |
).images[0]
|
155 |
make_image_grid([canny_image, image], rows=1, cols=2)
|
156 |
```
|