vllm_omni.diffusion.models.bagel.pipeline_bagel ¶
BagelPipeline implementation for vLLM-Omni.
BagelGenParams dataclass ¶
BagelPipeline ¶
Bases: Module, SupportsComponentDiscovery, DiffusionPipelineProfilerMixin
Bagel generation pipeline (MoT) packaged for vllm-omni diffusion engine.
This pipeline is self-contained and uses the ported Bagel core files.
bagel instance-attribute ¶
bagel = Bagel(
language_model=self.language_model,
vit_model=self.vit_model,
parallel_config=parallel_config,
quant_config=quant_config,
prefix="bagel",
config=BagelConfig(
llm_config=llm_config,
vae_config=vae_cfg,
vit_config=vit_cfg,
vit_max_num_patch_per_side=int(
bagel_cfg.get("vit_max_num_patch_per_side", 70)
),
connector_act=str(
bagel_cfg.get(
"connector_act", "gelu_pytorch_tanh"
)
),
interpolate_pos=bool(
bagel_cfg.get("interpolate_pos", False)
),
latent_patch_size=int(
bagel_cfg.get("latent_patch_size", 2)
),
max_latent_size=int(
bagel_cfg.get("max_latent_size", 32)
),
timestep_shift=float(
bagel_cfg.get("timestep_shift", 1.0)
),
),
)
image_processor instance-attribute ¶
language_model instance-attribute ¶
language_model = Qwen2MoTForCausalLM(
llm_config,
parallel_config=parallel_config,
quant_config=quant_config,
prefix="bagel.language_model",
)
tokenizer instance-attribute ¶
tokenizer = AutoTokenizer.from_pretrained(
model_path,
local_files_only=True,
trust_remote_code=True,
)
weights_sources instance-attribute ¶
weights_sources = [
DiffusersPipelineLoader.ComponentSource(
model_or_path=od_config.model,
subfolder=None,
revision=od_config.revision,
prefix="",
fall_back_to_pt=False,
)
]