This PR serves to fix some long-standing pain points of ControlLLLite usage as well as non-Advanced ControlNet usage with sliding contexts from AnimateDiff-Evolved. The refactor also brings the code closer to what I need to try some things for keeping AnimateDiff contexts more consistent related to reuse of core referencecn code among other tasks I have lined up, so killing multiple birds with one stone here.
Major refactor of ControlLLLite code to no longer require model_optional input in Apply Advanced ControlNet node. Should produce identical results to before as no core code changed and appears to do so based on my testing. If it does not, let me know! The refactoring has a few key side effects:
The hacky solution to have deepcopy overloaded to avoid the attn patch objects and the controlnet objects losing each other is no longer needed, which will fix behavior with certain helper nodes that pipe certain objects.
Since the patches are now applied at sampling time, SamplerCustomAdvanced will currently not apply ControlLLLite as I'd need to figure out a good way to handle it. I'm not sure if it worked with SamplerCustomAdvanced before. (All other KSamplers should be unaffected as I wrap around the sample and sample_custom functions that pretty much every other KSampler in existence, external or vanilla, uses.)
When context_options are present on the ModelPatcher object as defined by AnimateDiff-Evolved, ACN will attempt to convert the conditioning's controlnets to use Advanced-ControlNet equivalents, automatically supporting sliding contexts instead of needing AnimateDiff-Evolved to throw an error. Appears to work based on my testing, but the code to do this is complex, and so might have some weird edge cases that I didn't catch. Code when no context_options are used, or if only Advanced-ControlNet objects are used, should be completely unaffected, so this should only make a difference in cases that would have thrown an error in AnimateDiff-Evolved otherwise.
This PR serves to fix some long-standing pain points of ControlLLLite usage as well as non-Advanced ControlNet usage with sliding contexts from AnimateDiff-Evolved. The refactor also brings the code closer to what I need to try some things for keeping AnimateDiff contexts more consistent related to reuse of core referencecn code among other tasks I have lined up, so killing multiple birds with one stone here.
model_optional
input in Apply Advanced ControlNet node. Should produce identical results to before as no core code changed and appears to do so based on my testing. If it does not, let me know! The refactoring has a few key side effects: