thu / trainSD3 /trainSD3.sh
housearch's picture
Upload 3 files
7a408b6 verified
#使用 bash指令執行這個腳本 ---> bash trainSD3.sh
#!/bin/bash
cd /workspace
wget --trust-server-name --content-disposition https://huggingface.co/housearch/thu/resolve/main/trainSD3/download_caption_sd3.py
wget --trust-server-name --content-disposition https://huggingface.co/housearch/thu/resolve/main/trainSD3/landscapeOverhead_A6000_sd3.json
python -m venv env
source /workspace/env/bin/activate
pip install datasets huggingface_hub Pillow
python download_caption_sd3.py
deactivate
cd /workspace
git clone https://github.com/bmaltais/kohya_ss
cd kohya_ss
#預設是訓練SD1.5, SDXL的版本,如果要訓練SD3, Flux 必須切換至sd3-flux.1
git branch -a
git checkout sd3-flux.1
./setup-runpod.sh
./gui.sh --share --headless
'''
另開 terminal 視窗,把以下內容貼上並按下enter執行,直接下載訓練Flux LoRA必須的相關模型(節省時間)
cd /workspace
wget --trust-server-name --content-disposition https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/resolve/dff185441d61601155591a46f691d7f73151acdd/sd3.5_large.safetensors
wget --trust-server-name --content-disposition https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/resolve/dff185441d61601155591a46f691d7f73151acdd/t5xxl_fp16.safetensors
wget --trust-server-name --content-disposition https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/resolve/dff185441d61601155591a46f691d7f73151acdd/clip_l.safetensors
wget --trust-server-name --content-disposition https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/resolve/dff185441d61601155591a46f691d7f73151acdd/clip_g.safetensors
'''
#./gui.sh --share --headless --config "/workspace/config.toml"