Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
4e7b0cb3
Unverified
Commit
4e7b0cb3
authored
Dec 26, 2023
by
Sayak Paul
Committed by
GitHub
Dec 26, 2023
Browse files
[docs] fix: animatediff docs (#6339)
fix: animatediff docs
parent
35b81fff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
+10
-2
No files found.
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
View file @
4e7b0cb3
...
...
@@ -33,7 +33,14 @@ from ...schedulers import (
LMSDiscreteScheduler
,
PNDMScheduler
,
)
from
...utils
import
USE_PEFT_BACKEND
,
BaseOutput
,
logging
,
scale_lora_layers
,
unscale_lora_layers
from
...utils
import
(
USE_PEFT_BACKEND
,
BaseOutput
,
logging
,
replace_example_docstring
,
scale_lora_layers
,
unscale_lora_layers
,
)
from
...utils.torch_utils
import
randn_tensor
from
..pipeline_utils
import
DiffusionPipeline
...
...
@@ -47,7 +54,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import MotionAdapter, AnimateDiffPipeline, DDIMScheduler
>>> from diffusers.utils import export_to_gif
>>> adapter = MotionAdapter.from_pretrained("
diffusers/
motion-adapter")
>>> adapter = MotionAdapter.from_pretrained("
guoyww/animatediff-
motion-adapter
-v1-5-2
")
>>> pipe = AnimateDiffPipeline.from_pretrained("frankjoshua/toonyou_beta6", motion_adapter=adapter)
>>> pipe.scheduler = DDIMScheduler(beta_schedule="linear", steps_offset=1, clip_sample=False)
>>> output = pipe(prompt="A corgi walking in the park")
...
...
@@ -533,6 +540,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
return
latents
@
torch
.
no_grad
()
@
replace_example_docstring
(
EXAMPLE_DOC_STRING
)
def
__call__
(
self
,
prompt
:
Union
[
str
,
List
[
str
]]
=
None
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment