File size: 3,269 Bytes
36ad38b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Cloning into 'audio-diffusion'...\n"
     ]
    }
   ],
   "source": [
    "!git clone https://github.com/teticio/audio-diffusion\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Creating Dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "python audio-diffusion/scripts/audio_to_images.py --resolution 256 --input_dir D:/Projects/Orpheus_ai/DataSet/Generated_music_withratings/training_samples/ --output_dir D:/Projects/Orpheus_ai/DataSet/Generated_music_withratings/train/ --push_to_hub SAint7579/orpheus_samples"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Retraining the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-23-e665de61672a>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-23-e665de61672a>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    accelerate launch --config_file audio-diffusion/config/accelerate_local.yaml audio-diffusion/scripts/train_unet.py --dataset_name SAint7579/orpheus_samples --output_dir models/v1-0 --num_epochs 10 --train_batch_size 2  --eval_batch_size 2 --gradient_accumulation_steps 8 --learning_rate 1e-4 --mixed_precision no --push_to_hub True --hub_model_id SAint7579/orpheus_ldm_model_v1-0\u001b[0m\n\u001b[1;37m               ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "accelerate launch --config_file audio-diffusion/config/accelerate_local.yaml audio-diffusion/scripts/train_unet.py --dataset_name SAint7579/orpheus_samples --output_dir models/v1-0 --num_epochs 1 --train_batch_size 2  --eval_batch_size 2 --gradient_accumulation_steps 8 --learning_rate 1e-4 --mixed_precision no --push_to_hub True --hub_model_id SAint7579/orpheus_ldm_model_v1-0 --vae teticio/latent-audio-diffusion-256 --from_pretrained teticio/latent-audio-diffusion-256"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "--num_epochs 100 \\\n",
    "--train_batch_size 2 \\\n",
    "--eval_batch_size 2 \\\n",
    "--gradient_accumulation_steps 8 \\\n",
    "--learning_rate 1e-4 \\\n",
    "--lr_warmup_steps 500 \\\n",
    "--mixed_precision no \\\n",
    "--push_to_hub True \\\n",
    "--hub_model_id audio-diffusion-256 \\\n",
    "--hub_token $(cat $HOME/.huggingface/token)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}