Spaces:
Running
on
A100
Running
on
A100
File size: 2,630 Bytes
43c5292 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# Download the pretrained checkpoints:
First, make sure you have installed the huggingface CLI and modelscope CLI.
```bash
pip install -U "huggingface_hub[cli]"
pip install modelscope
```
### Download the pretrained DiT and VAE checkpoints:
```bash
hf download tencent/HunyuanImage-2.1 --local-dir ./ckpts
```
### Downloading TextEncoders
HunyuanImage uses an MLLM and a byT5 as text encoders.
* **MLLM**
HunyuanImage can be integrated with different MLLMs (including HunyuanMLLM and other open-source MLLM models).
At this stage, we have not yet released the latest HunyuanMLLM. We recommend the users in community to use an open-source alternative, such as Qwen2.5-VL-7B-Instruct provided by Qwen Team, which can be downloaded by the following command:
```bash
hf download Qwen/Qwen2.5-VL-7B-Instruct --local-dir ./ckpts/text_encoder/llm
```
* **ByT5 encoder**
We use [Glyph-SDXL-v2](https://modelscope.cn/models/AI-ModelScope/Glyph-SDXL-v2) as our [byT5](https://github.com/google-research/byt5) encoder, which can be downloaded by the following command:
```bash
hf download google/byt5-small --local-dir ./ckpts/text_encoder/byt5-small
modelscope download --model AI-ModelScope/Glyph-SDXL-v2 --local_dir ./ckpts/text_encoder/Glyph-SDXL-v2
```
You can also manually download the checkpoints from [here](https://modelscope.cn/models/AI-ModelScope/Glyph-SDXL-v2/files) and place them in the text_encoder folder like:
```
ckpts
βββ text_encoder
βΒ Β βββ Glyph-SDXL-v2
βΒ Β βΒ Β βββ assets
βΒ Β βΒ Β βΒ Β βββ color_idx.json
βΒ Β βΒ Β βΒ Β βββ multilingual_10-lang_idx.json
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ checkpoints
βΒ Β βΒ Β Β Β βββ byt5_model.pt
βΒ Β βΒ Β βββ ...
β ββ ...
ββ ...
```
<details>
<summary>π‘Tips for using hf/huggingface-cli (network problem)</summary>
##### 1. Using HF-Mirror
If you encounter slow download speeds in China, you can try a mirror to speed up the download process:
```shell
HF_ENDPOINT=https://hf-mirror.com hf download tencent/HunyuanImage-2.1 --local-dir ./ckpts
```
##### 2. Resume Download
`huggingface-cli` supports resuming downloads. If the download is interrupted, you can just rerun the download
command to resume the download process.
Note: If an `No such file or directory: 'ckpts/.huggingface/.gitignore.lock'` like error occurs during the download
process, you can ignore the error and rerun the download command.
</details>
|