mirror of
https://github.com/facefusion/facefusion-labs.git
synced 2026-05-22 23:59:40 +02:00
add strategy to config
This commit is contained in:
@@ -91,6 +91,7 @@ learning_rate = 0.0004
|
||||
max_epochs = 50
|
||||
precision = 16-mixed
|
||||
preview_frequency = 250
|
||||
strategy = auto
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
@@ -49,6 +49,7 @@ learning_rate =
|
||||
max_epochs =
|
||||
precision =
|
||||
preview_frequency =
|
||||
strategy =
|
||||
|
||||
[training.output]
|
||||
directory_path =
|
||||
|
||||
@@ -206,6 +206,7 @@ def split_dataset(dataset : Dataset[Tensor]) -> Tuple[Dataset[Tensor], Dataset[T
|
||||
def create_trainer() -> Trainer:
|
||||
config_max_epochs = CONFIG_PARSER.getint('training.trainer', 'max_epochs')
|
||||
config_precision = CONFIG_PARSER.get('training.trainer', 'precision')
|
||||
config_strategy = CONFIG_PARSER.get('training.trainer', 'strategy')
|
||||
config_directory_path = CONFIG_PARSER.get('training.output', 'directory_path')
|
||||
config_file_pattern = CONFIG_PARSER.get('training.output', 'file_pattern')
|
||||
logger = TensorBoardLogger('.logs', name = 'face_swapper')
|
||||
@@ -215,6 +216,7 @@ def create_trainer() -> Trainer:
|
||||
log_every_n_steps = 10,
|
||||
max_epochs = config_max_epochs,
|
||||
precision = config_precision,
|
||||
strategy = config_strategy,
|
||||
callbacks =
|
||||
[
|
||||
ModelCheckpoint(
|
||||
|
||||
Reference in New Issue
Block a user