Commit ab07523
Modify ControlNet inferer so that it takes in context when the diffus… (#8360)
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
<!--- 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 <[email protected]>
Co-authored-by: Virginia Fernandez <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]>
Co-authored-by: YunLiu <[email protected]>1 parent a790590 commit ab07523
File tree
2 files changed
+38
-11
lines changed- monai/inferers
- tests/inferers
2 files changed
+38
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
| 1337 | + | |
1340 | 1338 | | |
1341 | 1339 | | |
1342 | 1340 | | |
1343 | 1341 | | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1344 | 1346 | | |
1345 | 1347 | | |
1346 | 1348 | | |
| |||
1396 | 1398 | | |
1397 | 1399 | | |
1398 | 1400 | | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | 1401 | | |
1405 | 1402 | | |
1406 | 1403 | | |
1407 | 1404 | | |
1408 | 1405 | | |
| 1406 | + | |
1409 | 1407 | | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1410 | 1416 | | |
1411 | 1417 | | |
1412 | 1418 | | |
| |||
1415 | 1421 | | |
1416 | 1422 | | |
1417 | 1423 | | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1418 | 1430 | | |
1419 | 1431 | | |
1420 | 1432 | | |
| |||
1485 | 1497 | | |
1486 | 1498 | | |
1487 | 1499 | | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
1491 | 1500 | | |
1492 | 1501 | | |
1493 | 1502 | | |
1494 | 1503 | | |
1495 | 1504 | | |
1496 | 1505 | | |
1497 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1498 | 1510 | | |
1499 | 1511 | | |
1500 | 1512 | | |
| |||
1503 | 1515 | | |
1504 | 1516 | | |
1505 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1506 | 1524 | | |
1507 | 1525 | | |
1508 | 1526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
553 | 555 | | |
554 | 556 | | |
555 | 557 | | |
| |||
619 | 621 | | |
620 | 622 | | |
621 | 623 | | |
| 624 | + | |
622 | 625 | | |
| 626 | + | |
623 | 627 | | |
| 628 | + | |
624 | 629 | | |
625 | 630 | | |
626 | 631 | | |
| |||
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
| 1031 | + | |
1026 | 1032 | | |
1027 | 1033 | | |
| 1034 | + | |
1028 | 1035 | | |
1029 | 1036 | | |
1030 | 1037 | | |
| |||
1106 | 1113 | | |
1107 | 1114 | | |
1108 | 1115 | | |
| 1116 | + | |
1109 | 1117 | | |
1110 | 1118 | | |
| 1119 | + | |
1111 | 1120 | | |
1112 | 1121 | | |
1113 | 1122 | | |
| |||
0 commit comments