Skip to content

Commit 630f116

Browse files
authored
Update pipeline_stg_ltx_image2video.py
1 parent 77ec5d0 commit 630f116

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/community/pipeline_stg_ltx_image2video.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
>>> prompt = "A young girl stands calmly in the foreground, looking directly at the camera, as a house fire rages in the background. Flames engulf the structure, with smoke billowing into the air. Firefighters in protective gear rush to the scene, a fire truck labeled '38' visible behind them. The girl's neutral expression contrasts sharply with the chaos of the fire, creating a poignant and emotionally charged scene."
5959
>>> negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
6060
61+
>>> # Configure STG mode options
62+
>>> stg_applied_layers_idx = [19] # Layer indices from 0 to 41
63+
>>> stg_scale = 1.0
64+
>>> do_rescaling = False
65+
6166
>>> video = pipe(
6267
... image=image,
6368
... prompt=prompt,
@@ -66,6 +71,9 @@
6671
... height=480,
6772
... num_frames=161,
6873
... num_inference_steps=50,
74+
... stg_applied_layers_idx=stg_applied_layers_idx,
75+
... stg_scale=stg_scale,
76+
... do_rescaling=do_rescaling,
6977
... ).frames[0]
7078
>>> export_to_video(video, "output.mp4", fps=24)
7179
```
@@ -968,4 +976,4 @@ def __call__(
968976
if not return_dict:
969977
return (video,)
970978

971-
return LTXPipelineOutput(frames=video)
979+
return LTXPipelineOutput(frames=video)

0 commit comments

Comments
 (0)