文件最后提交记录最后更新时间
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前
【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Co-authored-by: xiaoheng181<eudemoniaxh@163.com> # message auto-generated for no-merge-commit merge: !493 merge sd_refactor_wan2_2_refactor into master 【重构】多模态生成模型量化服务重构wan2.2/hunyuanvideo【Wan2.2任务场景拆分、专家子网络拆分】 Created-by: xiaoheng181 Commit-by: xiaoheng181 Merged-by: ascend-robot Description: 感谢您贡献的Pull Request! 在提交之前,请务必阅读 [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md)。 Thanks for sending a pull request! BEFORE SUBMITTING, PLEASE READ [CONTRIBUTING.md](https://gitcode.com/Ascend/msmodelslim/blob/master/CONTRIBUTING.md). ## PR描述 (What this PR does / why we need it?) - 请明确说明您提交PR的变更内容。本部分旨在概述所做的变更,以及此PR是如何解决该问题的。请尽可能地提供有助于评审人员更高效、更快速完成检视审查的实用说明。 本 PR 是多模态生成(multimodal_sd_modelslim_v1)重构的第三笔,依赖已合入(或同栈基于)sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters。在 新 pipeline(MultimodalPipelineInterface)下完成 Wan2.2 场景化重构,并与保留的 Legacy 单体适配器(Wan2Point2Adapter)共存。 base_model_adapter.py(新) 实现标准 pipeline:get_inference_config_class / configure_runtime / init_model / handle_dataset / prepare_calib_data / inference_dump_calib_data / quantization_context;双专家 get_expert_adapter + expert_sub_adapter;与 Wan generate.py CLI 桥接(_namespace_to_argv 等)。 t2v/、i2v/、ti2v/ Wan2_2T2VModelAdapter、Wan2_2I2VModelAdapter、Wan2_2TI2VModelAdapter(如 Wan2.2-T2V-A14B);各场景独立 InferenceConfig 与校准规则(T2V 禁图、I2V 强制图等);配套 loader.py。 model_adapter.py Wan2Point2Adapter 仍走 LegacyMultimodalPipelineInterface,与 Legacy PR 行为一致;新量化路径走场景化类。 其它 constants.py(含 DUAL_EXPERT_SCENE_TASKS)、expert_sub_adapter.py、__init__.py 导出。 UT 新增/更新 test_scene_model_adapters.py、test_get_expert_adapter.py、test_inference_config.py、test_expert_sub_adapter.py、test_base_model_adapter_argv.py,并适配 test_model_adapter_wan2_2.py。 - 请说明为何需要这些更改,例如具体的使用场景或bug描述。 Wan2.2 需按 T2V/I2V/TI2V 分场景配置与校准,双专家需按专家分别 dump/量化;单体 Legacy 适配器无法满足 inference_config + dataset 的标准 pipeline。本 PR 与 Flux/Wan2.1 Legacy、Hunyuan 解耦,便于分步评审。 依赖:请先合入 sd_refactor_multimodal_sd_core、sd_refactor_legacy_model_adapters(本 PR base 须包含上述提交)。 - 关联issue号(如果有)。 - Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. If possible, please consider writing useful notes for better and faster reviews in your PR. - Please clarify why the changes are needed. For instance, the use case and bug description. - Related issue number (if any) ## 面向用户的变更 (Does this PR introduce _any_ user-facing change)? - 请注意,这里指的是**任何**面向用户的变更,包括但不限于API、用户界面或其他使用方式上的变更。 有(在核心 PR 已合入前提下)。 可通过新 model_type(如 Wan2.2-T2V-A14B、Wan2.2-I2V-A14B、Wan2.2-TI2V-5B)走重构路径:YAML 使用 inference_config + dataset,不再依赖单体 model_config 塞满推理参数。 原 Wan2Point2Adapter Legacy 路径仍可用(model_config + load_pipeline),由量化服务按适配器类型自动分发。 完整配置说明与示例 YAML 在 PR5 文档 PR 合入;本 PR 以代码与 UT 为主。 - Note that it means *any* user-facing change including all aspects such as API, interface or other behavior changes. ## 功能验证 (How was this patch tested?) 请确认CI已通过增量及存量的单元测试用例。 如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤(最好提供完整的可复现的操作路径及关键截图),以便Committer能够快速复现验证,也便于后续的维护。 如果未添加测试,请说明未添加的原因,以及为何难添加测试。 - [_] 功能自验 - [_] 本地自验截图(涉及个人标识符等敏感信息请注意脱敏) - [_] 新增/变更内容是否已新增/适配UT测试用例看护 CI passed with new added/existing test. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. - [_] Self-verification of the feature. - [_] Screenshot of local self-verification (please anonymize any sensitive information such as personal identifiers) - [_] Have new or modified unit test (UT) cases been added or adapted to cover the newly added or changed content? See merge request: Ascend/msmodelslim!4931 天前