当前位置: 首页 > 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

相关文章:

  • 基于Jenkins的DevOps工程实践之Jenkins共享库
  • Python 数据智能实战 (10):智能商品推荐 - LLM “猜你喜欢”
  • ES6语法
  • 驱动精灵v9.7(含网卡版)驱动工具软件下载及安装教程
  • MySQL 日期加减函数详解
  • 进程间通信(IPC)
  • sql 注入中的万能密码
  • iOS启动优化:从原理到实践
  • ActiveMQ 集群搭建与高可用方案设计(二)
  • 大数据:数字时代的驱动力
  • 数据库原理与应用实验二 题目七
  • Oracle 11g通过dg4odbc配置dblink连接神通数据库
  • 前端面试每日三题 - Day 23
  • 多数据源动态切换
  • HTML简介
  • ​​信息泄露:网站敏感文件泄漏的隐形危机与防御之道​
  • 高性能架构设计-高可用
  • 专为焦油介质打造:煤焦油专用气动硬密封调节 V 型球阀(带手动)的卓越特点-耀圣
  • C#VisionMaster算子二次开发(非方案版)
  • 在Java项目中实现本地语音识别与热点检测,并集成阿里云智能语音服务
  • 央行:增加科技创新和技术改造再贷款额度3000亿元
  • 关税风暴下,3G资本拟94亿美元私有化美国鞋履巨头斯凯奇,溢价30%
  • 体坛联播|国米淘汰巴萨晋级欧冠决赛,申花击败梅州避免连败
  • 上海市政府常务会议部署提升入境旅游公共服务水平,让国际友人“无障碍”畅游上海
  • A股高开高走,三大股指涨超1.1%:两市成交1.3万亿元,近5000股收涨
  • “两高”出台司法解释,严打破坏黑土地资源犯罪