CultriX commited on
Commit
bf25225
1 Parent(s): 5aa8acd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -236,7 +236,7 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
236
 
237
  if image_input is not None:
238
  final_image, file_path, base64_str = generate_image_to_image(prompt_mash, image_input, image_strength, steps, cfg_scale, width, height, lora_scale, seed)
239
- yield final_image, seed, file_path, base64_str, gr.update(value=file_path, visible=True)
240
  else:
241
  image_generator = generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress)
242
 
@@ -255,7 +255,7 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
255
  with open(temp_file.name, "rb") as f:
256
  img_base64 = base64.b64encode(f.read()).decode("utf-8")
257
 
258
- yield final_image, seed, temp_file.name, f"data:image/png;base64,{img_base64}", gr.update(value=temp_file.name, visible=True)
259
 
260
  css = '''
261
  #gen_btn{height: 100%}
 
236
 
237
  if image_input is not None:
238
  final_image, file_path, base64_str = generate_image_to_image(prompt_mash, image_input, image_strength, steps, cfg_scale, width, height, lora_scale, seed)
239
+ return final_image, file_path, base64_str
240
  else:
241
  image_generator = generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress)
242
 
 
255
  with open(temp_file.name, "rb") as f:
256
  img_base64 = base64.b64encode(f.read()).decode("utf-8")
257
 
258
+ return final_image, temp_file.name, base64_str
259
 
260
  css = '''
261
  #gen_btn{height: 100%}