huggingface / huggingface/diffusers

deepspeed train flux1 dreambooth lora can not save model

オープン
#9,393 コメント 21 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
34.5k
フォーク
7.3k
平均マージ
3日 3時間
マージ済み PR(30日)
91

説明

### Describe the bug

when I run the script train_dreambooth_lora_flux.py. It raise ValueError: unexpected save model: . something bug in save_model_hook?
![Uploading image.png…]()

### Reproduction

accelerate launch train_dreambooth_lora_flux_custom.py \
--pretrained_model_name_or_path=$MODEL_NAME \
--instance_data_dir=$INSTANCE_DIR \
--output_dir=$OUTPUT_DIR \
--mixed_precision="bf16" \
--instance_prompt="bedroom, YF_CN style" \
--resolution=1024 \
--train_batch_size=1 \
--guidance_scale=1 \
--gradient_accumulation_steps=4 \
--optimizer="prodigy" \
--learning_rate=1. \
--report_to="tensorboard" \
--lr_scheduler="constant" \
--lr_warmup_steps=0 \
--num_train_epochs=30 \
--validation_prompt="bedroom, YF_CN style" \
--validation_epochs=80 \
--checkpointing_steps=500 \
--seed="0" \
--gradient_checkpointing \
--use_8bit_adam \
--rank=4

### Logs

_No response_

### System Info

torch==2.3.1
accelerate==0.34.2
deepspeed==0.15.1+8ac42ed7
diffusers==0.31.0.dev0

default_config.yaml as follow:

compute_environment: LOCAL_MACHINE
debug: true
deepspeed_config:
gradient_accumulation_steps: 1
gradient_clipping: 1.0
offload_optimizer_device: none
offload_param_device: none
zero3_init_flag: false
zero_stage: 2
distributed_type: DEEPSPEED
downcast_bf16: 'no'
enable_cpu_affinity: false
machine_rank: 0
main_training_function: main
mixed_precision: fp16
num_machines: 1
num_processes: 1
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: fals

### Who can help?

@sayakpaul

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing the command with train_dreambooth_lora_flux.py and the listed Accelerate/DeepSpeed configuration, then inspect the save_model_hook path involved in checkpoint saving. Compare how the DeepSpeedEngine is handled during saving; done means the Flux DreamBooth LoRA training run saves the model without the unexpected save model ValueError.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。