Skip to content
Closed
Changes from all commits
Commits
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
15 changes: 7 additions & 8 deletions vllm_omni/entrypoints/omni_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,16 @@ def __init__(self, od_config: OmniDiffusionConfig | None = None, **kwargs):
od_config.tf_model_config = TransformerConfig()
od_config.update_multimodal_support()
elif model_type == "glm-image" or "GlmImageForConditionalGeneration" in architectures:
pipeline_class = "GlmImagePipeline"
od_config.model_class_name = "GlmImagePipeline"
od_config.tf_model_config = TransformerConfig()
od_config.update_multimodal_support()
elif architectures and len(architectures) == 1:
pipeline_class = architectures[0]

if pipeline_class is None:
od_config.model_class_name = architectures[0]
od_config.tf_model_config = TransformerConfig()
od_config.update_multimodal_support()
else:
raise ValueError(f"Unknown model type: {model_type}, architectures: {architectures}")

od_config.model_class_name = pipeline_class
od_config.tf_model_config = TransformerConfig()
od_config.update_multimodal_support()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Shunyang, I thinke these three lines of code is common, which should not be deleted and added in former if-else code.

self.engine: DiffusionEngine = DiffusionEngine.make_engine(od_config)

def generate(
Expand Down