zhiweili commited on
Commit
a385636
Β·
1 Parent(s): 425542b

fix compiled_pipe

Browse files
Files changed (1) hide show
  1. app_onediff.py +2 -2
app_onediff.py CHANGED
@@ -60,7 +60,7 @@ base_pipe = AutoPipelineForText2Image.from_pretrained(
60
  base_pipe.to(device)
61
 
62
  # base_pipe = nexfort_compile(base_pipe)
63
- compiled_pipe = None
64
 
65
  from gfpgan.utils import GFPGANer
66
  from basicsr.archs.srvgg_arch import SRVGGNetCompact
@@ -88,7 +88,7 @@ def create_demo() -> gr.Blocks:
88
  run_task_time = 0
89
  time_cost_str = ''
90
  run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
91
- if compiled_pipe is None:
92
  compiled_pipe = nexfort_compile(base_pipe)
93
  generated_image = compiled_pipe(
94
  prompt=prompt,
 
60
  base_pipe.to(device)
61
 
62
  # base_pipe = nexfort_compile(base_pipe)
63
+ compiled_pipe = base_pipe
64
 
65
  from gfpgan.utils import GFPGANer
66
  from basicsr.archs.srvgg_arch import SRVGGNetCompact
 
88
  run_task_time = 0
89
  time_cost_str = ''
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
  compiled_pipe = nexfort_compile(base_pipe)
93
  generated_image = compiled_pipe(
94
  prompt=prompt,