lunarflu HF Staff commited on
Commit
a5b1be0
·
1 Parent(s): 31cc706

[dfif2] loop.run_in_executor(None, inference2, index) >>> loop.run_in_executor(None, inference2, index, stage_1_result_path)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -229,7 +229,7 @@ def inference(prompt):
229
  return [stage_1_results, stage_1_param_path, stage_1_result_path]
230
  #----------------------------------------------------------------------------------------------------------------------------------------------
231
  # deepfloydif stage 2 upscaling ❌
232
- def inference2(index):
233
  selected_index_for_stage_2 = index
234
  seed_2 = 0
235
  guidance_scale_2 = 4
@@ -365,7 +365,7 @@ async def dfif2(index: int, stage_1_result_path, thread, dfif_command_message_id
365
 
366
  # run blocking function in executor
367
  loop = asyncio.get_running_loop()
368
- result_path = await loop.run_in_executor(None, inference2, index)
369
 
370
  await thread.send(f"✅upscale done")
371
  with open(result_path, 'rb') as f:
 
229
  return [stage_1_results, stage_1_param_path, stage_1_result_path]
230
  #----------------------------------------------------------------------------------------------------------------------------------------------
231
  # deepfloydif stage 2 upscaling ❌
232
+ def inference2(index, stage_1_result_path):
233
  selected_index_for_stage_2 = index
234
  seed_2 = 0
235
  guidance_scale_2 = 4
 
365
 
366
  # run blocking function in executor
367
  loop = asyncio.get_running_loop()
368
+ result_path = await loop.run_in_executor(None, inference2, index, stage_1_result_path)
369
 
370
  await thread.send(f"✅upscale done")
371
  with open(result_path, 'rb') as f: