zhiweili commited on
Commit
e4f4874
·
1 Parent(s): f10b363

添加resize

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -13,6 +13,8 @@ pipeline.to(device)
13
  generator = torch.Generator(device).manual_seed(0)
14
 
15
  def image_to_image(input_image, prompt, guidance_scale, num_inference_steps):
 
 
16
  # Generate the output image
17
  output_image = pipeline(
18
  generator=generator,
 
13
  generator = torch.Generator(device).manual_seed(0)
14
 
15
  def image_to_image(input_image, prompt, guidance_scale, num_inference_steps):
16
+ # resize image to 512x512
17
+ input_image = input_image.resize((512, 512))
18
  # Generate the output image
19
  output_image = pipeline(
20
  generator=generator,