huggingface / huggingface/diffusers

train_dreambooth_lora_flux.py distributed bugs

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

説明

### Describe the bug

AttributeError when running model parallel distributed training with accelerate

### Reproduction

```
accelerate launch --config_file train_dreambooth_lora_flux.py
--resolution=1024
--mixed_precision=bf16
--pretrained_model_name_or_path=black-forest-labels/FLUX.1-dev
--num_validation_images=8
--validation_epochs=100
--rank=16
--train_batch_size=1
--learning_rate=1e-4
--guidance_scale=3.5
--checkpointing_steps=200
--instance_prompt=xyz
--instance_data_dir=xyz
--output_dir=xyz
--logging_dir=xyz
--validation_prompt=xyz
```

accelerate config:
```
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: MULTI_GPU
fsdp_config: {}
machine_rank: 0
main_process_ip: null
main_process_port: null
main_training_function: main
mixed_precision: bf16
num_machines: 1
num_processes: 2
use_cpu: false
gpu_ids: '0, 1'
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
```

### Logs

```shell
if transformer.config.guidance_embeds:

AttributeError: DistributedDataParallel object has no attribute config
```

### System Info

diffusers from source
accelerate==0.33.0
transformers==4.44.1

training on A100s

### Who can help?

_No response_

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

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

調査の方向性

train_dreambooth_lora_flux.py の transformer.config.guidance_embeds のチェックから開始し、指定された2 GPU構成を使って accelerate launch でコマンドを再現します。分散トレーニング中に transformer がどのようにラップされるかを追跡し、スクリプトが DistributedDataParallel config AttributeError なしで完了することを確認します。

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

評価

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

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

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