Skip to content

Commit efc4255

Browse files
authored
Update pipeline_stg_hunyuan_video.py
1 parent c973b13 commit efc4255

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

examples/community/pipeline_stg_hunyuan_video.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,20 @@
5656
>>> pipe.vae.enable_tiling()
5757
>>> pipe.to("cuda")
5858
59+
>>> # Configure STG mode options
60+
>>> stg_applied_layers_idx = [2] # Layer indices from 0 to 41
61+
>>> stg_scale = 1.0
62+
>>> do_rescaling = False
63+
5964
>>> output = pipe(
60-
... prompt="A cat walks on the grass, realistic",
65+
... prompt="A wolf howling at the moon, with the moon subtly resembling a giant clock face, realistic style.",
6166
... height=320,
6267
... width=512,
6368
... num_frames=61,
6469
... num_inference_steps=30,
70+
... stg_applied_layers_idx=stg_applied_layers_idx,
71+
... stg_scale=stg_scale,
72+
... do_rescaling=do_rescaling,
6573
... ).frames[0]
6674
>>> export_to_video(output, "output.mp4", fps=15)
6775
```
@@ -787,4 +795,4 @@ def __call__(
787795
if not return_dict:
788796
return (video,)
789797

790-
return HunyuanVideoPipelineOutput(frames=video)
798+
return HunyuanVideoPipelineOutput(frames=video)

0 commit comments

Comments
 (0)