Kosinkadink / ComfyUI-AnimateDiff-Evolved

Improved AnimateDiff for ComfyUI and Advanced Sampling Support
Apache License 2.0
2.76k stars 208 forks source link

Add SD LoRA masking #330

Closed Kosinkadink closed 6 months ago

Kosinkadink commented 7 months ago

Implemented a LoRA Hook system to dynamically apply weights to model during sampling. May need to tweak weight caching so it is disabled when lowvram is active, etc., but all the core functionality is working.

LoRA Hooks work by registering themselves on models, and then set on CLIP (for CLIP weights) and conditioning (for model weights). Also added the option to register a model as a lora to basically act like dynamic merging between two models - the stored weights are the difference between model's original weights and the target model's weights.

List of features/changes (not exhaustive):