ameerazam08 commited on
Commit
099273d
1 Parent(s): 7ddec05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -45,6 +45,8 @@ def process(input_image_editor,
45
  image = input_image_editor['background']
46
  mask = input_image_editor['layers'][0]
47
  size = (768, 768)
 
 
48
  image = image.convert("RGB").resize(size)
49
  mask = mask.convert("RGB").resize(size)
50
  generator = torch.Generator(device="cuda").manual_seed(seed)
@@ -62,7 +64,7 @@ def process(input_image_editor,
62
  true_guidance_scale=true_guidance_scale
63
  ).images[0]
64
 
65
- return image
66
 
67
  with gr.Blocks() as demo:
68
  gr.Markdown(MARKDOWN)
 
45
  image = input_image_editor['background']
46
  mask = input_image_editor['layers'][0]
47
  size = (768, 768)
48
+ image_or = image.copy()
49
+
50
  image = image.convert("RGB").resize(size)
51
  mask = mask.convert("RGB").resize(size)
52
  generator = torch.Generator(device="cuda").manual_seed(seed)
 
64
  true_guidance_scale=true_guidance_scale
65
  ).images[0]
66
 
67
+ return result.resize((image_or.size[:2]))
68
 
69
  with gr.Blocks() as demo:
70
  gr.Markdown(MARKDOWN)