bo.l commited on
Commit
cab43e0
·
1 Parent(s): 058ae01

update multi3

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -98,11 +98,10 @@ def infer(
98
  generator = torch.Generator(device=device).manual_seed(int(seed))
99
 
100
  # 参考图按桶缩放
101
- base_res = min(width, height, MAX_IMAGE_SIZE)
102
- raw_images = resize_by_bucket(refs, resolution=base_res)
103
 
104
  if len(raw_images) == 2:
105
- raw_images = [[raw_images[0]],[raw_images[1]]]
106
 
107
  # 推理
108
  with torch.no_grad():
@@ -139,7 +138,7 @@ css = """
139
 
140
  with gr.Blocks(css=css) as demo:
141
  with gr.Column(elem_id="col-container"):
142
- gr.Markdown("# Text-to-Image Gradio Template")
143
 
144
  with gr.Row():
145
  prompt = gr.Text(
 
98
  generator = torch.Generator(device=device).manual_seed(int(seed))
99
 
100
  # 参考图按桶缩放
101
+ raw_images = resize_by_bucket(refs, resolution=MAX_IMAGE_SIZE)
 
102
 
103
  if len(raw_images) == 2:
104
+ raw_images = [[raw_images[1]],[raw_images[1]]]
105
 
106
  # 推理
107
  with torch.no_grad():
 
138
 
139
  with gr.Blocks(css=css) as demo:
140
  with gr.Column(elem_id="col-container"):
141
+ gr.Markdown("# Multi Ref Edit Demo")
142
 
143
  with gr.Row():
144
  prompt = gr.Text(