Skip to content

Instantly share code, notes, and snippets.

@btrude
btrude / train_no_ddp.py
Created October 11, 2020 12:34
jukebox's train.py without distributed data parallel to save memory on single-gpu configurations
"""
Ability to train vq-vae and prior
First try for random inputs
Then from maestros
"""
import sys
import fire
import warnings
import numpy as np
import torch as t
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@btrude
btrude / sample_extended.py
Last active December 10, 2020 18:03
jukebox's sample.py with command-line access to metadata parameters and sample extend/truncate modes
import os
import torch as t
import jukebox.utils.dist_adapter as dist
from jukebox.hparams import Hyperparams
from jukebox.data.labels import EmptyLabeller
from jukebox.utils.torch_utils import empty_cache
from jukebox.utils.audio_utils import save_wav, load_audio
from jukebox.make_models import make_model
from jukebox.align import get_alignment