Skip to content

Commit

Permalink
fix an issue where VAE would remain in fp16 after an auto-switch to fp32
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Aug 30, 2023
1 parent 0cdbd90 commit d43333f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/sd_samplers_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d43333f

Please sign in to comment.