Skip to content

Commit b753866

Browse files
committed
fix: animate diff lora stuff.
1 parent 73acebb commit b753866

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/diffusers/loaders/peft.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
_SET_ADAPTER_SCALE_FN_MAPPING = {
3232
"UNet2DConditionModel": _maybe_expand_lora_scales,
3333
"SD3Transformer2DModel": lambda model_cls, weights: weights,
34+
"UNetMotionModel": lambda model_cls, weights: weights,
3435
}
3536

3637

src/diffusers/models/unets/unet_motion_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import torch.utils.checkpoint
2020

2121
from ...configuration_utils import ConfigMixin, FrozenDict, register_to_config
22-
from ...loaders import FromOriginalModelMixin, UNet2DConditionLoadersMixin
22+
from ...loaders import FromOriginalModelMixin, PeftAdapterMixin, UNet2DConditionLoadersMixin
2323
from ...utils import logging
2424
from ..attention_processor import (
2525
ADDED_KV_ATTENTION_PROCESSORS,
@@ -231,7 +231,7 @@ def forward(self, sample):
231231
pass
232232

233233

234-
class UNetMotionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin):
234+
class UNetMotionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin, PeftAdapterMixin):
235235
r"""
236236
A modified conditional 2D UNet model that takes a noisy sample, conditional state, and a timestep and returns a
237237
sample shaped output.

0 commit comments

Comments
 (0)