"git@developer.sourcefind.cn:change/sglang.git" did not exist on "0bb0f7631114b8a4b614ec8f197327ea7fce645d"
Unverified Commit 4e7b0cb3 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[docs] fix: animatediff docs (#6339)

fix: animatediff docs
parent 35b81fff
...@@ -33,7 +33,14 @@ from ...schedulers import ( ...@@ -33,7 +33,14 @@ from ...schedulers import (
LMSDiscreteScheduler, LMSDiscreteScheduler,
PNDMScheduler, 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 ...utils.torch_utils import randn_tensor
from ..pipeline_utils import DiffusionPipeline from ..pipeline_utils import DiffusionPipeline
...@@ -47,7 +54,7 @@ EXAMPLE_DOC_STRING = """ ...@@ -47,7 +54,7 @@ EXAMPLE_DOC_STRING = """
>>> from diffusers import MotionAdapter, AnimateDiffPipeline, DDIMScheduler >>> from diffusers import MotionAdapter, AnimateDiffPipeline, DDIMScheduler
>>> from diffusers.utils import export_to_gif >>> 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 = AnimateDiffPipeline.from_pretrained("frankjoshua/toonyou_beta6", motion_adapter=adapter)
>>> pipe.scheduler = DDIMScheduler(beta_schedule="linear", steps_offset=1, clip_sample=False) >>> pipe.scheduler = DDIMScheduler(beta_schedule="linear", steps_offset=1, clip_sample=False)
>>> output = pipe(prompt="A corgi walking in the park") >>> output = pipe(prompt="A corgi walking in the park")
...@@ -533,6 +540,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap ...@@ -533,6 +540,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
return latents return latents
@torch.no_grad() @torch.no_grad()
@replace_example_docstring(EXAMPLE_DOC_STRING)
def __call__( def __call__(
self, self,
prompt: Union[str, List[str]] = None, prompt: Union[str, List[str]] = None,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment