Skip to content

Commit

Permalink
Remove useless code.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 13, 2025
1 parent 90f349f commit 1f1c7b7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions comfy/ldm/cosmos/cosmos_tokenizer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import Any

import torch
from einops import pack, rearrange, unpack
from einops import rearrange


import comfy.ops
Expand Down Expand Up @@ -98,14 +98,6 @@ def default(*args):
return None


def pack_one(t, pattern):
return pack([t], pattern)


def unpack_one(t, ps, pattern):
return unpack(t, ps, pattern)[0]


def round_ste(z: torch.Tensor) -> torch.Tensor:
"""Round with straight through gradients."""
zhat = z.round()
Expand Down

0 comments on commit 1f1c7b7

Please sign in to comment.