Skip to content

Conversation

@virginiafdez
Copy link
Contributor

Fixes #8334

Description

There was an if save_intermediates missing in the code that was trying to run crop of the latent spaces on the sample function of the Latent Diffusion Inferers (normal one and ControlNet one) even when intermediates aren't created.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).

Virginia Fernandez and others added 3 commits February 14, 2025 14:36
…fusionInferer when save_intermediates was off but there's need to pad and crop latent space.

Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
…fusionInferer when save_intermediates was off but there's need to pad and crop latent space.

Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
@ericspod ericspod requested review from KumoLiu and ericspod February 17, 2025 14:40
@ericspod
Copy link
Member

Thanks for the fix, could we add a unit test to capture this behaviour? We should have one test at least that would fail without this fix but works with it I think.

Copy link
Contributor

@KumoLiu KumoLiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, LGTM.

Virginia Fernandez added 4 commits February 18, 2025 08:01
Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 18, 2025

/build

Virginia Fernandez added 2 commits February 18, 2025 10:53
Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 18, 2025

/build

@KumoLiu KumoLiu enabled auto-merge (squash) February 18, 2025 11:55
@KumoLiu KumoLiu merged commit 0a85eed into Project-MONAI:dev Feb 18, 2025
28 checks passed
Can-Zhao pushed a commit to Can-Zhao/MONAI that referenced this pull request Mar 10, 2025
…djustment in latent diffusion inferers (Project-MONAI#8343)

Fixes Project-MONAI#8334

### Description

There was an if save_intermediates missing in the code that was trying
to run crop of the latent spaces on the sample function of the Latent
Diffusion Inferers (normal one and ControlNet one) even when
intermediates aren't created.

### Types of changes
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).

---------

Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Co-authored-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: Can-Zhao <volcanofly@gmail.com>
@virginiafdez virginiafdez deleted the inferer_modification branch September 8, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants