add docs.
This commit is contained in:
Qianyi Zhao
2024-09-10 18:46:24 +08:00
committed by GitHub
parent 0b9e673fa2
commit 7f6e35fe35
32 changed files with 1622 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# 下载模型
下载预设模型模型ID可参考 [config file](/diffsynth/configs/model_config.py).
```python
from diffsynth import download_models
download_models(["FLUX.1-dev", "Kolors"])
```
下载非预设模型,可以选择 [ModelScope](https://modelscope.cn/models) 和 [HuggingFace](https://huggingface.co/models) 两个下载源中的模型。
```python
from diffsynth.models.downloader import download_from_huggingface, download_from_modelscope
# From Modelscope (recommended)
download_from_modelscope("Kwai-Kolors/Kolors", "vae/diffusion_pytorch_model.fp16.bin", "models/kolors/Kolors/vae")
# From Huggingface
download_from_huggingface("Kwai-Kolors/Kolors", "vae/diffusion_pytorch_model.fp16.safetensors", "models/kolors/Kolors/vae")
```