Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
19e2814
[omni, model, ckpt, config, docs] feat: support Bagel in SeedOmni
Zx55 Nov 2, 2026
cd620b3
[ops, omni, model, config, docs, test] feat: add BAGEL MoT async Ulys…
Zx55 Nov 2, 2026
eaf90da
[omni, model, trainer, config, docs, test] fix: enable FlexAttention …
Zx55 Nov 2, 2026
e60a76e
[omni, model, test] refactor: align Bagel VeomniOp dispatch and insta…
Zx55 Nov 2, 2026
d7f447e
[omni, model, ckpt, test] fix: pad micro-batch VAE inputs, sample per…
Zx55 Nov 2, 2026
f1a2970
[omni, model, test] fix: fall back to sync attention on LoRA projecti…
Zx55 Nov 2, 2026
b49a329
[omni, model, docs, test] fix: support LoRA-wrapped Bagel projections…
Zx55 Nov 2, 2026
094f454
[omni, model, test] fix: reduce flow loss over fsdp_group, avoid VAE …
Zx55 Nov 3, 2026
c41d2d1
[omni, model, test] fix: align VAE encoder passes across shard group …
Zx55 Nov 4, 2026
63a5c2a
[omni, model, test] fix: preserve native BagelVAE _no_split_modules a…
Zx55 Nov 4, 2026
a2c8857
[omni, model, test] fix: sample SP VAE posteriors after gather and is…
Zx55 Nov 4, 2026
a816fc9
[omni, model] fix: pass explicit device_type to fork_rng in BagelSigl…
Zx55 Nov 4, 2026
0a1f4a7
chore: merge github/main into czr/omniv2-1071-bagel
Zx55 Nov 5, 2026
274c3bd
[omni, model, task, test] fix: propagate resolved infer_type in nativ…
Zx55 Nov 5, 2026
a9124bc
[omni, model, test] fix: default BagelQwen2MoTConfig attn_implementat…
Zx55 Nov 6, 2026
9f186e1
[omni, config, docs, test] refactor: normalize OmniConfig graph types…
Zx55 Nov 6, 2026
b1e01e6
[omni, model, ckpt, test] refactor: move BAGEL fused QKV export into …
Zx55 Nov 6, 2026
c0db513
[omni, model, test] fix: use available_nvidia_ops in BagelQwen2MoTCon…
Zx55 Nov 6, 2026
cafdccd
[omni, model, config, docs, test] fix: inherit checkpoint generation_…
Zx55 Nov 9, 2026
1e74577
refactor: reuse patched Qwen2 primitives and deduplicate Bagel pos embed
Zx55 Nov 9, 2026
0c68766
chore: merge github/main into czr/omniv2-1071-bagel
Zx55 Nov 10, 2026
7fb58ef
test: consolidate Bagel unit and E2E alignment tests
Zx55 Nov 10, 2026
c9eea58
fix: preserve BagelFlowConnector llm2vae zero init in _init_weights
Zx55 Nov 11, 2026
2e7c661
fix: shard PositionEmbedding reset_parameters across DTensor mesh
Zx55 Nov 11, 2026
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
18 changes: 18 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sources:
- /mnt/hdfs/user_dir/dataset/imagenet1k_train
- /mnt/hdfs/veomni/datasets/tulu-3-sft-mixture/data
- /mnt/hdfs/veomni/datasets/sharegpt4v_cap_100k
- /mnt/hdfs/user_dir/dataset/seed_edit_p23_multi_turn
names:
- imagenet1k
- tulu-3-sft-mixture
- sharegpt4v_cap_100k
- seed_edit_p23_multi_turn
schedule:
- schedule_type: const
weights: [0.4, 0.2, 0.2, 0.2]
# Heterogeneous schemas (imagenet string / tulu dict / sharegpt4v list) — keep
# them in the VeOmni weighted multisource sampler.
level: token
stopping_strategy: all_exhausted
upstream_sharded: true
37 changes: 37 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_edit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# BAGEL-7B-MoT inference - text+image to image edit.
# Official edit builds VAE/ViT/text context, then calls image generation directly.
initial: prompt_encode

states:
prompt_encode:
body:
- { from: bagel_text_encoder, to: bagel_qwen2_mot }
- { from: bagel_siglip_navit, to: bagel_qwen2_mot }
- { from: bagel_vae.encode_context, to: bagel_flow_connector.embed_context_latents }
- { from: bagel_flow_connector.embed_context_latents, to: bagel_qwen2_mot }
- { from: bagel_qwen2_mot, to: end }
transitions:
- { condition: { type: default }, next_state: query_denoise }

query_denoise:
body:
- { from: bagel_flow_connector.prepare_denoise_query, to: bagel_text_encoder.encode_image_markers }
- { from: bagel_text_encoder.encode_image_markers, to: bagel_qwen2_mot.denoise_branch }
- { from: bagel_qwen2_mot.denoise_branch, to: end }
transitions:
- { condition: { type: default }, next_state: velocity_collect }

velocity_collect:
body:
- { from: bagel_flow_connector.decode_velocity_from_hidden, to: bagel_qwen2_mot.collect_velocity }
- { from: bagel_qwen2_mot.collect_velocity, to: bagel_flow_connector.advance_denoise }
- { from: bagel_flow_connector.advance_denoise, to: end }
transitions:
- { condition: { type: module_signal, key: image_complete }, next_state: image_decode }
- { condition: { type: default }, next_state: query_denoise }

image_decode:
body:
- { from: bagel_vae.decode_generated, to: end }
transitions:
- { condition: { type: default }, next_state: done }
34 changes: 34 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# BAGEL-7B-MoT inference - text to image.
initial: prompt_encode

states:
prompt_encode:
body:
- { from: bagel_text_encoder, to: bagel_qwen2_mot }
- { from: bagel_siglip_navit, to: bagel_qwen2_mot }
- { from: bagel_qwen2_mot, to: end }
transitions:
- { condition: { type: default }, next_state: query_denoise }

query_denoise:
body:
- { from: bagel_flow_connector.prepare_denoise_query, to: bagel_text_encoder.encode_image_markers }
- { from: bagel_text_encoder.encode_image_markers, to: bagel_qwen2_mot.denoise_branch }
- { from: bagel_qwen2_mot.denoise_branch, to: end }
transitions:
- { condition: { type: default }, next_state: velocity_collect }

velocity_collect:
body:
- { from: bagel_flow_connector.decode_velocity_from_hidden, to: bagel_qwen2_mot.collect_velocity }
- { from: bagel_qwen2_mot.collect_velocity, to: bagel_flow_connector.advance_denoise }
- { from: bagel_flow_connector.advance_denoise, to: end }
transitions:
- { condition: { type: module_signal, key: image_complete }, next_state: image_decode }
- { condition: { type: default }, next_state: query_denoise }

image_decode:
body:
- { from: bagel_vae.decode_generated, to: end }
transitions:
- { condition: { type: default }, next_state: done }
19 changes: 19 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_und.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# BAGEL-7B-MoT inference - understanding to text (text/image -> text).
initial: prompt_encode

states:
prompt_encode:
body:
- { from: bagel_text_encoder, to: bagel_qwen2_mot }
- { from: bagel_siglip_navit, to: bagel_qwen2_mot }
- { from: bagel_qwen2_mot, to: end }
transitions:
- { condition: { type: module_signal, key: text_done }, next_state: done }
- { condition: { type: default }, next_state: text_ar }

text_ar:
body:
- { from: bagel_qwen2_mot, to: bagel_text_encoder }
- { from: bagel_text_encoder, to: end }
transitions:
- { condition: { type: module_signal, key: text_done }, next_state: done }
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Per-module INFERENCE overrides for BAGEL-7B-MoT — all eager.
#
# Single-process load (`python tasks/omni/infer_omni.py ...`): every module
# loads via `from_pretrained(device_map='auto')`, spread across visible GPUs.

bagel_vae:
model_path: bagel_vae
accelerator:
gradient_checkpointing:
enable: false
fsdp_config:
fsdp_mode: eager

bagel_siglip_navit:
model_path: bagel_siglip_navit
accelerator:
fsdp_config:
fsdp_mode: eager

bagel_text_encoder:
model_path: bagel_text_encoder
accelerator:
fsdp_config:
fsdp_mode: eager
gradient_checkpointing:
enable: false

bagel_flow_connector:
model_path: bagel_flow_connector
accelerator:
fsdp_config:
fsdp_mode: eager
gradient_checkpointing:
enable: false

bagel_qwen2_mot:
model_path: bagel_qwen2_mot
ops_implementation:
attn_implementation: flex_attention
accelerator:
fsdp_config:
fsdp_mode: eager
33 changes: 33 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/infer/modules_infer_fsdp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
bagel_vae:
model_path: bagel_vae
accelerator:
gradient_checkpointing:
enable: false
fsdp_config:
fsdp_mode: fsdp2
bagel_siglip_navit:
model_path: bagel_siglip_navit
accelerator:
fsdp_config:
fsdp_mode: fsdp2
bagel_text_encoder:
model_path: bagel_text_encoder
accelerator:
fsdp_config:
fsdp_mode: fsdp2
gradient_checkpointing:
enable: false
bagel_flow_connector:
model_path: bagel_flow_connector
accelerator:
fsdp_config:
fsdp_mode: fsdp2
gradient_checkpointing:
enable: false
bagel_qwen2_mot:
model_path: bagel_qwen2_mot
ops_implementation:
attn_implementation: flex_attention
accelerator:
fsdp_config:
fsdp_mode: fsdp2
101 changes: 101 additions & 0 deletions configs/seed_omni/Bagel/bagel_7b_mot/offline_cache/base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# VeOmni offline VAE posterior cache config for OmniModel - BAGEL-7B-MoT.

model:
model_path: /mnt/hdfs/user_dir/veomni_omni/models/seed_omni/BAGEL-7B-MoT
model_config:
modules: configs/seed_omni/Bagel/bagel_7b_mot/offline_cache/modules_train.yaml
train_graph: configs/seed_omni/Bagel/bagel_7b_mot/offline_cache/graph_train.yaml
infer_graph:
infer_edit: configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_edit.yaml
infer_gen: configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_gen.yaml
infer_und: configs/seed_omni/Bagel/bagel_7b_mot/infer/graph_infer_und.yaml
infer_type: infer_und
ops_implementation:
attn_implementation: flash_attention_2

accelerator:
init_device: meta
gradient_checkpointing:
enable: false
enable_reentrant: false
fsdp_config:
fsdp_mode: fsdp2
reshard_after_forward: true
reshard_after_backward: true
forward_prefetch: true
offload: false
max_load_broadcast_size: 20.0
mixed_precision:
enable: true
param_dtype: bfloat16
reduce_dtype: float32
offload_config:
enable_activation: false
activation_gpu_limit: 0.0

optimizer:
type: adamw
lr: 1.0e-4
lr_min: 1.0e-6
lr_start: 0.0
lr_warmup_ratio: 0.03
lr_decay_style: cosine
lr_decay_ratio: 1.0
weight_decay: 0.01
max_grad_norm: 1.0
no_decay_params: []
no_decay_modules: []

data:
data_type: seedomni
max_seq_len: 4096
train_path: configs/seed_omni/Bagel/bagel_7b_mot/data.yaml
datasets_type: iterable
multisource_datasets_type: veomni_weighted_multisource
train_sample: 1000000
dataloader:
type: native
num_workers: 4
drop_last: false
pin_memory: true
prefetch_factor: 2

train:
training_task: offline_embedding
offline_cache_dir: outputs/bagel_vae_cached_dataset
seed: 42
num_train_epochs: 1
global_batch_size: 32
micro_batch_size: 2
dyn_bsz: false

checkpoint:
output_dir: outputs/bagel_7b_mot_offline_cache
save_steps: 0
save_epochs: 0
save_hf_weights: false
hf_save_steps: 0
hf_save_epochs: 0

wandb:
enable: false
project: VeOmni_omni
name: bagel_7b_mot_offline_cache

infer:
generation_kwargs:
max_new_tokens: 2048
temperature: 0.0
top_p: 1.0
do_sample: false
image_height: 1024
image_width: 1024
latent_downsample: 16
num_timesteps: 50
timestep_shift: 3.0
cfg_text_scale: 1.0
cfg_img_scale: 1.0
cfg_interval: [0.0, 1.0]
cfg_renorm_min: 0.0
cfg_renorm_type: global
enable_taylorseer: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# BAGEL-7B-MoT VAE posterior cache production DAG.
- { from: bagel_vae.offline_encode, to: end }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bagel_vae:
model_path: bagel_vae
accelerator:
gradient_checkpointing:
enable: false
Loading
Loading