setted up correct amp

This commit is contained in:
Falko Victor Habel 2025-02-17 16:26:54 +01:00
parent e28fd3d330
commit bba5e2179d
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class ImageUpscaler:
# Perform inference with the model # Perform inference with the model
with torch.no_grad(): with torch.no_grad():
with torch.cuda.amp.autocast(device_type="cuda"): with torch.amp.autocast(device_type="cuda"):
output_tensor = self.model(preprocessed_image) output_tensor = self.model(preprocessed_image)
# Postprocess and return the upscaled image # Postprocess and return the upscaled image