bmaltais/kohya_ss

train_network.py: error: argument --caption_dropout_every_n_epochs: invalid int value: '1.0'

ruSauron opened this issue · 2 comments

Steps to reproduce:

  1. Launch UI
  2. Set Training parameters -> Advanced Configuration -> Dropout caption every n epochs to anything larger than 0, for example 1.
  3. Start training model

Command line option --caption_dropout_every_n_epochs will be set to "1.0" instead of 1 which cause an error.

Current behaviour:
--caption_dropout_every_n_epochs="1.0"

Correct behaviour:
--caption_dropout_every_n_epochs=1

Error log:
train_network.py: error: argument --caption_dropout_every_n_epochs: invalid int value: '1.0' Traceback (most recent call last): File "D:\Programs\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Programs\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "_PathTo_\kohya_ss\venv\Scripts\accelerate.exe\__main__.py", line 7, in <module> File "_PathTo_\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main args.func(args) File "_PathTo_\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command simple_launcher(args) File "_PathTo_\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['_PathTo_\\kohya_ss\\venv\\Scripts\\python.exe', 'train_network.py', '_YourTrainingOptions_]' returned non-zero exit status 2.

I will convert the field to only accept integer and use that instead of a float... That you for reporting.

The issue is fixed in the latest dev branch commit