r3gm commited on
Commit
d409ae5
·
verified ·
1 Parent(s): 3bab44d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -219,7 +219,7 @@ def run_inference(
219
  ):
220
 
221
  scheduler_class = SCHEDULER_MAP.get(scheduler_name)
222
- if scheduler_class != pipe.scheduler._class_name or flow_shift != pipe.scheduler.config.get("flow_shift", "shift"):
223
  config = copy.deepcopy(original_scheduler.config)
224
  print("update scheduler")
225
  if scheduler_class == FlowMatchEulerDiscreteScheduler:
@@ -227,6 +227,7 @@ def run_inference(
227
  else:
228
  config['flow_shift'] = flow_shift
229
  pipe.scheduler = scheduler_class.from_config(config)
 
230
 
231
  result = pipe(
232
  image=resized_image,
 
219
  ):
220
 
221
  scheduler_class = SCHEDULER_MAP.get(scheduler_name)
222
+ if scheduler_class.__name__ != pipe.scheduler.config._class_name or flow_shift != pipe.scheduler.config.get("flow_shift", "shift"):
223
  config = copy.deepcopy(original_scheduler.config)
224
  print("update scheduler")
225
  if scheduler_class == FlowMatchEulerDiscreteScheduler:
 
227
  else:
228
  config['flow_shift'] = flow_shift
229
  pipe.scheduler = scheduler_class.from_config(config)
230
+ print(pipe.scheduler.config)
231
 
232
  result = pipe(
233
  image=resized_image,