Skip to content

Commit ba03950

Browse files
committed
refactor: use union for type hint
1 parent 8c8ada4 commit ba03950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/training_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def compute_density_for_timestep_sampling(
253253
logit_mean: float = None,
254254
logit_std: float = None,
255255
mode_scale: float = None,
256-
device: torch.device | str = "cpu",
256+
device: Union[torch.device, str] = "cpu",
257257
generator: Optional[torch.Generator] = None,
258258
):
259259
"""

0 commit comments

Comments
 (0)