Spaces:
Running
Running
enable openvino
Browse files
frontend/webui/hf_demo.py
CHANGED
@@ -37,8 +37,8 @@ def predict(
|
|
37 |
):
|
38 |
lcm_text_to_image.init(
|
39 |
model_id=LCM_DEFAULT_MODEL_OPENVINO,
|
40 |
-
use_openvino=
|
41 |
-
use_lora=
|
42 |
lcm_lora=lcm_lora,
|
43 |
)
|
44 |
|
@@ -48,8 +48,8 @@ def predict(
|
|
48 |
lcm_diffusion_setting.inference_steps = steps
|
49 |
lcm_diffusion_setting.seed = seed
|
50 |
lcm_diffusion_setting.use_seed = True
|
51 |
-
lcm_diffusion_setting.image_width =
|
52 |
-
lcm_diffusion_setting.image_height =
|
53 |
lcm_diffusion_setting.use_openvino = True if is_openvino_device() else False
|
54 |
start = perf_counter()
|
55 |
images = lcm_text_to_image.generate(lcm_diffusion_setting)
|
|
|
37 |
):
|
38 |
lcm_text_to_image.init(
|
39 |
model_id=LCM_DEFAULT_MODEL_OPENVINO,
|
40 |
+
use_openvino=True,
|
41 |
+
use_lora=False,
|
42 |
lcm_lora=lcm_lora,
|
43 |
)
|
44 |
|
|
|
48 |
lcm_diffusion_setting.inference_steps = steps
|
49 |
lcm_diffusion_setting.seed = seed
|
50 |
lcm_diffusion_setting.use_seed = True
|
51 |
+
lcm_diffusion_setting.image_width = 448 if is_openvino_device() else 512
|
52 |
+
lcm_diffusion_setting.image_height = 448 if is_openvino_device() else 512
|
53 |
lcm_diffusion_setting.use_openvino = True if is_openvino_device() else False
|
54 |
start = perf_counter()
|
55 |
images = lcm_text_to_image.generate(lcm_diffusion_setting)
|