ovshake commited on
Commit
dc20913
1 Parent(s): 64135f7

stop PIL reading image twice

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -73,7 +73,7 @@ def process_image(args, inpainting_pipeline, net):
73
  transforms_list += [transforms.ToTensor()]
74
  transforms_list += [Normalize_image(0.5, 0.5)]
75
  transform_rgb = transforms.Compose(transforms_list)
76
- img = Image.open(image_path)
77
  img = img.convert("RGB")
78
  img = img.resize((args.resolution, args.resolution))
79
  if args.rembg:
 
73
  transforms_list += [transforms.ToTensor()]
74
  transforms_list += [Normalize_image(0.5, 0.5)]
75
  transform_rgb = transforms.Compose(transforms_list)
76
+ # img = Image.open(image_path)
77
  img = img.convert("RGB")
78
  img = img.resize((args.resolution, args.resolution))
79
  if args.rembg: