Commit d43333ff authored by AUTOMATIC1111's avatar AUTOMATIC1111

fix an issue where VAE would remain in fp16 after an auto-switch to fp32

parent 0cdbd90d
......@@ -95,6 +95,8 @@ def images_tensor_to_samples(image, approximation=None, model=None):
else:
if model is None:
model = shared.sd_model
model.first_stage_model.to(devices.dtype_vae)
image = image.to(shared.device, dtype=devices.dtype_vae)
image = image * 2 - 1
if len(image) > 1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment