app.py
CHANGED
|
@@ -32,12 +32,11 @@ class Pipe:
|
|
| 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 |
-
ipt=net_c(image_tensor)
|
| 36 |
image_tensor = image_tensor.half()
|
| 37 |
ipt = ipt.half()
|
| 38 |
-
output_i, output_j=net_i(image_tensor,ipt,prompt=True)
|
| 39 |
-
|
| 40 |
-
clean = output[-1][:, 3:, ...]
|
| 41 |
clean=torch.clamp(clean, 0, 1)
|
| 42 |
self.output = clean
|
| 43 |
|
|
|
|
| 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 |
+
ipt=self.net_c(image_tensor)
|
| 36 |
image_tensor = image_tensor.half()
|
| 37 |
ipt = ipt.half()
|
| 38 |
+
output_i, output_j=self.net_i(image_tensor,ipt,prompt=True)
|
| 39 |
+
clean = output_j[-1][:, 3:, ...]
|
|
|
|
| 40 |
clean=torch.clamp(clean, 0, 1)
|
| 41 |
self.output = clean
|
| 42 |
|