Skip to content

Commit d43333f

Browse files
committed
fix an issue where VAE would remain in fp16 after an auto-switch to fp32
1 parent 0cdbd90 commit d43333f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/sd_samplers_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def images_tensor_to_samples(image, approximation=None, model=None):
9595
else:
9696
if model is None:
9797
model = shared.sd_model
98+
model.first_stage_model.to(devices.dtype_vae)
99+
98100
image = image.to(shared.device, dtype=devices.dtype_vae)
99101
image = image * 2 - 1
100102
if len(image) > 1:

0 commit comments

Comments
 (0)