Skip to content

Commit

Permalink
Update outputs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anzr299 authored Jan 8, 2025
1 parent 5655b22 commit f8b292d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/diffusers/utils/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ def __init_subclass__(cls) -> None:
cls,
torch.utils._pytree._dict_flatten,
lambda values, context: cls(**torch.utils._pytree._dict_unflatten(values, context)),
serialized_type_name=f"{cls.__module__}.{cls.__name__}"
)
else:
torch.utils._pytree.register_pytree_node(
cls,
torch.utils._pytree._dict_flatten,
lambda values, context: cls(**torch.utils._pytree._dict_unflatten(values, context)),
serialized_type_name=f"{cls.__module__}.{cls.__name__}"
)

def __post_init__(self) -> None:
Expand Down

0 comments on commit f8b292d

Please sign in to comment.