Skip to content

Commit d60f3cb

Browse files
Merge pull request #1 from huggingface/AlanPonnachan-feat/mag-cache
make fix-copies.
2 parents acc5371 + ce8c8e6 commit d60f3cb

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/diffusers/utils/dummy_pt_objects.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,21 @@ def from_pretrained(cls, *args, **kwargs):
227227
requires_backends(cls, ["torch"])
228228

229229

230+
class MagCacheConfig(metaclass=DummyObject):
231+
_backends = ["torch"]
232+
233+
def __init__(self, *args, **kwargs):
234+
requires_backends(self, ["torch"])
235+
236+
@classmethod
237+
def from_config(cls, *args, **kwargs):
238+
requires_backends(cls, ["torch"])
239+
240+
@classmethod
241+
def from_pretrained(cls, *args, **kwargs):
242+
requires_backends(cls, ["torch"])
243+
244+
230245
class PyramidAttentionBroadcastConfig(metaclass=DummyObject):
231246
_backends = ["torch"]
232247

@@ -284,6 +299,10 @@ def apply_layer_skip(*args, **kwargs):
284299
requires_backends(apply_layer_skip, ["torch"])
285300

286301

302+
def apply_mag_cache(*args, **kwargs):
303+
requires_backends(apply_mag_cache, ["torch"])
304+
305+
287306
def apply_pyramid_attention_broadcast(*args, **kwargs):
288307
requires_backends(apply_pyramid_attention_broadcast, ["torch"])
289308

0 commit comments

Comments
 (0)