mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-11-27 06:40:10 +08:00
fix an issue where VAE would remain in fp16 after an auto-switch to fp32
This commit is contained in:
parent
0cdbd90d6b
commit
d43333ff71
@ -95,6 +95,8 @@ def images_tensor_to_samples(image, approximation=None, model=None):
|
|||||||
else:
|
else:
|
||||||
if model is None:
|
if model is None:
|
||||||
model = shared.sd_model
|
model = shared.sd_model
|
||||||
|
model.first_stage_model.to(devices.dtype_vae)
|
||||||
|
|
||||||
image = image.to(shared.device, dtype=devices.dtype_vae)
|
image = image.to(shared.device, dtype=devices.dtype_vae)
|
||||||
image = image * 2 - 1
|
image = image * 2 - 1
|
||||||
if len(image) > 1:
|
if len(image) > 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user