theSure commited on
Commit
f9e1c39
·
verified ·
1 Parent(s): ba3fee7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -111,8 +111,8 @@ def predict(
111
 
112
  img = np.array(input_image.convert("RGB"))
113
 
114
- W = int(np.shape(img)[0] - np.shape(img)[0] % 16)
115
- H = int(np.shape(img)[1] - np.shape(img)[1] % 16)
116
 
117
  input_image = input_image.resize((H, W))
118
  uploaded_mask = uploaded_mask.resize((H, W))
@@ -128,8 +128,8 @@ def predict(
128
  prompt=prompt,
129
  control_image=input_image.convert("RGB"),
130
  control_mask=uploaded_mask.convert("RGB"),
131
- width=H,
132
- height=W,
133
  num_inference_steps=ddim_steps,
134
  generator=torch.Generator("cuda").manual_seed(seed),
135
  guidance_scale=scale,
 
111
 
112
  img = np.array(input_image.convert("RGB"))
113
 
114
+ W = int(np.shape(img)[1] - np.shape(img)[1] % 16)
115
+ H = int(np.shape(img)[0] - np.shape(img)[0] % 16)
116
 
117
  input_image = input_image.resize((H, W))
118
  uploaded_mask = uploaded_mask.resize((H, W))
 
128
  prompt=prompt,
129
  control_image=input_image.convert("RGB"),
130
  control_mask=uploaded_mask.convert("RGB"),
131
+ width=W,
132
+ height=H,
133
  num_inference_steps=ddim_steps,
134
  generator=torch.Generator("cuda").manual_seed(seed),
135
  guidance_scale=scale,