Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flax/nnx/graphlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3627,7 +3627,7 @@ class Static(tp.Generic[A]):
class GenericPytree: ...


from jax._src.tree_util import _registry as JAX_PYTREE_REGISTRY



def is_pytree_node(
Expand All @@ -3637,7 +3637,7 @@ def is_pytree_node(
return False
elif isinstance(x, Variable):
return False
elif type(x) in JAX_PYTREE_REGISTRY:
elif jax.tree_util.is_tree_node(type(x)):
return True
elif isinstance(x, tuple):
return True
Expand Down
Loading