Skip to content

Commit

Permalink
[docs] fix: animatediff docs (huggingface#6339)
Browse files Browse the repository at this point in the history
fix: animatediff docs
  • Loading branch information
sayakpaul authored and adrvs committed Jan 2, 2024
1 parent 98fa566 commit 6e5cb95
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/diffusers/pipelines/animatediff/pipeline_animatediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
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

Expand All @@ -47,7 +54,7 @@
>>> 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")
Expand Down Expand Up @@ -533,6 +540,7 @@ def prepare_latents(
return latents

@torch.no_grad()
@replace_example_docstring(EXAMPLE_DOC_STRING)
def __call__(
self,
prompt: Union[str, List[str]] = None,
Expand Down

0 comments on commit 6e5cb95

Please sign in to comment.