Skip to content

Commit

Permalink
revert to use without_autocast()
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Sep 15, 2024
1 parent 325a127 commit edf4b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sd_samplers_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit edf4b9e

Please sign in to comment.