Docs:Supplement NPU training script samples and documentation instruction

This commit is contained in:
feng0w0
2025-12-31 10:01:21 +08:00
parent 507e7e5d36
commit 07b1f5702f
3 changed files with 5 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ save_video(video, "video.mp4", fps=15, quality=5)
``` ```
### Training ### Training
NPU startup script samples have been added for each type of model,the scripts are stored in the `examples/xxx/special/npu_scripts`, for examples `examples/wanvideo/model_training/special/npu_scripts/Wan2.2-T2V-A14B-NPU.sh`. NPU startup script samples have been added for each type of model,the scripts are stored in the `examples/xxx/special/npu_scripts`, for example `examples/wanvideo/model_training/special/npu_scripts/Wan2.2-T2V-A14B-NPU.sh`.
In the NPU training scripts, NPU specific environment variables that can optimize performance have been added, and relevant parameters have been enabled for specific models. In the NPU training scripts, NPU specific environment variables that can optimize performance have been added, and relevant parameters have been enabled for specific models.
@@ -79,6 +79,6 @@ Set 0 or not set: indicates not enabling the binding function
2: Indicates enabling fine-grained kernel binding 2: Indicates enabling fine-grained kernel binding
#### Parameters for specific models #### Parameters for specific models
| Model | Parameter | Note | | Model | Parameter | Note |
|-----------|---------------------------|-------------------| |----------------|---------------------------|-------------------|
| Wan 14B系列 | --initialize_model_on_cpu | The 14B model needs to be initialized on the CPU | | Wan 14B series | --initialize_model_on_cpu | The 14B model needs to be initialized on the CPU |

View File

@@ -21,7 +21,7 @@ accelerate launch examples/qwen_image/model_training/train.py \
--task "sft:data_process" --task "sft:data_process"
accelerate launch examples/qwen_image/model_training/train.py \ accelerate launch examples/qwen_image/model_training/train.py \
--dataset_base_path "./models/train/Qwen-Image-LoRA-splited-cache" \ --dataset_base_path "./models/train/Qwen-Image-Edit-2509-LoRA-splited-cache" \
--max_pixels 1048576 \ --max_pixels 1048576 \
--dataset_repeat 50 \ --dataset_repeat 50 \
--model_id_with_origin_paths "Qwen/Qwen-Image-Edit-2509:transformer/diffusion_pytorch_model*.safetensors" \ --model_id_with_origin_paths "Qwen/Qwen-Image-Edit-2509:transformer/diffusion_pytorch_model*.safetensors" \

View File

@@ -1,4 +1,3 @@
# This example is tested on 8*A100
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export CPU_AFFINITY_CONF=1 export CPU_AFFINITY_CONF=1