clip decoder output
This commit is contained in:
+2
-1
@@ -224,8 +224,9 @@ class SUPIR_decode:
|
||||
if decoded_out.shape[2] != orig_H or decoded_out.shape[3] != orig_W:
|
||||
print("Restoring original dimensions: ", orig_W,"x",orig_H)
|
||||
decoded_out = F.interpolate(decoded_out, size=(orig_H, orig_W), mode="bicubic")
|
||||
|
||||
|
||||
decoded_out = decoded_out.cpu().to(torch.float32).permute(0, 2, 3, 1)
|
||||
decoded_out = torch.clip(decoded_out, 0, 1)
|
||||
|
||||
return (decoded_out,)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user