Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -124,8 +124,8 @@ def infer(
|
|
124 |
|
125 |
# print('ip_adapter_mode.value = ', ip_adapter_mode.value)
|
126 |
# print('control_mode.value = ', control_mode.value)
|
127 |
-
print('ip_adapter_mode
|
128 |
-
print('control_mode
|
129 |
|
130 |
# Генерация изображений с Ip_Adapter ------------------------------------------------------------------------------------------------------------------
|
131 |
if use_ip_adapter: #and ip_source_image is not None and ip_adapter_image is not None:
|
@@ -151,9 +151,10 @@ def infer(
|
|
151 |
|
152 |
# #ip_adapter_mode = "pose_estimation" # Режим работы Ip_Adapter
|
153 |
|
154 |
-
if ip_adapter_mode.value == "pose_estimation":
|
|
|
155 |
|
156 |
-
print('ip_adapter_mode
|
157 |
|
158 |
# Инициализация ControlNet
|
159 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-openpose", torch_dtype=torch_dtype)
|
@@ -240,9 +241,10 @@ def infer(
|
|
240 |
|
241 |
# #ip_adapter_mode = "edge_detection" # Режим работы Ip_Adapter
|
242 |
|
243 |
-
if ip_adapter_mode.value == "edge_detection":
|
|
|
244 |
|
245 |
-
print('ip_adapter_mode
|
246 |
|
247 |
# Инициализация ControlNet
|
248 |
controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
|
@@ -346,9 +348,10 @@ def infer(
|
|
346 |
|
347 |
# #ip_adapter_mode = "depth_map" # Режим работы Ip_Adapter
|
348 |
|
349 |
-
if ip_adapter_mode.value == "depth_map":
|
|
|
350 |
|
351 |
-
print('ip_adapter_mode
|
352 |
|
353 |
|
354 |
# Инициализация ControlNet
|
|
|
124 |
|
125 |
# print('ip_adapter_mode.value = ', ip_adapter_mode.value)
|
126 |
# print('control_mode.value = ', control_mode.value)
|
127 |
+
print('ip_adapter_mode = ', ip_adapter_mode)
|
128 |
+
print('control_mode = ', control_mode)
|
129 |
|
130 |
# Генерация изображений с Ip_Adapter ------------------------------------------------------------------------------------------------------------------
|
131 |
if use_ip_adapter: #and ip_source_image is not None and ip_adapter_image is not None:
|
|
|
151 |
|
152 |
# #ip_adapter_mode = "pose_estimation" # Режим работы Ip_Adapter
|
153 |
|
154 |
+
#if ip_adapter_mode.value == "pose_estimation":
|
155 |
+
if ip_adapter_mode == "pose_estimation":
|
156 |
|
157 |
+
print('ip_adapter_mode = ', ip_adapter_mode)
|
158 |
|
159 |
# Инициализация ControlNet
|
160 |
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-openpose", torch_dtype=torch_dtype)
|
|
|
241 |
|
242 |
# #ip_adapter_mode = "edge_detection" # Режим работы Ip_Adapter
|
243 |
|
244 |
+
#if ip_adapter_mode.value == "edge_detection":
|
245 |
+
if ip_adapter_mode == "edge_detection":
|
246 |
|
247 |
+
print('ip_adapter_mode = ', ip_adapter_mode)
|
248 |
|
249 |
# Инициализация ControlNet
|
250 |
controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
|
|
|
348 |
|
349 |
# #ip_adapter_mode = "depth_map" # Режим работы Ip_Adapter
|
350 |
|
351 |
+
#if ip_adapter_mode.value == "depth_map":
|
352 |
+
if ip_adapter_mode == "depth_map":
|
353 |
|
354 |
+
print('ip_adapter_mode = ', ip_adapter_mode)
|
355 |
|
356 |
|
357 |
# Инициализация ControlNet
|