Signed-off-by: Huang, Zeyu <11222265+fhfuih@users.noreply.github.com> Signed-off-by: Zeyu Huang | 黃澤宇 <11222265+fhfuih@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
779bf3118b
commit
d18168ccbb
2 files changed
+16
-2
No files matched your search
@@ -284,7 +284,6 @@ def test_diffusers_backend_t2i_matches_diffusers(model_id: str, accuracy_artifac
|
|||||||
[
|
[
|
||||||
pytest.param(
|
pytest.param(
|
||||||
"Wan-AI/Wan2.2-I2V-A14B-Diffusers",
|
"Wan-AI/Wan2.2-I2V-A14B-Diffusers",
|
||||||
marks=pytest.mark.skip(reason="#3488"),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -814,6 +814,15 @@ class OmniDiffusionConfig:
|
|||||||
# (non-DiT models don't have a separate transformer folder/config)
|
# (non-DiT models don't have a separate transformer folder/config)
|
||||||
if self.diffusion_load_format == "diffusers":
|
if self.diffusion_load_format == "diffusers":
|
||||||
self.set_tf_model_config(TransformerConfig())
|
self.set_tf_model_config(TransformerConfig())
|
||||||
|
try:
|
||||||
|
diffusers_pipeline_cls_name = config_dict["_class_name"]
|
||||||
|
self.diffusers_pipeline_cls = getattr(diffusers, diffusers_pipeline_cls_name)
|
||||||
|
except (KeyError, AttributeError) as exc:
|
||||||
|
logger.warning(
|
||||||
|
"Could not find valid _class_name for diffusers pipeline in model_index.json: %s. "
|
||||||
|
"Without the underlying pipeline class the dummy run may omit required inputs.",
|
||||||
|
exc,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
tf_config_dict = get_hf_file_to_dict("transformer/config.json", self.model)
|
tf_config_dict = get_hf_file_to_dict("transformer/config.json", self.model)
|
||||||
self.set_tf_model_config(TransformerConfig.from_dict(tf_config_dict))
|
self.set_tf_model_config(TransformerConfig.from_dict(tf_config_dict))
|
||||||
@@ -824,7 +833,13 @@ class OmniDiffusionConfig:
|
|||||||
# (non-DiT models don't have a separate transformer folder/config)
|
# (non-DiT models don't have a separate transformer folder/config)
|
||||||
if self.diffusion_load_format == "diffusers":
|
if self.diffusion_load_format == "diffusers":
|
||||||
self.set_tf_model_config(TransformerConfig())
|
self.set_tf_model_config(TransformerConfig())
|
||||||
self.update_multimodal_support()
|
logger.warning(
|
||||||
|
"Could not find valid model_index.json per diffusers format. "
|
||||||
|
"This model is likely unsupported by the diffusers backend. "
|
||||||
|
"Also, without knowing the underlying diffusers pipeline class from model_index.json, "
|
||||||
|
"the dummy run will input only text prompt, which may cause errors for pipelines "
|
||||||
|
"that require additional inputs."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
cfg = get_hf_file_to_dict("config.json", self.model)
|
cfg = get_hf_file_to_dict("config.json", self.model)
|
||||||
if cfg is None:
|
if cfg is None:
|
||||||
|
|||||||
Reference in new issue
Block a user