Skip to content

Commit

Permalink
Stack motion adapater with motion lora + increase speed
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk-dev committed Apr 15, 2024
1 parent afbe895 commit 87b849a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runner/app/pipelines/text_to_video.py
Expand Up @@ -67,7 +67,8 @@ def __init__(self, model_id: str):
repo = "ByteDance/AnimateDiff-Lightning"
self.motion_loaded = ""
# Load base
self.ldm = AnimateDiffPipeline.from_pretrained(bases[base_loaded]).to("cuda")
adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-2", torch_dtype=torch.float16)
self.ldm = AnimateDiffPipeline.from_pretrained(bases[base_loaded], motion_adapter=adapter, torch_dtype=torch.float16).to("cuda")
# Load noise scheduler
self.ldm.scheduler = EulerDiscreteScheduler.from_config(self.ldm.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
# Load model params
Expand Down

0 comments on commit 87b849a

Please sign in to comment.