rootglitch commited on
Commit
1ae0137
·
1 Parent(s): 52b5462

Convert images to tensors

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -439,10 +439,10 @@ def generate_ai_bg(input_img, prompt):
439
 
440
  def blend_details(input_image, relit_image, masked_image):
441
  with torch.inference_mode():
442
- # Load and resize images
443
- # input_image = load_image(input_image_path)
444
- # relit_image = load_image(relit_image_path)
445
- # masked_image = load_image(masked_image_path)
446
 
447
  # Resize input image
448
  input_image = torch.nn.functional.interpolate(
 
439
 
440
  def blend_details(input_image, relit_image, masked_image):
441
  with torch.inference_mode():
442
+ # Convert images to tensors
443
+ input_image = pil2tensor(input_image)
444
+ relit_image = pil2tensor(relit_image)
445
+ masked_image = pil2tensor(masked_image)
446
 
447
  # Resize input image
448
  input_image = torch.nn.functional.interpolate(