Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -407,9 +407,9 @@ class TrinerModelVITS:
|
|
407 |
self.epoch_count=0
|
408 |
self.global_step=0
|
409 |
self.len_dataset=len(self.DataSets['train'])
|
410 |
-
self.
|
411 |
self.init_wandb()
|
412 |
-
|
413 |
|
414 |
|
415 |
|
@@ -422,7 +422,7 @@ class TrinerModelVITS:
|
|
422 |
|
423 |
def init_training(self):
|
424 |
|
425 |
-
|
426 |
self.initialize_training_components()
|
427 |
self.epoch_count=0
|
428 |
|
@@ -585,10 +585,18 @@ train_dataset_dirs=[
|
|
585 |
|
586 |
|
587 |
dir_model='wasmdashai/vits-ar-huba-fine'
|
588 |
-
pro=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
@spaces.GPU
|
591 |
def run_train_epoch(num):
|
|
|
592 |
for i in range(10):
|
593 |
# model.train(True)
|
594 |
yield pro.run_train_epoch()
|
@@ -600,17 +608,10 @@ def init_training():
|
|
600 |
|
601 |
@spaces.GPU
|
602 |
def init_Starting():
|
603 |
-
|
604 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
605 |
|
606 |
-
|
607 |
-
path_training_args='VitsModelSplit/finetune_config_ara.json',
|
608 |
-
train_dataset_dirs = train_dataset_dirs,
|
609 |
-
eval_dataset_dir = os.path.join(dataset_dir,'eval'),
|
610 |
-
full_generation_dir = os.path.join(dataset_dir,'full_generation'),
|
611 |
-
token=token,
|
612 |
-
device=device
|
613 |
-
)
|
614 |
return 'init_Starting'
|
615 |
@spaces.GPU
|
616 |
def init_wandb():
|
|
|
407 |
self.epoch_count=0
|
408 |
self.global_step=0
|
409 |
self.len_dataset=len(self.DataSets['train'])
|
410 |
+
self.load_model()
|
411 |
self.init_wandb()
|
412 |
+
|
413 |
|
414 |
|
415 |
|
|
|
422 |
|
423 |
def init_training(self):
|
424 |
|
425 |
+
|
426 |
self.initialize_training_components()
|
427 |
self.epoch_count=0
|
428 |
|
|
|
585 |
|
586 |
|
587 |
dir_model='wasmdashai/vits-ar-huba-fine'
|
588 |
+
pro=TrinerModelVITS(dir_model=dir_model,
|
589 |
+
path_training_args='VitsModelSplit/finetune_config_ara.json',
|
590 |
+
train_dataset_dirs = train_dataset_dirs,
|
591 |
+
eval_dataset_dir = os.path.join(dataset_dir,'eval'),
|
592 |
+
full_generation_dir = os.path.join(dataset_dir,'full_generation'),
|
593 |
+
token=token,
|
594 |
+
device=device
|
595 |
+
)
|
596 |
|
597 |
@spaces.GPU
|
598 |
def run_train_epoch(num):
|
599 |
+
pro.init_training()
|
600 |
for i in range(10):
|
601 |
# model.train(True)
|
602 |
yield pro.run_train_epoch()
|
|
|
608 |
|
609 |
@spaces.GPU
|
610 |
def init_Starting():
|
611 |
+
|
612 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
613 |
|
614 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
return 'init_Starting'
|
616 |
@spaces.GPU
|
617 |
def init_wandb():
|