Refactor WAN loading logic: granular flags & boilerplate cleanup#419
Refactor WAN loading logic: granular flags & boilerplate cleanup#419ninatu wants to merge 1 commit into
Conversation
1e21945 to
135542b
Compare
|
🤖 Hi @csgoogle, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @csgoogle, but I was unable to process your request. Please see the logs for more details. |
|
Hi @entrpn! Not sure why gemini review is failing, is there anything I can do about it? |
|
🤖 Hi @entrpn, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
📋 Review Summary
This pull request presents an exceptionally high-quality refactoring of the WAN loading logic. By introducing granular boolean loading flags and centralizing the boilerplate instantiation, loading, and checkpoint management from 5 separate subclasses into base classes, it dramatically simplifies codebase complexity and eliminates duplicate code.
🔍 General Feedback
- Boilerplate Reduction: Consolidating
load_checkpointandload_diffusers_checkpointlogic intoWanCheckpointerreduces significant duplicate logic across 5 checkpointer files, which is a major win for maintainability. - Granular Loading Control: The replacement of
vae_onlyandtransformer_onlywith granular flags (load_vae,load_text_encoder,load_transformer,load_scheduler) provides precise control over pipeline resources, allowing users to optimize resource initialization dynamically. - Exhaustive Unit Tests: The addition of scenarios testing all permutations of the load flags in
wan_vace_pipeline_test.pyis exemplary and ensures robust regression coverage.
|
🤖 I'm sorry @entrpn, but I was unable to process your request. Please see the logs for more details. |
Replace 'vae_only' and 'transformer_only' flags in WAN pipelines and checkpointers with granular 'load_*' boolean flags. Centralize repetitive loading and instantiation logic (from_pretrained, from_checkpoint, etc.) into the base classes.
135542b to
ef5af09
Compare
Replace 'vae_only' and 'transformer_only' flags in WAN pipelines and checkpointers with granular 'load_*' boolean flags. Centralize repetitive loading and instantiation logic (from_pretrained, from_checkpoint, etc.) into the base classes.