Skip to content

Commit 3e96b99

Browse files
author
root
committed
feat: add general synthetic data iterator and examples for WAN and FLUX.
1 parent e8bdd82 commit 3e96b99

15 files changed

Lines changed: 579 additions & 6 deletions

src/maxdiffusion/configs/base_flux_dev.yml

100644100755
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,20 @@ allow_split_physical_axes: False
177177
# Replace with dataset path or train_data_dir. One has to be set.
178178
dataset_name: 'diffusers/pokemon-gpt4-captions'
179179
train_split: 'train'
180-
dataset_type: 'tf'
180+
dataset_type: 'tfrecord' # Options: 'tfrecord', 'hf', 'tf', 'grain', 'synthetic'
181+
# ==============================================================================
182+
# Synthetic Data Configuration (only used when dataset_type='synthetic')
183+
# ==============================================================================
184+
# To use synthetic data for testing/debugging without real datasets:
185+
# 1. Set dataset_type: 'synthetic' above
186+
# 2. Optionally set synthetic_num_samples (null=infinite, or a number like 10000)
187+
# 3. Optionally override dimensions
188+
#
189+
# synthetic_num_samples: null # null for infinite, or set a number
190+
#
191+
# Optional dimension overrides:
192+
# resolution: 512
193+
# ==============================================================================
181194
cache_latents_text_encoder_outputs: True
182195
# cache_latents_text_encoder_outputs only apply to dataset_type="tf",
183196
# only apply to small dataset that fits in memory

src/maxdiffusion/configs/base_flux_dev_multi_res.yml

100644100755
File mode changed.

src/maxdiffusion/configs/base_flux_schnell.yml

100644100755
File mode changed.

src/maxdiffusion/configs/base_wan_14b.yml

100644100755
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,28 @@ allow_split_physical_axes: False
199199
# Replace with dataset path or train_data_dir. One has to be set.
200200
dataset_name: 'diffusers/pokemon-gpt4-captions'
201201
train_split: 'train'
202-
dataset_type: 'tfrecord'
202+
dataset_type: 'tfrecord' # Options: 'tfrecord', 'hf', 'tf', 'grain', 'synthetic'
203+
# ==============================================================================
204+
# Synthetic Data Configuration (only used when dataset_type='synthetic')
205+
# ==============================================================================
206+
# To use synthetic data for testing/debugging without real datasets:
207+
# 1. Set dataset_type: 'synthetic' above
208+
# 2. Optionally set synthetic_num_samples (null=infinite, or a number like 10000)
209+
# 3. Optionally override dimensions with synthetic_override_* flags below
210+
#
211+
# synthetic_num_samples: null # null for infinite, or set a number
212+
#
213+
# Optional dimension overrides (comment out to use pipeline/config values):
214+
# synthetic_override_height: 720
215+
# synthetic_override_width: 1280
216+
# synthetic_override_num_frames: 121
217+
# synthetic_override_max_sequence_length: 512
218+
# synthetic_override_text_embed_dim: 4096
219+
# synthetic_override_num_channels_latents: 16
220+
# synthetic_override_vae_scale_factor_spatial: 8
221+
# synthetic_override_vae_scale_factor_temporal: 4
222+
# ==============================================================================
223+
203224
cache_latents_text_encoder_outputs: True
204225
# cache_latents_text_encoder_outputs only apply to dataset_type="tf",
205226
# only apply to small dataset that fits in memory

src/maxdiffusion/configs/base_wan_27b.yml

100644100755
File mode changed.

src/maxdiffusion/configs/base_wan_i2v_14b.yml

100644100755
File mode changed.

src/maxdiffusion/configs/base_wan_i2v_27b.yml

100644100755
File mode changed.

src/maxdiffusion/input_pipeline/__init__.py

100644100755
File mode changed.

src/maxdiffusion/input_pipeline/_grain_data_processing.py

100644100755
File mode changed.

src/maxdiffusion/input_pipeline/_hf_data_processing.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)