Nerogar / OneTrainer

OneTrainer is a one-stop solution for all your stable diffusion training needs.
GNU Affero General Public License v3.0
1.81k stars 153 forks source link

Save config to workspace directory on Start Training #513

Closed dxqbYD closed 1 month ago

dxqbYD commented 1 month ago

who doesn't have a training result that he is unable to reproduce?

There is "Include Config", but it is disabled by default for privacy reasons. This PR saves a config file named "config-2024-10-16_20-32-26.json" to the workspace directory on "Start Training".

I have thought about making this another option in "Include Config", but it doesn't really fit there (tab Model, nothing is included anywhere, ...). It doesn't hurt anyone to always save a config.

Nerogar commented 1 month ago

Good idea. But triggering the save in the UI means that it won't work when running the training from the command line. Can you move it into GenericTrainer instead? You can call it somewhere in the start() function

dxqbYD commented 1 month ago

Good idea. But triggering the save in the UI means that it won't work when running the training from the command line. Can you move it into GenericTrainer instead? You can call it somewhere in the start() function

This was intentional, because when you do CLI training you already have saved a config file manually. But it doesn't hurt to save it again, so I can move it if you prefer

Nerogar commented 1 month ago

Yes, I would prefer that for two reasons:

  1. The behavior would be the same between the two training modes, which will reduce confusion
  2. Even if you already have a saved config, this feature will save a history of config files, even if you change the config after each run
Nerogar commented 1 month ago

I've done the change myself. I also changed the saved file location to workspace/config/.json instead of workspace/config-.json