revert to use without_autocast()

This commit is contained in:
Won-Kyu Park 2024-09-16 06:33:46 +09:00
parent 3cdc26af30
commit 3b18b6f482
No known key found for this signature in database
GPG Key ID: 53AA79C8C9535D15

View File

@ -54,7 +54,7 @@ def samples_to_images_tensor(sample, approximation=None, model=None):
else:
if model is None:
model = shared.sd_model
with torch.no_grad(), devices.manual_cast(devices.dtype_vae): # fixes an issue with unstable VAEs that are flaky even in fp32
with torch.no_grad(), devices.without_autocast(): # fixes an issue with unstable VAEs that are flaky even in fp32
x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype))
return x_sample