[1/N][trainer] feat: bagel flowgrpo integration #132
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for custom model loaders in the diffusion pipeline by adding a build_module method to DiffusionModelBase and implementing _build_module_from_registry in the FSDP engine. It also adds configurable FSDP layer prefixes (fsdp_layer_prefixes) to allow flexible LoRA parameter collection, and improves robustness in prepare_model_inputs by safely handling missing prompt embeddings. Feedback on the changes suggests replacing a try-except AttributeError block with explicit hasattr and callable checks when enabling gradient checkpointing on custom modules to avoid masking internal AttributeErrors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@SamitHuang PTAL it is the nececessary interface for non-diffusers integration. |
What does this PR do?
one piece of the PR #66
layer.instead oftransformer_blocks)toandenable_gradient_checkpointingimplementation for non-diffusers modelChecklist Before Starting
[{modules}] {type}: {description}(This will be checked by the CI){modules}includefsdp,vllm_omni,rollout,trainer,ci,training_utils,recipe,ray,worker,single_controller,misc,perf,model,algo,env,tool,ckpt,doc,data,cfg,reward,diffusion,omni,tests,docker,like[diffusion, doc]{type}is infeat,fix,refactor,chore,test[BREAKING]to the beginning of the title.[BREAKING][diffusion, fsdp] feat: new rollout schedulerTest
API and Usage Example
# Add code snippet or script demonstrating how to use thisDesign & Code Changes
Checklist Before Submitting
Important
Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always