[Config Refactor] Migrate Ming-flash-omni-2.0 Image-Gen deploy configs (#3975)
Signed-off-by: yuanheng <jonathan.zhaoyh@gmail.com> Co-authored-by: Zheng Wengang <zwg0606@gmail.com>
This commit is contained in:
1 parent
5994a0bbf5
commit
ea6d811b58
9 files changed
+189
-125
No files matched your search
@@ -128,12 +128,12 @@ class MingFlashOmniForConditionalGeneration(
|
||||
elif self.model_stage == "imagegen":
|
||||
# Image generation is a separate diffusion stage; it does not run
|
||||
# through this AR wrapper. See
|
||||
# ``vllm_omni/diffusion/models/ming_flash_omni/pipeline_ming_imagegen.py``
|
||||
# and ``model_arch: MingImagePipeline`` in the stage YAML.
|
||||
# `vllm_omni/diffusion/models/ming_flash_omni/pipeline_ming_imagegen.py`
|
||||
# and `model_arch: MingImagePipeline` in the deploy YAML.
|
||||
raise NotImplementedError(
|
||||
"Image generation stage is not implemented in this AR wrapper. "
|
||||
"Use stage_type: diffusion with model_arch: MingImagePipeline "
|
||||
"for the imagegen stage (see stage_configs/ming_flash_omni.yaml)."
|
||||
"Use the DIFFUSION execution_type with model_arch: MingImagePipeline "
|
||||
"for the imagegen stage (see vllm_omni/deploy/ming_flash_omni_image.yaml)."
|
||||
)
|
||||
|
||||
else:
|
||||
|
||||
@@ -105,3 +105,37 @@ MING_FLASH_OMNI_THINKER_ONLY_PIPELINE = PipelineConfig(
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# Thinker + image-generation (diffusion) variant: text-to-image / img2img.
|
||||
MING_FLASH_OMNI_IMAGE_PIPELINE = PipelineConfig(
|
||||
model_type="ming_flash_omni_image",
|
||||
model_arch="MingFlashOmniForConditionalGeneration",
|
||||
stages=(
|
||||
StagePipelineConfig(
|
||||
stage_id=0,
|
||||
model_stage="thinker",
|
||||
execution_type=StageExecutionType.LLM_AR,
|
||||
input_sources=(),
|
||||
final_output=False,
|
||||
owns_tokenizer=True,
|
||||
requires_multimodal_data=True,
|
||||
hf_config_name="thinker_config",
|
||||
engine_output_type="latent",
|
||||
prompt_expand_func=f"{_PROC}.expand_cfg_prompts",
|
||||
sampling_constraints={"detokenize": False},
|
||||
),
|
||||
StagePipelineConfig(
|
||||
stage_id=1,
|
||||
model_stage="dit",
|
||||
# Resolved in vllm_omni/diffusion/registry.py.
|
||||
model_arch="MingImagePipeline",
|
||||
execution_type=StageExecutionType.DIFFUSION,
|
||||
input_sources=(0,),
|
||||
final_output=True,
|
||||
final_output_type="image",
|
||||
hf_config_name="image_gen_config",
|
||||
custom_process_input_func=f"{_PROC}.thinker2imagegen",
|
||||
),
|
||||
),
|
||||
)
|
||||
Reference in new issue
Block a user