root commited on
Commit
58bc3a9
1 Parent(s): 450482a

add img choice

Browse files
Files changed (1) hide show
  1. ui_functions.py +1 -0
ui_functions.py CHANGED
@@ -95,6 +95,7 @@ def copy_img_to_input(img, idx):
95
  "图片3(img4)":2,
96
  "图片4(img5)":3,
97
  }
 
98
  image_data = re.sub('^data:image/.+;base64,', '', img[idx])
99
  processed_image = Image.open(BytesIO(base64.b64decode(image_data)))
100
  tab_update = gr.update(selected='img2img_tab')
 
95
  "图片3(img4)":2,
96
  "图片4(img5)":3,
97
  }
98
+ idx = idx_map[idx]
99
  image_data = re.sub('^data:image/.+;base64,', '', img[idx])
100
  processed_image = Image.open(BytesIO(base64.b64decode(image_data)))
101
  tab_update = gr.update(selected='img2img_tab')