Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,15 @@ model_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
|
8 |
pipe = DiffusionPipeline.from_pretrained(model_id)
|
9 |
|
10 |
# Setting the scheduler
|
11 |
-
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
12 |
|
13 |
# Loading LoRA weights
|
14 |
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")
|
15 |
|
16 |
-
#
|
17 |
pipeline = OVStableDiffusionXLPipeline.from_pretrained(
|
18 |
-
|
19 |
-
export=True
|
20 |
)
|
21 |
|
22 |
def generate_images(prompt, batch_size, num_inference_steps, guidance_scale):
|
|
|
8 |
pipe = DiffusionPipeline.from_pretrained(model_id)
|
9 |
|
10 |
# Setting the scheduler
|
11 |
+
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
12 |
|
13 |
# Loading LoRA weights
|
14 |
pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")
|
15 |
|
16 |
+
# Convert the model to OpenVINO format
|
17 |
pipeline = OVStableDiffusionXLPipeline.from_pretrained(
|
18 |
+
model_id,
|
19 |
+
export=True
|
20 |
)
|
21 |
|
22 |
def generate_images(prompt, batch_size, num_inference_steps, guidance_scale):
|