Closed aaghawaheed closed 1 day ago
accelerate launch train_background.py \ --pretrained_model_name_or_path=$MODEL_NAME \ --train_text_encoder \ --instance_data_dir=$INSTANCE_DIR \ --output_dir=$OUTPUT_DIR \ --resolution=512 \ --train_batch_size=3 \ --gradient_checkpointing \ --learning_rate=1e-5 \ --lr_scheduler="constant" \ --lr_warmup_steps=500 \ --num_train_epochs=50 \ --with_spatial_loss \ --checkpointing_steps=10000
"I'm encountering an error while running my training script (train_background.py). The error message states:
Traceback (most recent call last): File "train_background.py", line 968, in main(args) File "train_background.py", line 908, in main attn = torch.stack(unet.module.attn_store) # [5, 8*bs, 77, 16, 16] RuntimeError: stack expects a non-empty TensorList Steps: 0%|
If I turn off the with_spatial_loss parameter its working fine.
Hi, it looks like the saliency maps of background images are not correctly processed and resized. Did you preprocess the saliency map correctly based on the provided scripts here?
accelerate launch train_background.py \ --pretrained_model_name_or_path=$MODEL_NAME \ --train_text_encoder \ --instance_data_dir=$INSTANCE_DIR \ --output_dir=$OUTPUT_DIR \ --resolution=512 \ --train_batch_size=3 \ --gradient_checkpointing \ --learning_rate=1e-5 \ --lr_scheduler="constant" \ --lr_warmup_steps=500 \ --num_train_epochs=50 \ --with_spatial_loss \ --checkpointing_steps=10000
"I'm encountering an error while running my training script (train_background.py). The error message states:
Traceback (most recent call last): File "train_background.py", line 968, in main(args) File "train_background.py", line 908, in main attn = torch.stack(unet.module.attn_store) # [5, 8*bs, 77, 16, 16] RuntimeError: stack expects a non-empty TensorList Steps: 0%|
If I turn off the with_spatial_loss parameter its working fine.