Skip to content

Commit

Permalink
fix the bug for AutoencoderDC encode training;
Browse files Browse the repository at this point in the history
Signed-off-by: lawrence-cj <[email protected]>
  • Loading branch information
lawrence-cj committed Jan 20, 2025
1 parent 61b25ea commit 420d3b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diffusion/model/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def vae_encode(name, vae, images, sample_posterior, device):
elif "AutoencoderDC" in name:
ae = vae
scaling_factor = ae.config.scaling_factor if ae.config.scaling_factor else 0.41407
z = ae.encode(images.to(device))
z = ae.encode(images.to(device))[0]
z = z * scaling_factor
else:
print("error load vae")
Expand Down

0 comments on commit 420d3b7

Please sign in to comment.