当前位置: 首页 > news >正文

腾讯混元-DiT 文生图

1

混元-DiT所需的模型大小一共是41G

https://huggingface.co/Tencent-Hunyuan/HunyuanDiT

https://colab.research.google.com/

HunyuanDiT_jupyter.ipynb

%cd /content
!GIT_LFS_SKIP_SMUDGE=1 git clone -b dev https://github.com/camenduru/HunyuanDiT
%cd /content/HunyuanDiT!pip install gradio==4.31.0 loguru==0.7.2 diffusers==0.21.2 timm==0.9.5 einops==0.7.0 accelerate==0.29.3!apt -y install -qq aria2
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/clip_text_encoder/config.json -d /content/HunyuanDiT/ckpts/t2i/clip_text_encoder -o config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/clip_text_encoder/pytorch_model.bin -d /content/HunyuanDiT/ckpts/t2i/clip_text_encoder -o pytorch_model.bin
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/model/pytorch_model_ema.pt -d /content/HunyuanDiT/ckpts/t2i/model -o pytorch_model_ema.pt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/model/pytorch_model_module.pt -d /content/HunyuanDiT/ckpts/t2i/model -o pytorch_model_module.pt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/mt5/config.json -d /content/HunyuanDiT/ckpts/t2i/mt5 -o config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/mt5/generation_config.json -d /content/HunyuanDiT/ckpts/t2i/mt5 -o generation_config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/mt5/pytorch_model.bin -d /content/HunyuanDiT/ckpts/t2i/mt5 -o pytorch_model.bin
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/mt5/special_tokens_map.json -d /content/HunyuanDiT/ckpts/t2i/mt5 -o special_tokens_map.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/mt5/spiece.model -d /content/HunyuanDiT/ckpts/t2i/mt5 -o spiece.model
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/mt5/tokenizer_config.json -d /content/HunyuanDiT/ckpts/t2i/mt5 -o tokenizer_config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/sdxl-vae-fp16-fix/config.json -d /content/HunyuanDiT/ckpts/t2i/sdxl-vae-fp16-fix -o config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/sdxl-vae-fp16-fix/diffusion_pytorch_model.bin -d /content/HunyuanDiT/ckpts/t2i/sdxl-vae-fp16-fix -o diffusion_pytorch_model.bin
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/resolve/main/t2i/sdxl-vae-fp16-fix/diffusion_pytorch_model.safetensors -d /content/HunyuanDiT/ckpts/t2i/sdxl-vae-fp16-fix -o diffusion_pytorch_model.safetensors
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/tokenizer/special_tokens_map.json -d /content/HunyuanDiT/ckpts/t2i/tokenizer -o special_tokens_map.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/tokenizer/tokenizer_config.json -d /content/HunyuanDiT/ckpts/t2i/tokenizer -o tokenizer_config.json
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/tokenizer/vocab.txt -d /content/HunyuanDiT/ckpts/t2i/tokenizer -o vocab.txt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Tencent-Hunyuan/HunyuanDiT/raw/main/t2i/tokenizer/vocab_org.txt -d /content/HunyuanDiT/ckpts/t2i/tokenizer -o vocab_org.txt!python app/hydit_app.py --no-enhance --lang en
!pip install huggingface-hub==0.25.2
%cd /content/HunyuanDiT
!pip uninstall deepspeed transformers accelerate -y  
!pip install -r requirements.txt  
!pip install transformers==4.37.2 accelerate==0.28.0 deepspeed==0.14.4 
!python app/hydit_app.py --no-enhance --lang zh

报错一直无法解决

1

!pip install huggingface-hub==0.25.2
!pip install pydantic==2.10.6
!pip install --upgrade gradio==4.44.1%cd /content/HunyuanDiT
!python app/hydit_app.py --no-enhance --lang zh

https://huggingface.co/spaces/datxy/HunyuanDiT

http://www.xdnf.cn/news/266635.html

相关文章:

  • Vue 3 Element Plus 浏览器使用例子
  • dstack 是 Kubernetes 和 Slurm 的开源替代方案,旨在简化 ML 团队跨顶级云、本地集群和加速器的 GPU 分配和 AI 工作负载编排
  • 大数据引领行业革命:深度解析与未来趋势
  • 接口测试——HTTP状态码
  • bellard.org‌ : QuickJS 如何使用 qjs 执行 js 脚本
  • 施磊老师rpc(三)
  • Docker安装Ollama及使用Ollama部署大模型
  • 二极管反向恢复的定义和原理
  • SQL语句--postgis语句(矢量数据的定义与操作)
  • REINFORCE蒙特卡罗策略梯度算法详解:python从零实现
  • STM32 DMA直接存储器存取
  • 解码响应式 Web 设计:原理、技术与优劣势全解析
  • C++代码随想录刷题知识分享-----142.环形链表II
  • 希洛激活器策略思路
  • n8n工作流自动化平台的实操:Cannot find module ‘iconv-lite‘
  • 生成式 AI 与 AI 的区别
  • DeepSeek实战--LLM微调
  • LeetCode算法题 (设计链表)Day16!!!C/C++
  • 「Mac畅玩AIGC与多模态16」开发篇12 - 多节点串联与输出合并的工作流示例
  • ipvsadm,是一个什么工具?
  • 中国 AIGC 确权革命:“AI 创意・中国” 平台上线,存证成本降至 0.1 元 / 件
  • CAN网桥中继隔离抗干扰集线器重映射一进一出CAN扩展CAN Bridge
  • 在Java项目中实现本地语音识别与热点检测,并集成阿里云智能语音服务
  • Dubbo(92)如何在微服务架构中应用Dubbo?
  • 深入理解C++类型转换:从基础到高级应用
  • 糖尿病筛查常识---秋浦四郎
  • 计网_可靠传输ARQ机制
  • neo4j初尝试
  • Java从入门到精通 - Java语法
  • C++ 简单工厂模式详解