@@ -33,7 +33,7 @@ t5xxl_model_name_or_path: 'ariG23498/t5-v1-1-xxl-flax'
3333
3434# Flux params
3535flux_name : " flux-dev"
36- max_sequence_length : 512
36+ max_sequence_length : 256
3737time_shift : True
3838base_shift : 0.5
3939max_shift : 1.15
@@ -62,30 +62,31 @@ jit_initializers: True
6262# Set true to load weights from pytorch
6363from_pt : True
6464split_head_dim : True
65- attention : ' flash ' # Supported attention: dot_product, flash, cudnn_flash_te
66- use_base2_exp : False
67- use_experimental_scheduler : False
65+ attention : ' ulysses_custom_fixed_m ' # Supported attention: dot_product, flash, cudnn_flash_te, ulysses_custom_fixed_m
66+ use_base2_exp : True
67+ use_experimental_scheduler : True
6868# If mask_padding_tokens is True, we pass in segment ids to splash attention to avoid attending to padding tokens.
6969# Else we do not pass in segment ids and on vpu bound hardware like trillium this is faster.
7070# However, when padding tokens are significant, this will lead to worse quality and should be set to True.
71- mask_padding_tokens : True
71+ mask_padding_tokens : False
7272# Maxdiffusion has 2 types of attention sharding strategies:
7373# 1. attention_sharding_uniform = True : same sequence sharding rules applied for q in both (self and cross attention)
7474# 2. attention_sharding_uniform = False : Heads are sharded uniformly across devices for self attention while sequence is sharded
7575# in cross attention q.
7676attention_sharding_uniform : True
7777
78- # flash_block_sizes: {}
7978# Use the following flash_block_sizes on v6e (Trillium) due to larger vmem.
8079flash_block_sizes : {
81- " block_q" : 1536,
82- " block_kv_compute" : 1536,
83- " block_kv" : 1536,
84- " block_q_dkv" : 1536,
85- " block_kv_dkv" : 1536,
86- " block_kv_dkv_compute" : 1536,
87- " block_q_dq" : 1536,
88- " block_kv_dq" : 1536
80+ " block_q" : 4864,
81+ " block_kv_compute" : 1024,
82+ " block_kv" : 1024,
83+ " block_kv_compute_in" : 1024,
84+ " heads_per_tile" : 3,
85+ " block_q_dkv" : 4864,
86+ " block_kv_dkv" : 1024,
87+ " block_kv_dkv_compute" : 1024,
88+ " block_q_dq" : 4864,
89+ " block_kv_dq" : 1024
8990}
9091# GroupNorm groups
9192norm_num_groups : 32
@@ -162,7 +163,7 @@ logical_axis_rules: [
162163 ['out_channels', 'tensor'],
163164 ['conv_out', 'fsdp'],
164165 ]
165- data_sharding : [['data', 'fsdp', 'context', 'tensor' ]]
166+ data_sharding : [['data', 'fsdp']]
166167
167168# One axis for each parallelism type may hold a placeholder (-1)
168169# value to auto-shard based on available slices and devices.
@@ -251,7 +252,7 @@ max_train_steps: 1500
251252num_train_epochs : 1
252253seed : 0
253254output_dir : ' sdxl-model-finetuned'
254- per_device_batch_size : 1
255+ per_device_batch_size : 1.0
255256
256257warmup_steps_fraction : 0.1
257258learning_rate_schedule_steps : -1 # By default the length of the schedule is set to the number of steps.
0 commit comments