app.py
CHANGED
|
@@ -31,8 +31,9 @@ class Pipe:
|
|
| 31 |
image_tensor = torch.from_numpy(img).permute(2, 0, 1).float().unsqueeze(0)
|
| 32 |
h, w = image_tensor.shape[-2], image_tensor.shape[-1]
|
| 33 |
h, w = h // 32 * 32, w // 32 * 32
|
| 34 |
-
image_tensor = torch.nn.functional.interpolate(image_tensor, size=(h, w), mode='bilinear')
|
| 35 |
-
|
|
|
|
| 36 |
image_tensor = image_tensor.half()
|
| 37 |
ipt = ipt.half()
|
| 38 |
output_i, output_j=self.net_i(image_tensor,ipt,prompt=True)
|
|
|
|
| 31 |
image_tensor = torch.from_numpy(img).permute(2, 0, 1).float().unsqueeze(0)
|
| 32 |
h, w = image_tensor.shape[-2], image_tensor.shape[-1]
|
| 33 |
h, w = h // 32 * 32, w // 32 * 32
|
| 34 |
+
image_tensor = torch.nn.functional.interpolate(image_tensor, size=(h, w), mode='bilinear').cuda()
|
| 35 |
+
|
| 36 |
+
ipt=self.net_c(image_tensor)
|
| 37 |
image_tensor = image_tensor.half()
|
| 38 |
ipt = ipt.half()
|
| 39 |
output_i, output_j=self.net_i(image_tensor,ipt,prompt=True)
|