[feature]: support Hidream-I1-Full model (#2572)
Signed-off-by: wangmengdi <160612767@qq.com> Co-authored-by: wangmengdi <wangmengdi@cmss.chinamobile.com>
This commit is contained in:
1 parent
f0af3ab200
commit
28467dc19a
15 files changed
+3344
-1
No files matched your search
@@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Any
|
||||
import diffusers
|
||||
import torch
|
||||
from PIL import Image
|
||||
from pydantic import model_validator
|
||||
from pydantic import Field, model_validator
|
||||
from typing_extensions import Self
|
||||
from vllm.config.utils import config
|
||||
from vllm.logger import init_logger
|
||||
@@ -593,6 +593,9 @@ class OmniDiffusionConfig:
|
||||
# Maximum number of sequences to generate in a batch
|
||||
max_num_seqs: int = 1
|
||||
|
||||
# Supplementary model specific parameters
|
||||
extras: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
@property
|
||||
def is_moe(self) -> bool:
|
||||
num_experts = self.tf_model_config.get("num_experts", None)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""HiDream Image diffusion model components."""
|
||||
|
||||
from vllm_omni.diffusion.models.hidream_image.hidream_image_transformer import (
|
||||
HiDreamImageTransformer2DModel,
|
||||
)
|
||||
from vllm_omni.diffusion.models.hidream_image.pipeline_hidream_image import (
|
||||
HiDreamImagePipeline,
|
||||
get_hidream_image_post_process_func,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"HiDreamImageTransformer2DModel",
|
||||
"HiDreamImagePipeline",
|
||||
"get_hidream_image_post_process_func",
|
||||
]
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -261,6 +261,11 @@ _DIFFUSION_MODELS = {
|
||||
"pipeline_diffusers_adapter",
|
||||
"DiffusersAdapterPipeline",
|
||||
),
|
||||
"HiDreamImagePipeline": (
|
||||
"hidream_image",
|
||||
"pipeline_hidream_image",
|
||||
"HiDreamImagePipeline",
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -482,6 +487,7 @@ _DIFFUSION_POST_PROCESS_FUNCS = {
|
||||
"OmniVoicePipeline": "get_omnivoice_post_process_func",
|
||||
"DreamIDOmniPipeline": "get_dreamid_omni_post_process_func",
|
||||
"SenseNovaU1Pipeline": "get_sensenova_u1_post_process_func",
|
||||
"HiDreamImagePipeline": "get_hidream_image_post_process_func",
|
||||
}
|
||||
|
||||
_DIFFUSION_PRE_PROCESS_FUNCS = {
|
||||
|
||||
Reference in new issue
Block a user