Skip to content

Commit

Permalink
Deleted dead code, removed unneeded dependency, bumped version for re…
Browse files Browse the repository at this point in the history
…lease
  • Loading branch information
beveradb committed Feb 29, 2024
1 parent ac1076d commit 3600033
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 254 deletions.
9 changes: 0 additions & 9 deletions audio_separator/separator/uvr_lib_v5/demucs/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from pathlib import Path
import warnings

from omegaconf import OmegaConf
from diffq import DiffQuantizer, UniformQuantizer, restore_quantized_state
import torch

Expand Down Expand Up @@ -101,14 +100,6 @@ def save_with_checksum(content, path):
path.write_bytes(buf.getvalue())


def serialize_model(model, training_args, quantizer=None, half=True):
args, kwargs = model._init_args_kwargs
klass = model.__class__

state = get_state(model, quantizer, half)
return {"klass": klass, "args": args, "kwargs": kwargs, "state": state, "training_args": OmegaConf.to_container(training_args, resolve=True)}


def copy_state(state):
return {k: v.cpu().clone() for k, v in state.items()}

Expand Down
Loading

0 comments on commit 3600033

Please sign in to comment.