Skip to content

Commit ce6e249

Browse files
authored
Fix lazy_init typo
1 parent 527cb4a commit ce6e249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flax/nnx/bridge/wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def lazy_init(fn: Module | tp.Callable[..., tp.Any], *args, **kwargs):
7878
module = fn
7979
assert callable(fn)
8080
else:
81-
if not hasattr(fn, '__self__') and isinstance(fn.__self__, Module):
81+
if not (hasattr(fn, '__self__') and isinstance(fn.__self__, Module)):
8282
raise ValueError(f'{fn = } needs to be a method of an NNX Module.')
8383
module = fn.__self__
8484
_set_initializing(module, True)

0 commit comments

Comments
 (0)