Skip to content

Commit b0156d8

Browse files
authored
[BugFix] Fix unexpected crash when init OmniDiffusion (#1562)
Signed-off-by: Semmer2 <semmer@live.cn>
1 parent c812667 commit b0156d8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

vllm_omni/entrypoints/omni_diffusion.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,13 @@ def __init__(self, od_config: OmniDiffusionConfig | None = None, **kwargs):
7575
# Map model_type or architecture to pipeline class
7676
model_type = cfg.get("model_type")
7777
architectures = cfg.get("architectures") or []
78+
pipeline_class = None
7879
# Bagel/NextStep models don't have a model_index.json, so we set the pipeline class name manually
7980
if model_type == "bagel" or "BagelForConditionalGeneration" in architectures:
80-
od_config.model_class_name = "BagelPipeline"
81-
od_config.tf_model_config = TransformerConfig()
82-
od_config.update_multimodal_support()
81+
pipeline_class = "BagelPipeline"
8382
elif model_type == "nextstep":
8483
if od_config.model_class_name is None:
85-
od_config.model_class_name = "NextStep11Pipeline"
86-
od_config.tf_model_config = TransformerConfig()
87-
od_config.update_multimodal_support()
84+
pipeline_class = "NextStep11Pipeline"
8885
elif model_type == "glm-image" or "GlmImageForConditionalGeneration" in architectures:
8986
pipeline_class = "GlmImagePipeline"
9087
elif architectures and len(architectures) == 1:

0 commit comments

Comments
 (0)