Skip to content

when i run train_lcm_distill_lora_sdxl.py, it cause error:'DistributedDataParallel' object has no attribute 'disable_adapters' #6351

@cjt222

Description

@cjt222

Describe the bug

when i run train_lcm_distill_lora_sdxl.py, it cause error:'DistributedDataParallel' object has no attribute 'disable_adapters'

Reproduction

export MODEL_NAME="/home/kas/general_model/diffusers_workspace/text_to_image/cvitai/dreamshaper_xl1.0"
export OUTPUT_DIR="/home/kas/kas_workspace/cjt/save_lcm_sdxl_models"

DATA_DIR="/home/kas/kas_workspace/zijunhuang/other_data/coyo_part4"
VAE_NAME="/home/kas/general_model/diffusers_workspace/train_sd_xl/text2image/projects/llm_text_encoder/sdxl-vae-fp16-fix"
/home/kas/.conda/envs/torch2.0/bin/accelerate launch --mixed_precision="bf16" --multi_gpu --config_file="./distill.yaml" train_lcm_distill_lora_sdxl.py
--pretrained_teacher_model=$MODEL_NAME
--pretrained_vae_model_name_or_path=$VAE_NAME
--output_dir=$OUTPUT_DIR
--train_data_dir=$DATA_DIR
--mixed_precision=bf16
--cache_dir="./cache_dir"
--resolution=1024
--lora_rank=128
--learning_rate=1e-4 --loss_type="huber" --adam_weight_decay=0.0
--max_train_steps=1000000
--max_train_samples=1000000
--dataloader_num_workers=8
--checkpointing_steps=1000 --checkpoints_total_limit=10
--train_batch_size=12
--gradient_checkpointing --enable_xformers_memory_efficient_attention
--gradient_accumulation_steps=1
--use_8bit_adam
--resume_from_checkpoint=latest

Logs

No response

System Info

  • diffusers version: 0.24.0
  • Platform: Linux-5.4.0-48-generic-x86_64-with-glibc2.27
  • Python version: 3.9.17
  • PyTorch version (GPU?): 2.0.1+cu118 (True)
  • Huggingface_hub version: 0.20.1
  • Transformers version: 4.33.0
  • Accelerate version: 0.25.0
  • xFormers version: 0.0.21
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions