Spaces:
Runtime error
Runtime error
Zhenyu Li
commited on
Commit
·
2c2bb01
1
Parent(s):
abbda4e
update
Browse files
app.py
CHANGED
@@ -147,7 +147,7 @@ def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resoluti
|
|
147 |
detected_map = detected_map[:, :, None]
|
148 |
detected_map = np.concatenate([detected_map, detected_map, detected_map], axis=2)
|
149 |
|
150 |
-
control = torch.from_numpy(detected_map.copy()).float().
|
151 |
control = torch.stack([control for _ in range(num_samples)], dim=0)
|
152 |
control = einops.rearrange(control, 'b h w c -> b c h w').clone()
|
153 |
|
|
|
147 |
detected_map = detected_map[:, :, None]
|
148 |
detected_map = np.concatenate([detected_map, detected_map, detected_map], axis=2)
|
149 |
|
150 |
+
control = torch.from_numpy(detected_map.copy()).float().to(DEVICE) / 255.0
|
151 |
control = torch.stack([control for _ in range(num_samples)], dim=0)
|
152 |
control = einops.rearrange(control, 'b h w c -> b c h w').clone()
|
153 |
|