Skip to content

LatentDiffusionInferer errors out when save_intermediates = False and padding and cropping is needed #8334

Closed
@virginiafdez

Description

@virginiafdez

Describe the bug
The latent space of the autoencoder can be padded (to avoid it not being multiple of 2**(num_downsamplings) on the DM). When save_intermediates is False, the code still tries to crop them, even though they aren't created.

To Reproduce

  • Create diffusion model
  • Create inferer with ldm_latent_shape and autoencoder_latent_shape different
  • Run the sample function with save_intermediates = False.

Expected behavior
No error.

Environment
Python 3.9
MONAI 1.4.0

Metadata

Metadata

Assignees

Labels

GenerativeModelsIssues relating to generative models

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions