You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/api/pipelines/animatediff.md
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,53 @@ AnimateDiff tends to work better with finetuned Stable Diffusion models. If you
101
101
102
102
</Tip>
103
103
104
+
### AnimateDiffSDXLPipeline
105
+
106
+
AnimateDiff can also be used with SDXL models. This is currently an experimental feature as only a beta release of the motion adapter checkpoint is available.
107
+
108
+
```python
109
+
import torch
110
+
from diffusers.models import MotionAdapter
111
+
from diffusers import AnimateDiffSDXLPipeline, DDIMScheduler
prompt="a panda surfing in the ocean, realistic, high quality",
139
+
negative_prompt="low quality, worst quality",
140
+
num_inference_steps=20,
141
+
guidance_scale=8,
142
+
width=1024,
143
+
height=1024,
144
+
num_frames=16,
145
+
)
146
+
147
+
frames = output.frames[0]
148
+
export_to_gif(frames, "animation.gif")
149
+
```
150
+
104
151
### AnimateDiffVideoToVideoPipeline
105
152
106
153
AnimateDiff can also be used to generate visually similar videos or enable style/character/background or other edits starting from an initial video, allowing you to seamlessly explore creative possibilities.
f"Must provide the same number of `num_attention_heads` as `down_block_types`. `num_attention_heads`: {num_attention_heads}. `down_block_types`: {down_block_types}."
f"Must provide the same number of `cross_attention_dim` as `down_block_types`. `cross_attention_dim`: {cross_attention_dim}. `down_block_types`: {down_block_types}."
f"Must provide the same number of `layers_per_block` as `down_block_types`. `layers_per_block`: {layers_per_block}. `down_block_types`: {down_block_types}."
f"{self.__class__} has the config param `addition_embed_type` set to 'text_time' which requires the keyword argument `text_embeds` to be passed in `added_cond_kwargs`"
884
+
)
885
+
886
+
text_embeds=added_cond_kwargs.get("text_embeds")
887
+
if"time_ids"notinadded_cond_kwargs:
888
+
raiseValueError(
889
+
f"{self.__class__} has the config param `addition_embed_type` set to 'text_time' which requires the keyword argument `time_ids` to be passed in `added_cond_kwargs`"
0 commit comments