[New model] Support model qwen image layered (#381)
Signed-off-by: dengyunyang <584797741@qq.com>
This commit is contained in:
1 parent
96e4690013
commit
85bc8bfa6a
9 files changed
+2189
-19
No files matched your search
@@ -24,6 +24,11 @@ _DIFFUSION_MODELS = {
|
||||
"pipeline_qwen_image_edit_plus",
|
||||
"QwenImageEditPlusPipeline",
|
||||
),
|
||||
"QwenImageLayeredPipeline": (
|
||||
"qwen_image",
|
||||
"pipeline_qwen_image_layered",
|
||||
"QwenImageLayeredPipeline",
|
||||
),
|
||||
"ZImagePipeline": (
|
||||
"z_image",
|
||||
"pipeline_z_image",
|
||||
@@ -93,6 +98,7 @@ _DIFFUSION_PRE_PROCESS_FUNCS = {
|
||||
# where mod_folder and mod_relname are defined and mapped using `_DIFFUSION_MODELS` via the `arch` key
|
||||
"QwenImageEditPipeline": "get_qwen_image_edit_pre_process_func",
|
||||
"QwenImageEditPlusPipeline": "get_qwen_image_edit_plus_pre_process_func",
|
||||
"QwenImageLayeredPipeline": "get_qwen_image_layered_pre_process_func",
|
||||
}
|
||||
|
||||
|
||||
@@ -107,9 +113,7 @@ def _load_process_func(od_config: OmniDiffusionConfig, func_name: str):
|
||||
|
||||
def get_diffusion_post_process_func(od_config: OmniDiffusionConfig):
|
||||
if od_config.model_class_name not in _DIFFUSION_POST_PROCESS_FUNCS:
|
||||
raise ValueError(
|
||||
f"Post process function for model class {od_config.model_class_name} not found in diffusion model registry."
|
||||
)
|
||||
return None
|
||||
func_name = _DIFFUSION_POST_PROCESS_FUNCS[od_config.model_class_name]
|
||||
return _load_process_func(od_config, func_name)
|
||||
|
||||
|
||||
Reference in new issue
Block a user