We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3558057 commit 8263b0eCopy full SHA for 8263b0e
models/experimental/SSR/demo/ssr_demo.py
@@ -55,6 +55,10 @@ def save_tensor_as_image(tensor, output_path):
55
if tensor.dim() == 4:
56
tensor = tensor.squeeze(0) # Remove batch dimension
57
58
+ # Convert BFloat16 to Float32 if needed
59
+ if tensor.dtype == torch.bfloat16:
60
+ tensor = tensor.to(torch.float32)
61
+
62
# Clamp values to [0, 1] range
63
tensor = torch.clamp(tensor, 0, 1)
64
0 commit comments