Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import numpy as np
|
|
| 3 |
from optimum.intel import OVStableDiffusionPipeline, OVStableDiffusionXLPipeline, OVLatentConsistencyModelPipeline
|
| 4 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
| 5 |
from diffusers import DiffusionPipeline
|
| 6 |
-
|
| 7 |
|
| 8 |
#model_id = "echarlaix/sdxl-turbo-openvino-int8"
|
| 9 |
#model_id = "echarlaix/LCM_Dreamshaper_v7-openvino"
|
|
@@ -17,6 +17,11 @@ pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, compile=Fa
|
|
| 17 |
|
| 18 |
batch_size, num_images, height, width = 1, 1, 1024, 512
|
| 19 |
pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
#badhandv4
|
| 21 |
#pipeline.load_textual_inversion("./badhandv4.pt", "badhandv4")
|
| 22 |
#hiten1
|
|
|
|
| 3 |
from optimum.intel import OVStableDiffusionPipeline, OVStableDiffusionXLPipeline, OVLatentConsistencyModelPipeline
|
| 4 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
| 5 |
from diffusers import DiffusionPipeline
|
| 6 |
+
from diffusers.schedulers import EulerDiscreteScheduler
|
| 7 |
|
| 8 |
#model_id = "echarlaix/sdxl-turbo-openvino-int8"
|
| 9 |
#model_id = "echarlaix/LCM_Dreamshaper_v7-openvino"
|
|
|
|
| 17 |
|
| 18 |
batch_size, num_images, height, width = 1, 1, 1024, 512
|
| 19 |
pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)
|
| 20 |
+
|
| 21 |
+
# 选择采样方法(调度器)
|
| 22 |
+
scheduler = EulerDiscreteScheduler()
|
| 23 |
+
pipeline.scheduler = scheduler
|
| 24 |
+
|
| 25 |
#badhandv4
|
| 26 |
#pipeline.load_textual_inversion("./badhandv4.pt", "badhandv4")
|
| 27 |
#hiten1
|