mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-08 14:42:54 +08:00
revert to use without_autocast()
This commit is contained in:
parent
3cdc26af30
commit
3b18b6f482
@ -54,7 +54,7 @@ def samples_to_images_tensor(sample, approximation=None, model=None):
|
|||||||
else:
|
else:
|
||||||
if model is None:
|
if model is None:
|
||||||
model = shared.sd_model
|
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))
|
x_sample = model.decode_first_stage(sample.to(model.first_stage_model.dtype))
|
||||||
|
|
||||||
return x_sample
|
return x_sample
|
||||||
|
Loading…
Reference in New Issue
Block a user