Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/maxdiffusion/configs/base_flux2klein.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ mask_padding_tokens: True
# in cross attention q.
attention_sharding_uniform: True

flash_block_sizes: {}
flash_block_sizes: {
"block_q": 4608,
"block_kv": 1024,
"block_kv_compute": 1024,
}
ulysses_shards: 2
ulysses_attention_chunks: 1
text_encoder_attention: 'dot_product'
text_encoder_flash_block_sizes: {}
text_encoder_max_layer: 27
# GroupNorm groups
norm_num_groups: 32

Expand Down Expand Up @@ -154,12 +163,12 @@ data_sharding: [['data', 'fsdp', 'context', 'tensor']]
# value to auto-shard based on available slices and devices.
# By default, product of the DCN axes should equal number of slices
# and product of the ICI axes should equal number of devices per slice.
dcn_data_parallelism: 1 # recommended DCN axis to be auto-sharded
dcn_fsdp_parallelism: -1
dcn_data_parallelism: 1
dcn_fsdp_parallelism: 1
dcn_context_parallelism: 1
dcn_tensor_parallelism: 1
ici_data_parallelism: 1
ici_fsdp_parallelism: -1
ici_fsdp_parallelism: 1
ici_context_parallelism: 1
ici_tensor_parallelism: 1

Expand Down Expand Up @@ -203,7 +212,7 @@ num_train_epochs: 1
seed: 0
output_dir: 'output/'
output_name: "flux2klein_generated_image.png"
per_device_batch_size: 1
per_device_batch_size: 1.0

warmup_steps_fraction: 0.1
learning_rate_schedule_steps: -1 # By default the length of the schedule is set to the number of steps.
Expand Down Expand Up @@ -231,6 +240,7 @@ do_classifier_free_guidance: True
guidance_scale: 4.0
guidance_rescale: 0.0
num_inference_steps: 4
num_reps: 1
save_final_checkpoint: False

# SDXL Lightning parameters
Expand Down
20 changes: 15 additions & 5 deletions src/maxdiffusion/configs/base_flux2klein_9B.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ mask_padding_tokens: True
# in cross attention q.
attention_sharding_uniform: True

flash_block_sizes: {}
flash_block_sizes: {
"block_q": 4608,
"block_kv": 1024,
"block_kv_compute": 1024,
}
ulysses_shards: 2
ulysses_attention_chunks: 1
text_encoder_attention: 'dot_product'
text_encoder_flash_block_sizes: {}
text_encoder_max_layer: 27
# GroupNorm groups
norm_num_groups: 32

Expand Down Expand Up @@ -154,12 +163,12 @@ data_sharding: [['data', 'fsdp', 'context', 'tensor']]
# value to auto-shard based on available slices and devices.
# By default, product of the DCN axes should equal number of slices
# and product of the ICI axes should equal number of devices per slice.
dcn_data_parallelism: 1 # recommended DCN axis to be auto-sharded
dcn_fsdp_parallelism: -1
dcn_data_parallelism: 1
dcn_fsdp_parallelism: 1
dcn_context_parallelism: 1
dcn_tensor_parallelism: 1
ici_data_parallelism: 1
ici_fsdp_parallelism: -1 # recommended ICI axis to be auto-sharded
ici_fsdp_parallelism: 1
ici_context_parallelism: 1
ici_tensor_parallelism: 1

Expand Down Expand Up @@ -203,7 +212,7 @@ num_train_epochs: 1
seed: 0
output_dir: 'output/'
output_name: "flux2klein_generated_image.png"
per_device_batch_size: 1
per_device_batch_size: 1.0

warmup_steps_fraction: 0.1
learning_rate_schedule_steps: -1 # By default the length of the schedule is set to the number of steps.
Expand Down Expand Up @@ -231,6 +240,7 @@ do_classifier_free_guidance: True
guidance_scale: 4.0
guidance_rescale: 0.0
num_inference_steps: 4
num_reps: 1
save_final_checkpoint: False

# SDXL Lightning parameters
Expand Down
Loading
Loading