Skip to content

Feature/cosmos3 patch - #19

Open
iMountTai wants to merge 16 commits into
HYGON-AI:mainfrom
iMountTai:feature/cosmos3-patch
Open

iMountTai wants to merge 16 commits into
HYGON-AI:mainfrom
iMountTai:feature/cosmos3-patch

Conversation

@iMountTai

@iMountTai iMountTai commented Oct 8, 2026 •

Copy link
Copy Markdown

Summary

Provide a standalone Cosmos3 source patch for HCU training and local-asset inference through native Cosmos entrypoints.

Changes

  • Add HCU compatibility and optimizations for Generator, Action Policy, and Reasoner, with validation status documented by task.
  • Optimize VAE encoding, data loading, FSDP communication, and checkpoint I/O.
  • Keep Transformers Qwen3-VL models and apply targeted optimizations only to HCU instances.
  • Add local-asset inference support and official DROID perf64 preparation.
  • Provide README training commands, dependency pins, and complete source attribution.

iMountTai and others added 6 commits September 29, 2026 09:41
…pliance

- Move cosmos patch from patches/cosmos3/ to model_examples/Cosmos3/cosmos-framework.patch
- Add model_examples/Cosmos3/requirements.txt
- Remove custom export/apply patch tools, manifest, and standalone licenses
- Update README.md with standard git apply usage
- Update THIRD_PARTY_NOTICES.md with provenance of substantive changes
…in turbo_physai

- Remove turbo_physai/bootstrap/_toml.py
- Revert sitecustomize.py to remove ensure_tomllib hook
- Remove unused tomli dependency from setup.py
@iMountTai
iMountTai marked this pull request as ready for review October 9, 2026 08:02

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 为 model_examples/Cosmos3/*.patch 设置 -text -whitespace 属性以保留补丁原始字节,并在第三方声明文档中新增 Cosmos3 (OpenMDW-1.1) 许可说明及补丁所涉上游文件清单。
  • 新增 Cosmos3 模型示例的 README 运行指南,说明容器创建、应用 cosmos-framework 补丁、数据与权重准备,并通过 torchrun 以 8 卡执行 Generator Nano 训练的完整步骤。
  • 新增 Cosmos3 模型示例 README,提供 Action Policy(DROID)与 Reasoner(VideoPhy2、LLaVA-OV)SFT 训练的 torchrun 示例命令、性能与编译相关参数设置及运行说明
  • 为 Cosmos3 模型示例新增 requirements.txt,包含固定版本的推理与数据处理依赖及若干未固定版本的补充依赖。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9352/-0 —
model_examples/Cosmos3/README.md 新增 · +207/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:6 个文件,+9688/-3。
  • 覆盖情况:共 6 个文件,已完整审查 5 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。
CI 结果:质量门禁未通过

质量门禁检测到需处理的问题;敏感命中原文、字段值、路径和日志引用不在评论中展示,请由有权限的维护者查看原始报告并处理。

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

已确认 1 个问题,其中 1 个已添加到对应代码行。

变更概览

本次变更主要包含:

  • 本批为 model_examples/Cosmos3 下的 .patch 文件配置 Git 属性以保留原始字节(禁用文本转换与空白处理),并在第三方声明文档中补充 Cosmos3(OpenMDW-1.1)的来源仓库、固定 commit 及补丁涉及的文件清单。
  • 新增 Cosmos3 在 HCU 上运行的完整指南:容器环境准备、cosmos-framework 补丁应用与回滚、Generator/Action Policy/Reasoner 三个训练场景的 torchrun 启动命令,以及配套的固定版本依赖清单。
  • 将 setup.py 中的版本解析入口由 pkg_resources 暴露的 packaging 迁移为直接导入 packaging.version 模块,调用点同步改为 packaging_version.parse。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/README.md 新增 · +207/-0 P3 × 1
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9352/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:6 个文件,+9688/-3。
  • 覆盖情况:共 6 个文件,已完整审查 5 个。
  • 候选问题:1 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。
提交修复并推送新 commit 后,将自动审查 PR 的最新版本。

Comment thread model_examples/Cosmos3/README.md Resolved

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 为 model_examples/Cosmos3 下的 Git patch 文件添加 .gitattributes 规则(禁用文本与空白转换以保留补丁字节),并在第三方声明文档中补充 Cosmos3 (OpenMDW-1.1) 的来源、许可及补丁对应上游文件清单。
  • 新增 Cosmos3 HCU 训练运行指南 README,涵盖容器部署、补丁应用/回滚、数据与权重下载及 Generator/Action Policy/Reasoner 的启动命令
  • 新增 model_examples/Cosmos3/requirements.txt,固定训练依赖版本并附加若干未固定版本的补充依赖
  • setup.py 中将 packaging 的导入从 pkg_resources 的内嵌版本改为直接导入独立的 packaging 库,并同步更新版本比较调用,以兼容新版 setuptools。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9352/-0 —
model_examples/Cosmos3/README.md 新增 · +207/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:6 个文件,+9688/-3。
  • 覆盖情况:共 6 个文件,已完整审查 5 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@yh-vino yh-vino left a comment

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.

需要在模型清单中增加该模型支持,并按照原文档方式做超链接,链接模型readme.md

@iMountTai

Copy link
Copy Markdown
Author

需要在模型清单中增加该模型支持,并按照原文档方式做超链接,链接模型readme.md

已添加。

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 在 .gitattributes 中对 model_examples/Cosmos3 下的补丁文件禁用文本与空白规范化,保证补丁字节完整性。
  • 新增 Cosmos3(OpenMDW-1.1)第三方声明及其上游文件改动清单,并在支持模型列表登记 Cosmos3,注明指定基线 `9726697a83315540c6885baefd2fe353d9c74920` 与使用说明入口。
  • 新增 Cosmos3 在 HCU 上的运行指南与依赖清单:包含镜像/容器准备、cosmos-framework 补丁的 aplicar与回滚步骤、数据及权重下载,以及 Generator、Action Policy、Reasoner 等任务的 torchrun 启动示例和 pinned 依赖列表。
  • 将 setup.py 中对 pkg_resources 内置 packaging 的导入替换为直接使用独立 packaging 包,并相应更新构建脚本中 CUDA 版本解析的两处调用。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9352/-0 —
model_examples/Cosmos3/README.md 新增 · +207/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:7 个文件,+9691/-3。
  • 覆盖情况:共 7 个文件,已完整审查 6 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@yh-vino yh-vino left a comment •

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.

补丁新增的 inputs/prompt_upsampler/image_inputs/robot_153.jpg 只是一个 Git LFS 指针,上游 LFS 服务器上没有对应对象。在默认配置的 git-lfs 环境中执行 README 的 git apply,会在写这张图时以退出码 128 失败。此时 92 个文件中前 84 个已被修改,后 8 个未修改,若不使用git-lfs可以全部应用,但是补丁图片仍然只是指针,该图片是否对训推有影响?

Comment thread model_examples/Cosmos3/README.md Resolved
Comment thread model_examples/Cosmos3/README.md Resolved
Comment thread model_examples/Cosmos3/README.md Resolved
Comment thread model_examples/Cosmos3/README.md Resolved
Comment thread model_examples/Cosmos3/README.md Resolved
Comment thread model_examples/Cosmos3/README.md Resolved

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 本次批改为 Cosmos3 补丁分发做基础登记:在 .gitattributes 中对 model_examples/Cosmos3/*.patch 禁用文本换行转换与空白检查,并在第三方声明文档中登记 Cosmos3 补丁来源(OpenMDW-1.1、固定基线提交及映射文件清单)。
  • 在中文支持列表文档的已支持模型表中新增 Cosmos3 条目,标注 Generator/Action Policy/Reasoner 方式、基线提交及指向模型使用说明的链接,基线提交与第三方声明中登记的固定提交一致。
  • 新增 Cosmos3 在 HCU 上的运行指南文档,覆盖环境准备、补丁应用与回滚、数据/权重下载路径设置,以及 Generator Nano、Action Policy、Reasoner(VideoPhy2/LLaVA-OV)四类训练场景的 torchrun 启动命令与运行注意事项。
  • 新增 Cosmos3 HCU 示例的依赖清单 requirements.txt,固定主要依赖版本并附带部分未固定条目。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9343/-0 —
model_examples/Cosmos3/README.md 新增 · +222/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:7 个文件,+9697/-3。
  • 覆盖情况:共 7 个文件,已完整审查 6 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 在支持列表与第三方声明中新增 Cosmos3:通过独立源码补丁(基于 cosmos-framework 固定基线提交)提供支持,走 Cosmos 原生训练入口;两处文档的基线提交一致。
  • 新增 .gitattributes 规则,对 model_examples/Cosmos3 下的 patch 文件禁用文本转换与空白处理,保证补丁字节在 Git 检出/提交时不被破坏。
  • 新增 Cosmos3 在 HCU 上的训练运行指南,涵盖容器环境准备、补丁应用与回滚、依赖安装、数据与权重路径配置,以及 Generator、Action Policy、Reasoner 的 8 卡 torchrun 启动命令和可选快速验证数据获取步骤
  • 新增 Cosmos3 HCU 示例的运行说明文档与依赖清单,并将 setup.py 的版本解析从 pkg_resources 内置 packaging 改为使用独立 packaging 包的 version.parse。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9343/-0 —
model_examples/Cosmos3/README.md 新增 · +233/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:7 个文件,+9708/-3。
  • 覆盖情况:共 7 个文件,已完整审查 6 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 登记 Cosmos3 模型支持:在支持列表新增 Cosmos3 条目并指向使用说明,补充 OpenMDW-1.1 第三方许可声明及补丁覆盖文件清单,并配置 .gitattributes 使 Cosmos3 补丁文件保留原始字节、不做文本规范化。
  • 新增 model_examples/Cosmos3/README.md,提供在 HCU 上基于原生 cosmos-framework 运行 Generator Nano、Action Policy、Reasoner 训练的环境准备、补丁应用、依赖安装、数据权重路径设置及 70 步快速验证命令。
  • 新增 Cosmos3 HCU 运行说明文档与依赖清单,并将 setup.py 的版本解析从 pkg_resources 迁移到独立 packaging 库调用。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9121/-0 —
model_examples/Cosmos3/README.md 新增 · +233/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:7 个文件,+9486/-3。
  • 覆盖情况:共 7 个文件,已完整审查 6 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

Comment thread model_examples/Cosmos3/README.md Resolved

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 本批为 Cosmos3 补丁支持补充元数据与文档:通过 .gitattributes 对 Cosmos3 目录下的补丁文件禁用文本与空白处理,在第三方声明中登记 cosmos-framework 的 OpenMDW-1.1 来源、基线提交与受影响文件清单,并在模型支持列表中新增 Cosmos3 条目。
  • 新增 model_examples/Cosmos3/README.md,提供在 cosmos-framework 上应用 Cosmos3 补丁后、使用 torchrun 直接启动 Generator Nano、Action Policy 与 Reasoner 训练的 HCU 运行指南,涵盖环境容器准备、依赖安装、数据与权重准备及 Action Policy perf64 快速验证步骤。
  • 新增 Cosmos3 模型示例的 README 运行说明与依赖清单文件。
  • 修改 setup.py,将 pkg_resources 中导入 packaging 改为直接使用 packaging.version,用于 CUDA 版本比较逻辑。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +9121/-0 —
model_examples/Cosmos3/README.md 新增 · +224/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +82/-0 —
THIRD_PARTY_NOTICES.md 修改 · +42/-0 —
setup.py 修改 · +3/-3 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:7 个文件,+9477/-3。
  • 覆盖情况:共 7 个文件,已完整审查 6 个。
  • 候选问题:0 项;证据复核过滤:0 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@yh-vino yh-vino left a comment

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.

PR 描述需要更新:补丁校验、应用、验证和回滚工具已经在 97db666 删掉了,推理适配也没写进去。

Comment thread docs/zh/models/support_list.md Resolved
Comment thread THIRD_PARTY_NOTICES.md Resolved
Comment thread setup.py Resolved
Comment thread model_examples/Cosmos3/requirements.txt Resolved

@hygon-ai-reviewer hygon-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AI Review

⚪ 审查未完成

部分内容未完成审查,当前结论不代表全部改动。

变更概览

本次变更主要包含:

  • 本批为 Cosmos3 第三方代码添加 OpenMDW-1.1 许可声明与文件清单,并在 .gitattributes 中对 Cosmos3 补丁文件设置 -text -whitespace 以保留补丁原始字节。
  • 在模型支持列表 docs/zh/models/support_list.md 中新增 Cosmos3 条目,标注 Generator Nano 已验证、Action Policy 与 Reasoner 待验证,并链接到模型使用说明。
  • 在 THIRD_PARTY_NOTICES.md 中补充 qwen3_vl_hcu.py 源自 Transformers Qwen3-VL(Apache-2.0)的第三方许可证归属与版权保留说明。
  • 新增 Cosmos3 模型的 HCU 运行指南,提供镜像与容器准备、补丁应用、依赖安装及基于 torchrun 的 8 卡训练启动步骤。
文件审查摘要
文件 变更 审查结果
model_examples/Cosmos3/cosmos-framework.patch 新增 · +8622/-0 —
model_examples/Cosmos3/README.md 新增 · +225/-0 —
THIRD_PARTY_NOTICES.md 修改 · +99/-0 —
model_examples/Cosmos3/requirements.txt 新增 · +81/-0 —
docs/zh/models/support_list.md 修改 · +3/-0 —
.gitattributes 修改 · +2/-0 —
审查信息
  • 变更统计:6 个文件,+9032/-0。
  • 覆盖情况:共 6 个文件,已完整审查 5 个。
  • 候选问题:1 项;证据复核过滤:1 项;发布前敏感信息保护:0 项。
  • 本服务以 GitHub 提供的 PR diff 为审查主体,PR 描述与按相关性选取的仓库片段仅用于核验;未执行代码或重跑测试,结论仍需维护者核验。

@iMountTai

Copy link
Copy Markdown
Author

针对 PR 描述的意见,已同步更新正文:移除已删除的补丁校验、应用、验证和回滚工具说明,补充本地资产推理适配、官方 DROID perf64 准备,以及当前优化与文档范围。

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.

2 participants