Skip to content

Commit 5d578c9

Browse files
authored
Merge branch 'main' into metadata-lora
2 parents 9c32dc2 + 1a10fa0 commit 5d578c9

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
@@ -1235,8 +1235,8 @@ def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Callable],
12351235

12361236
# Some device agnostic functions return values. Need to guard against 'None' instead at
12371237
# user level
1238-
if fn is None:
1239-
return None
1238+
if not callable(fn):
1239+
return fn
12401240

12411241
return fn(*args, **kwargs)
12421242

0 commit comments

Comments
 (0)