Update frontend/webui/image_to_image_ui.py
Browse files
frontend/webui/image_to_image_ui.py
CHANGED
@@ -31,17 +31,16 @@ def generate_image_to_image(
|
|
31 |
print("新图",newH,newW)
|
32 |
app_settings.settings.lcm_diffusion_setting.prompt = prompt
|
33 |
app_settings.settings.lcm_diffusion_setting.negative_prompt = negative_prompt
|
34 |
-
app_settings.settings.lcm_diffusion_setting.init_image =
|
35 |
app_settings.settings.lcm_diffusion_setting.strength = strength
|
36 |
-
|
37 |
-
app_settings.settings.lcm_diffusion_setting.image_height=newH
|
38 |
app_settings.settings.lcm_diffusion_setting.diffusion_task = (
|
39 |
DiffusionTask.image_to_image.value
|
40 |
)
|
41 |
model_id = app_settings.settings.lcm_diffusion_setting.openvino_lcm_model_id
|
42 |
reshape = False
|
43 |
-
image_width =
|
44 |
-
image_height =
|
45 |
num_images = app_settings.settings.lcm_diffusion_setting.number_of_images
|
46 |
if app_settings.settings.lcm_diffusion_setting.use_openvino:
|
47 |
reshape = is_reshape_required(
|
@@ -55,6 +54,7 @@ def generate_image_to_image(
|
|
55 |
num_images,
|
56 |
)
|
57 |
|
|
|
58 |
with ThreadPoolExecutor(max_workers=1) as executor:
|
59 |
future = executor.submit(
|
60 |
context.generate_text_to_image,
|
|
|
31 |
print("新图",newH,newW)
|
32 |
app_settings.settings.lcm_diffusion_setting.prompt = prompt
|
33 |
app_settings.settings.lcm_diffusion_setting.negative_prompt = negative_prompt
|
34 |
+
app_settings.settings.lcm_diffusion_setting.init_image = init_image
|
35 |
app_settings.settings.lcm_diffusion_setting.strength = strength
|
36 |
+
|
|
|
37 |
app_settings.settings.lcm_diffusion_setting.diffusion_task = (
|
38 |
DiffusionTask.image_to_image.value
|
39 |
)
|
40 |
model_id = app_settings.settings.lcm_diffusion_setting.openvino_lcm_model_id
|
41 |
reshape = False
|
42 |
+
image_width = app_settings.settings.lcm_diffusion_setting.image_width
|
43 |
+
image_height = app_settings.settings.lcm_diffusion_setting.image_height
|
44 |
num_images = app_settings.settings.lcm_diffusion_setting.number_of_images
|
45 |
if app_settings.settings.lcm_diffusion_setting.use_openvino:
|
46 |
reshape = is_reshape_required(
|
|
|
54 |
num_images,
|
55 |
)
|
56 |
|
57 |
+
|
58 |
with ThreadPoolExecutor(max_workers=1) as executor:
|
59 |
future = executor.submit(
|
60 |
context.generate_text_to_image,
|