Skip to content

Commit ecbb280

Browse files
Merge pull request #23 from ivnvalex/main
fix copy_state_dict imports
2 parents 8535544 + a970583 commit ecbb280

3 files changed

Lines changed: 18 additions & 14 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import find_packages, setup
22

33
setup(
44
name='stable-codec',
@@ -15,7 +15,7 @@
1515
'wheel',
1616
'torch==2.4',
1717
'torchaudio==2.4',
18-
'stable-audio-tools==0.0.17',
18+
'stable-audio-tools==0.0.19',
1919
'pytorch-lightning==2.1',
2020
'prefigure==0.0.9']
2121
)

stable_codec/model.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import json
2+
from typing import List, Optional, Tuple, Union
3+
24
import torch
35
import torch.nn as nn
46
import torchaudio
5-
6-
from typing import Optional, List, Tuple, Union
77
from einops import rearrange
8+
from stable_audio_tools import get_pretrained_model
9+
from stable_audio_tools.data.utils import VolumeNorm
810
from stable_audio_tools.models import create_model_from_config
911
from stable_audio_tools.models.fsq import DitheredFSQ
10-
from stable_audio_tools.models.utils import load_ckpt_state_dict
11-
from stable_audio_tools.training.utils import copy_state_dict
12-
from stable_audio_tools.data.utils import VolumeNorm
12+
from stable_audio_tools.models.utils import copy_state_dict, load_ckpt_state_dict
1313

1414
from .residual_fsq import ResidualFSQBottleneck
15-
from stable_audio_tools import get_pretrained_model
15+
1616

1717
class StableCodec(nn.Module):
1818
def __init__(self,

train.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import copy
22
import json
33
import os
4-
import pytorch_lightning as pl
5-
64
from typing import Optional
5+
6+
import pytorch_lightning as pl
77
from prefigure.prefigure import get_all_args, push_wandb_config
88
from stable_audio_tools.models import create_model_from_config
9-
from stable_audio_tools.models.utils import load_ckpt_state_dict, remove_weight_norm_from_model
10-
from stable_audio_tools.training.utils import copy_state_dict
9+
from stable_audio_tools.models.utils import (
10+
copy_state_dict,
11+
load_ckpt_state_dict,
12+
remove_weight_norm_from_model,
13+
)
1114

12-
from stable_codec.training_module import create_training_wrapper_from_config
13-
from stable_codec.training_demo import create_demo_callback_from_config
1415
from stable_codec.data.dataset import create_dataloader_from_config
16+
from stable_codec.training_demo import create_demo_callback_from_config
17+
from stable_codec.training_module import create_training_wrapper_from_config
18+
1519

1620
class ExceptionCallback(pl.Callback):
1721
def on_exception(self, trainer, module, err):

0 commit comments

Comments
 (0)