zhiweili
commited on
Commit
Β·
4f4e5ea
1
Parent(s):
07f352f
fix UnboundLocalError
Browse files- app_onediff.py +5 -2
app_onediff.py
CHANGED
@@ -90,8 +90,11 @@ def create_demo() -> gr.Blocks:
|
|
90 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
91 |
if id(compiled_pipe) == id(base_pipe):
|
92 |
print("---------->Recompile<----------")
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
95 |
prompt=prompt,
|
96 |
num_inference_steps=steps,
|
97 |
).images[0]
|
|
|
90 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
91 |
if id(compiled_pipe) == id(base_pipe):
|
92 |
print("---------->Recompile<----------")
|
93 |
+
target_pipe = nexfort_compile(base_pipe)
|
94 |
+
compiled_pipe = target_pipe
|
95 |
+
else:
|
96 |
+
target_pipe = compiled_pipe
|
97 |
+
generated_image = target_pipe(
|
98 |
prompt=prompt,
|
99 |
num_inference_steps=steps,
|
100 |
).images[0]
|