Skip to content

Conversation

@virginiafdez
Copy link
Contributor

Fixes #8344

Description

The ControlNet inferers (latent and not latent) work in such a way that, when conditioning is used, the ControlNet does not take in the conditioning. It should, in theory, exhibit the same behaviour as the diffusion model.
I've changed this behaviour, which has included modifying ControlNetDiffusionInferer and ControlNetLatentDiffusionInferer; the methods call, sample and get_likelihood.
I've also modified the tests to take this into account.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes (modified, rather than new)
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.

…ion model has context. This should be the standard behavior. Modified tests accordingly.

Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Copy link
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

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

LGTM!

@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 24, 2025

/build

@KumoLiu KumoLiu enabled auto-merge (squash) February 24, 2025 02:59
@KumoLiu
Copy link
Contributor

KumoLiu commented Feb 24, 2025

/build

@KumoLiu KumoLiu merged commit ab07523 into Project-MONAI:dev Feb 24, 2025
28 checks passed
Can-Zhao pushed a commit to Can-Zhao/MONAI that referenced this pull request Mar 10, 2025
Project-MONAI#8360)

Fixes Project-MONAI#8344

### Description
The ControlNet inferers (latent and not latent) work in such a way that,
when conditioning is used, the ControlNet does not take in the
conditioning. It should, in theory, exhibit the same behaviour as the
diffusion model.
I've changed this behaviour, which has included modifying
ControlNetDiffusionInferer and ControlNetLatentDiffusionInferer; the
methods call, sample and get_likelihood.
I've also modified the tests to take this into account.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [x] New tests added to cover the changes (modified, rather than new)
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.

Signed-off-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Co-authored-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: Can-Zhao <volcanofly@gmail.com>
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.

ControlNetLatentDiffusionInferer errors out when conditioning is not False

3 participants