Skip to content

Commit 9606f2e

Browse files
authored
Merge branch 'main' into lpl
2 parents 26bede5 + 1a10fa0 commit 9606f2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/utils/testing_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Callable],
12121212

12131213
# Some device agnostic functions return values. Need to guard against 'None' instead at
12141214
# user level
1215-
if fn is None:
1216-
return None
1215+
if not callable(fn):
1216+
return fn
12171217

12181218
return fn(*args, **kwargs)
12191219

0 commit comments

Comments
 (0)