Skip to content

Commit ddd125b

Browse files
committed
...
1 parent 608763f commit ddd125b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/diffusers/utils/dummy_pt_objects.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,21 @@ def from_pretrained(cls, *args, **kwargs):
261261
requires_backends(cls, ["torch"])
262262

263263

264+
class AutoModel(metaclass=DummyObject):
265+
_backends = ["torch"]
266+
267+
def __init__(self, *args, **kwargs):
268+
requires_backends(self, ["torch"])
269+
270+
@classmethod
271+
def from_config(cls, *args, **kwargs):
272+
requires_backends(cls, ["torch"])
273+
274+
@classmethod
275+
def from_pretrained(cls, *args, **kwargs):
276+
requires_backends(cls, ["torch"])
277+
278+
264279
class CacheMixin(metaclass=DummyObject):
265280
_backends = ["torch"]
266281

0 commit comments

Comments
 (0)