bo.l commited on
Commit
a8096f5
·
1 Parent(s): 46657b2

update multi

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -86,6 +86,8 @@ def infer(
86
  refs = [x for x in (ref1, ref2) if x is not None]
87
  if len(refs) == 0:
88
  raise gr.Error("请至少上传一张参考图(ref1 或 ref2)。")
 
 
89
 
90
  # 规范宽高:不超过 MAX_IMAGE_SIZE 且对齐到 16
91
  width = max(16, min(width, MAX_IMAGE_SIZE)) // 16 * 16
 
86
  refs = [x for x in (ref1, ref2) if x is not None]
87
  if len(refs) == 0:
88
  raise gr.Error("请至少上传一张参考图(ref1 或 ref2)。")
89
+ if len(refs) == 2:
90
+ refs = [[refs[0]],[refs[1]]]
91
 
92
  # 规范宽高:不超过 MAX_IMAGE_SIZE 且对齐到 16
93
  width = max(16, min(width, MAX_IMAGE_SIZE)) // 16 * 16