Fix for Diffusers subfunction#759
Conversation
tv-karthikeya
commented
Jan 28, 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>
13f4eff to
d4b2075
Compare
| # 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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]: |
There was a problem hiding this comment.
@tv-karthikeya Technically this class should be in the transformer_wan.py. Could you please move this class there. Except that all seems good.
Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
Signed-off-by: vtirumal <vtirumal@qti.qualcomm.com>
7e2805e to
51a7d1a
Compare
- 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>
- 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>
- 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>