Skip to content

Commit 9d79991

Browse files
authored
[Docs] fix: video rendering on svd. (#6330)
fix: video rendering on svd.
1 parent 7d865ac commit 9d79991

File tree

1 file changed

+8
-5
lines changed
  • docs/source/en/using-diffusers

1 file changed

+8
-5
lines changed

docs/source/en/using-diffusers/svd.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pipe = StableVideoDiffusionPipeline.from_pretrained(
4444
pipe.enable_model_cpu_offload()
4545

4646
# Load the conditioning image
47-
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png?download=true")
47+
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png")
4848
image = image.resize((1024, 576))
4949

5050
generator = torch.manual_seed(42)
@@ -58,6 +58,11 @@ export_to_video(frames, "generated.mp4", fps=7)
5858
<source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket_generated.mp4" type="video/mp4" />
5959
</video>
6060

61+
| **Source Image** | **Video** |
62+
|:------------:|:-----:|
63+
| ![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png) | ![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/output_rocket.gif) |
64+
65+
6166
<Tip>
6267
Since generating videos is more memory intensive we can use the `decode_chunk_size` argument to control how many frames are decoded at once. This will reduce the memory usage. It's recommended to tweak this value based on your GPU memory.
6368
Setting `decode_chunk_size=1` will decode one frame at a time and will use the least amount of memory but the video might have some flickering.
@@ -120,15 +125,13 @@ pipe = StableVideoDiffusionPipeline.from_pretrained(
120125
pipe.enable_model_cpu_offload()
121126

122127
# Load the conditioning image
123-
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png?download=true")
128+
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png")
124129
image = image.resize((1024, 576))
125130

126131
generator = torch.manual_seed(42)
127132
frames = pipe(image, decode_chunk_size=8, generator=generator, motion_bucket_id=180, noise_aug_strength=0.1).frames[0]
128133
export_to_video(frames, "generated.mp4", fps=7)
129134
```
130135

131-
<video width="1024" height="576" controls>
132-
<source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket_generated_motion.mp4" type="video/mp4">
133-
</video>
136+
![](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/output_rocket_with_conditions.gif)
134137

0 commit comments

Comments
 (0)