HealDA layers and DiT patches for PNM Core#1371
Conversation
Greptile OverviewGreptile SummaryThis PR adds HealDA integration layers and patches to the DiT model for PhysicsNeMo Core. The changes include new HEALPix-based tokenizer/detokenizer modules, modular conditioning embedders, and several enhancements to the DiT architecture. Key Changes:
Breaking Changes (as noted in PR description):
Issues Found:
Important Files Changed
|
Additional Comments (1)
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Moved HPX layers into module folder, can update this one now to use the embedding layers there |
|
Thanks @NickGeneva, updated to use the new hpx embedding layers. |
…onEmbedder, pass timestep_embed_kwargs
|
Over all I think this looks good, only big pending item left imois verifying that stormscope checkpoints remain operational. Other than than the changes reasonable extensions that dont have major api breaks. |
|
/blossom-ci |
|
/blossom-ci |
|
/blossom-ci |
|
/blossom-ci |
|
/blossom-ci |
* Add HealDA layers and DiT patches
* renamed the conditioning_embedder for clarity
* delete duplicate embedding module
* update docs
* updated test
* update license
* Propogate qk_norm_affine to layerNorm in timm Attention
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* make ValueError more descriptive
* fix tokenizer pos_embed weight init
* remove hpx layer additions and import from new hpx module
* move conditioning embedder to separate file
* pass list of drop path rates instead of hardcoded linear schedule
* changed default of ditBlock kwargs from None to {}
* change ConditioningEmbedder configuration to enum, cleanup EDMConditionEmbedder, pass timestep_embed_kwargs
* cleanup cond embedder tests
* testing checkpoint compat
* add docstring to mlp
* Test fix
* Update
* Test fix
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrington <pharrington@nvidia.com>
Co-authored-by: Nicholas Geneva <5533524+NickGeneva@users.noreply.github.com>
Co-authored-by: Nicholas Geneva <ngeneva@nvidia.com>
PhysicsNeMo Pull Request
Description
Adds necessary layers and patches the existing DiT to enable HealDA integration into PhysicsNemo.
DiT
conditioning_embeddermodules. The existing embedding method embedded the timestep and condition separately and then added the two (following the original DiT implementation), as opposed to the EDM/SongUNet style approach, where the two are embedded jointly.DropPathto the DiTfinal_dropouttoggle to theMlptimmand TE (Note: TE does not supportqk_norm_affineunliketimm)HealDA
Breaking Changes/Bug fixes:
MultiHeadAttentiondefaults to sequence firstsbhdqkv_format format matching PyTorch. This does not match the PNM documentation ofTESelfAttention, suggesting batch-first(B, L, D)or thetimmdefault of batch-first, so theqkv_formatargument is exposed and the default is changed tobshd(batch-first) for consistency.MultiHeadAttentiondoes not support projection dropout, and so the appropriate dropout layer was skipped/not applied previously, making the timm and TE backends incompatible. Added a dropout layer following theattn_opfor consistency. Breaking change for any model trained using TE backend withproj_drop_rate > 0.mlp_drop_ratewas ignored. Changed to propagate this correctly. Breaking change to any model trained withmlp_drop_rate>0Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.