Download examples/flux/model_training/special/npu_training/FLUX.1-dev-NPU.sh from ymyy307/diffsynth: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/ymyy307/diffsynth/resolve/171f557c1e6943cf3c6d69d33374c220c0cece82/examples/flux/model_training/special/npu_training/FLUX.1-dev-NPU.sh
- Command line
-
hf download hf://ymyy307/diffsynth@171f557c1e6943cf3c6d69d33374c220c0cece82/examples/flux/model_training/special/npu_training/FLUX.1-dev-NPU.sh
-
curl -L -o FLUX.1-dev-NPU.sh https://huggingface.co/ymyy307/diffsynth/resolve/171f557c1e6943cf3c6d69d33374c220c0cece82/examples/flux/model_training/special/npu_training/FLUX.1-dev-NPU.sh
1.03 kB
| export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True | |
| export CPU_AFFINITY_CONF=1 | |
| modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "flux/FLUX.1-dev/*" --local_dir ./data/diffsynth_example_dataset | |
| accelerate launch --config_file examples/flux/model_training/full/accelerate_config_zero2offload.yaml examples/flux/model_training/train.py \ | |
| --dataset_base_path data/diffsynth_example_dataset/flux/FLUX.1-dev \ | |
| --dataset_metadata_path data/diffsynth_example_dataset/flux/FLUX.1-dev/metadata.csv \ | |
| --max_pixels 1048576 \ | |
| --dataset_repeat 400 \ | |
| --model_id_with_origin_paths "black-forest-labs/FLUX.1-dev:flux1-dev.safetensors,black-forest-labs/FLUX.1-dev:text_encoder/model.safetensors,black-forest-labs/FLUX.1-dev:text_encoder_2/*.safetensors,black-forest-labs/FLUX.1-dev:ae.safetensors" \ | |
| --learning_rate 1e-5 \ | |
| --num_epochs 1 \ | |
| --remove_prefix_in_ckpt "pipe.dit." \ | |
| --output_path "./models/train/FLUX.1-dev_full" \ | |
| --trainable_models "dit" \ | |
| --use_gradient_checkpointing | |