Skip to content

Fix for Diffusers subfunction#759

Merged
quic-rishinr merged 10 commits intoquic:mainfrom
tv-karthikeya:subfn_export
Feb 9, 2026
Merged

Fix for Diffusers subfunction#759
quic-rishinr merged 10 commits intoquic:mainfrom
tv-karthikeya:subfn_export

Conversation

@tv-karthikeya
Copy link
Copy Markdown
Contributor

  • skip subfn handling in export utils for diffusers, we handle this in export() of diffuser models

Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
Comment thread QEfficient/utils/export_utils.py Outdated
# TODO: Handle this in the modelling class QEFFTransformersBase,remove from here. Refer diffusers implementation
submodule_classes = qeff_model.model.get_submodules_for_export()
if submodule_classes:
kwargs["export_modules_as_functions"] = submodule_classes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we will have to keep this consistent between Diffusers and transformers. @quic-rishinr Lets merge this change and @tv-karthikeya will add this change in next PR. (Note: This is only for mainline, release, we are good)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it should be uniform. there is no need of this param export_modules_as_function, We can remove this as we have done in the diffusers.

Copy link
Copy Markdown
Contributor

@abhishek-singh591 abhishek-singh591 Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the idea was to handle all subfunction‑related logic inside export_utils rather than in the export itself. This keeps the design cleaner and more aligned so i would suggest changing diffusers code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this for release, we will merge only to mainline.

Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
# Both high and low noise transformers share the same configuration
self.config = transformer_high.config

def get_submodules_for_export(self) -> Type[nn.Module]:
Copy link
Copy Markdown
Contributor

@quic-amitraj quic-amitraj Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tv-karthikeya Technically this class should be in the transformer_wan.py. Could you please move this class there. Except that all seems good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

@quic-amitraj quic-amitraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quic-rishinr quic-rishinr merged commit e8e5c43 into quic:main Feb 9, 2026
4 checks passed
tchawada pushed a commit to tchawada/QEff_tanisha that referenced this pull request Feb 16, 2026
- skip subfn handling in export utils for diffusers, we handle this in
export() of diffuser models

---------

Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Co-authored-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
smedhe pushed a commit to smedhe/QEff_Sharvari that referenced this pull request Mar 8, 2026
- skip subfn handling in export utils for diffusers, we handle this in
export() of diffuser models

---------

Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Co-authored-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Sharvari Medhe <smedhe@qti.qualcomm.com>
smedhe pushed a commit to smedhe/QEff_Sharvari that referenced this pull request Mar 8, 2026
- skip subfn handling in export utils for diffusers, we handle this in
export() of diffuser models

---------

Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
Signed-off-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Co-authored-by: Abhishek Kumar Singh <sabhis@qti.qualcomm.com>
Signed-off-by: Sharvari Medhe <smedhe@qti.qualcomm.com>

Signed-off-by: Sharvari Medhe <smedhe@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants