[diffusion][bugfix] Separate Diffusers hooks from model metadata (#6749)
Signed-off-by: david6666666 <530634352@qq.com> Signed-off-by: Gao Han <hgaoaf@connect.ust.hk> Co-authored-by: Gao Han <hgaoaf@connect.ust.hk>
This commit is contained in:
1 parent
73893e73ea
commit
9a88d2d21d
11 files changed
+232
-12
No files matched your search
@@ -328,6 +328,25 @@ def test_formatter_preserves_audio_model_video_audio_and_actions(
|
||||
}
|
||||
|
||||
|
||||
def test_formatter_uses_native_model_identity_for_diffusers_video_frames(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
monkeypatch.setattr(output_formatter, "supports_audio_output", lambda _: False)
|
||||
frames = [["frame-0", "frame-1"]]
|
||||
postprocess_output = normalize_diffusion_postprocess_output(frames)
|
||||
|
||||
[result] = format_diffusion_outputs(
|
||||
request=_request("make a video"),
|
||||
od_config=_config("WanImageToVideoPipeline"),
|
||||
diffusion_output=DiffusionOutput(output=frames),
|
||||
output_data=frames,
|
||||
postprocess_output=postprocess_output,
|
||||
)
|
||||
|
||||
assert result.images == frames
|
||||
assert result.final_output_type == "video"
|
||||
|
||||
|
||||
def test_formatter_preserves_audio_only_postprocess_dict(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
|
||||
Reference in new issue
Block a user