bo.l commited on
Commit
0f3e6bf
·
1 Parent(s): fed9294

imagge process

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -78,7 +78,7 @@ def infer(
78
  ):
79
  if randomize_seed:
80
  seed = random.randint(0, MAX_SEED)
81
-
82
  generator = torch.Generator().manual_seed(seed)
83
 
84
  with torch.no_grad():
@@ -177,14 +177,12 @@ with gr.Blocks(css=css) as demo:
177
  ["a watercolor painting of yosemite valley at sunrise"],
178
  ]
179
  gr.Examples(examples=examples, inputs=[prompt])
180
- raw_images=[ref1, ref2]
181
- raw_images = [x for resize_by_bucket(x) in raw_images]
182
  gr.on(
183
  triggers=[run_button.click, prompt.submit],
184
  fn=infer,
185
  inputs=[
186
  prompt,
187
- raw_images, # 新增:两张图
188
  seed,
189
  randomize_seed,
190
  width,
 
78
  ):
79
  if randomize_seed:
80
  seed = random.randint(0, MAX_SEED)
81
+ raw_images = [resize_by_bucket(x) for x in raw_images]
82
  generator = torch.Generator().manual_seed(seed)
83
 
84
  with torch.no_grad():
 
177
  ["a watercolor painting of yosemite valley at sunrise"],
178
  ]
179
  gr.Examples(examples=examples, inputs=[prompt])
 
 
180
  gr.on(
181
  triggers=[run_button.click, prompt.submit],
182
  fn=infer,
183
  inputs=[
184
  prompt,
185
+ [ref1, ref2], # 新增:两张图
186
  seed,
187
  randomize_seed,
188
  width,