aigc-apps / aigc-apps/VideoX-Fun

Resolving OOM Issues in train_control.py on 4 A100 GPUs (80GB Each)

Open
#102 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
188
Avg merge
2d 22h
Merged PRs (30d)
3

Description

My settings are as follows. Is there any way to reduce OOM (Out of Memory) issues?
CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch --main_process_ip=10.140.37.162 --main_process_port=12345 --num_machines=1 --num_processes=4 --machine_rank=0 scripts/train_control.py
--pretrained_model_name_or_path=$MODEL_NAME
--train_data_dir=$DATASET_NAME
--train_data_meta=$DATASET_META_NAME
--image_sample_size=1024
--video_sample_size=256
--token_sample_size=512
--video_sample_stride=3
--video_sample_n_frames=49
--train_batch_size=1
--video_repeat=1
--gradient_accumulation_steps=4
--dataloader_num_workers=1
--num_train_epochs=100
--checkpointing_steps=50
--learning_rate=2e-05
--lr_scheduler="constant_with_warmup"
--lr_warmup_steps=50
--seed=43
--output_dir="output_dir"
--gradient_checkpointing
--mixed_precision="bf16"
--adam_weight_decay=3e-2
--adam_epsilon=1e-10
--vae_mini_batch=1
--max_grad_norm=0.05
--random_hw_adapt
--training_with_video_token_length
--enable_bucket
--trainable_modules "."

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/train_control.py and the supplied accelerate launch command; reproduce the OOM with the listed four-GPU settings and trace which training configuration triggers it. Done means documenting or implementing a confirmed way to avoid the OOM, with a successful run using the same setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.