Skip to content

Commit 9a24fe0

Browse files
committed
update
1 parent c351769 commit 9a24fe0

10 files changed

Lines changed: 10 additions & 11 deletions

examples/OmniGen2-RL/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ We provide ready-to-use scripts to perform a full Best-of-N workflow on the GEdi
2626

2727
**1.Generate Candidates**
2828
```bash
29-
bash evaluation/GEdit-Bench/omnigen2_16samples.sh
29+
bash evaluation/GEdit-Bench/omnigen2_16samples.sh # default using 8 GPUs
3030
```
3131

3232
> **⚠️ Important Note on Resource Usage**
@@ -47,7 +47,6 @@ bash evaluation/GEdit-Bench/omnigen2_16samples.sh --world_size 4 --rank 1
4747
# ...and so on for ranks 2 and 3.
4848
```
4949

50-
- **GPU Configuration**: You can adjust the number of GPUs used per machine by modifying the num_gpus_per_machine variable inside the script.
5150
- **Monitoring Progress**: The scripts utilize nohup for background execution. We recommend monitoring the file (specified in the script file) to track the status and progress of the generation process.
5251

5352
**2.Score and Select**

examples/OmniGen2-RL/evaluation/GEdit-Bench/flux_kontext_dev_16samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/flux_kontext_dev_16samples_select_best_editscore_pass1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/flux_kontext_dev_16samples_select_best_editscore_pass4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/omnigen2_16samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4646
global_shift_index=0
4747
total_num_images=606
4848

49-
num_gpus_per_machine=8
49+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
5050
# Calculate images per machine, rounding up to ensure all data is covered
5151
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
5252
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/omnigen2_16samples_select_best_editscore_pass1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/omnigen2_16samples_select_best_editscore_pass4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/qwen_image_16samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/qwen_image_16samples_select_best_editscore_pass1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

examples/OmniGen2-RL/evaluation/GEdit-Bench/qwen_image_16samples_select_best_editscore_pass4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ echo "WORLD_SIZE: $WORLD_SIZE"
4343
global_shift_index=0
4444
total_num_images=606
4545

46-
num_gpus_per_machine=8
46+
num_gpus_per_machine=$(python -c "import torch; print(torch.cuda.device_count())")
4747
# Calculate images per machine, rounding up to ensure all data is covered
4848
num_images_per_machine=$(( (total_num_images + WORLD_SIZE - 1) / WORLD_SIZE ))
4949
shift_index=$((RANK * num_images_per_machine))

0 commit comments

Comments
 (0)