文件最后提交记录最后更新时间
!510 【特性】奇虎360 Qihoo-T2X 模型代码 Merge pull request !510 from jingw_caa9/master 1 年前
!510 【特性】奇虎360 Qihoo-T2X 模型代码 Merge pull request !510 from jingw_caa9/master 1 年前
[Docs] Modify current repository URLs to relative paths Co-authored-by: AZe_404<wangze62@h-partners.com> # message auto-generated for no-merge-commit merge: !2360 merge chg_branch_2600 into 26.0.0 [Docs] Modify current repository URLs to relative paths Created-by: AZe_404 Commit-by: AZe_404 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 1. 拉取代码修改为拉取26.0.0分支,包括之前未指定版本的MindSpeed Core 2. 将MM仓库内的链接修改为相对路径访问 ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!23601 个月前
!510 【特性】奇虎360 Qihoo-T2X 模型代码 Merge pull request !510 from jingw_caa9/master 1 年前
!1029 [Refactor]configuration file reconstruction Merge pull request !1029 from chenpeizhe/master 11 个月前
[Docs] Document corrections Co-authored-by: js1234567<jiangshuo9@h-partners.com> # message auto-generated for no-merge-commit merge: !2108 merge master into master [Docs] Document corrections Created-by: js1234567 Commit-by: js1234567 Merged-by: ascend-robot Description: ## Motivation Document corrections: 1. 添加2.3.0配套信息 2. 中英文标点问题 3. 链接版本更新 4. CANN8.5.0版本配置环境变量刷新, 涉及环境变量设置需全面排查修改 ## Modification Readme.md ## Self-test (Optional) If modifications to this PR may cause/fix function/accuracy/performance DTSs/issues, a self-inspection record needs to be attached. ## BC-breaking (Optional) If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR. ## Checklist **Before PR**: - [x] The new code needs to comply with the Clean Code specification. - [x] The PR content is self-checked, and the expression can be clear and the writing standardized **After PR**: - [ ] CLA has been signed and all committers have signed the CLA in this PR. - [ ] The ci-pipeline is passed, Code Check is passed. See merge request: Ascend/MindSpeed-MM!21083 个月前
README.md

Qihoo-T2X 1.0 使用指南

这里是 Qihoo-T2X 官方开源代码仓库

QIHOO-T2X: AN EFFICIENT PROXY-TOKENIZED DIFFUSION TRANSFORMER FOR TEXT-TO-ANY-TASK Jing Wang*, Ao Ma*†, Jiasong Feng*, Dawei Leng‡, Yuhui Yin, Xiaodan Liang‡(*Equal Contribution, †Project Lead, ‡Corresponding Authors)

目录

Prompt: Close-up of a man's face wearing glasses against a colorful background.

Prompt: A dog wearing virtual reality goggles in sunset, 4k, high resolution.


环境安装

1. 仓库拉取

    git clone --branch 26.0.0 https://gitcode.com/Ascend/MindSpeed-MM.git 
    git clone https://github.com/NVIDIA/Megatron-LM.git
    cd Megatron-LM
    git checkout core_r0.8.0
    cp -r megatron ../MindSpeed-MM/
    cd ..
    cd MindSpeed-MM
    mkdir pretrain_models

2. 环境搭建

请参考安装指南

    # python3.10
    conda create -n qihoot2x python=3.10
    conda activate qihoot2x

    # 安装 torch 和 torch_npu,注意要选择对应python版本、x86或arm的torch、torch_npu及apex包
    pip install torch-2.7.1-cp310-cp310-manylinux_2_28_aarch64.whl
    pip install torch_npu-2.7.1*-cp310-cp310-manylinux_2_28_aarch64.whl
    
    # apex for Ascend 参考 https://gitcode.com/Ascend/apex
    # 建议从原仓编译安装

    # 安装加速库
    git clone https://gitcode.com/Ascend/MindSpeed.git
    cd MindSpeed
    git checkout 3f09d6736571cf1e30f8ac97de77982d0ab32cc5
    pip install -r requirements.txt 
    pip3 install -e .
    cd ..

    # 安装其余依赖库
    pip install -e .

3. 权重下载

从Hugging Face库下载对应的模型权重:

将下载的模型权重保存到本地的pretrain_models/qihoo_t2i/XXX.pt目录下。(XXX表示对应的名字)

将下载的模型权重保存到本地的pretrain_models/opensoraplan_vae1_2/目录下。

  • 文本编码器模型地址: T5-XXL (fp16); 将下载的模型权重保存到本地的pretrain_models/text_encoder目录下。

  • tokenizer地址; 将下载的模型权重保存到本地的pretrain_models/tokenizer目录下。

推理

1. 配置参数

  • 将准备好的权重传入到examples/qihoo_t2x/inference_model_image.json中,更改其中的路径,包括from_pretrained。

  • 自定义的prompt可以在examples/qihoo_t2x/demo.txt中修改和添加。

2. 启动推理

i2v 启动推理脚本

sh examples/qihoo_t2x/inference_qihoo.sh

环境变量声明

ASCEND_RT_VISIBLE_DEVICES: 指定NPU设备的索引值
NPUS_PER_NODE: 配置一个计算节点上使用的NPU数量

文献引用

@article{wang2024qihoo,
  title={Qihoo-T2X: An Efficient Proxy-Tokenized Diffusion Transformer for Text-to-Any-Task},
  author={Wang, Jing and Ma, Ao and Feng, Jiasong and Leng, Dawei and Yin, Yuhui and Liang, Xiaodan},
  journal={arXiv preprint arXiv:2409.04005},
  year={2024}
}

许可证

本项目许可遵从以下协议 Apache License (Version 2.0).