Skip to content

[BUG]: "--replace_underscores" now an unrecognized argument for wd14 tagging #439

Closed
@DocShotgun

Description

@DocShotgun

After commit 838478b with the big code refactoring, the replace underscores feature for wd14 tagging appears to be broken. Upon attempting to tag with that box checked, this error appears:

usage: tag_images_by_wd14_tagger.py [-h] [--repo_id REPO_ID] [--model_dir MODEL_DIR] [--force_download]
                                    [--thresh THRESH] [--batch_size BATCH_SIZE]
                                    [--max_data_loader_n_workers MAX_DATA_LOADER_N_WORKERS]
                                    [--caption_extention CAPTION_EXTENTION] [--caption_extension CAPTION_EXTENSION]
                                    [--debug]
                                    train_data_dir
tag_images_by_wd14_tagger.py: error: unrecognized arguments: --replace_underscores
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Me\Documents\kohya_ss\venv\Scripts\accelerate.exe\__main__.py", line 7, in <module>
  File "C:\Users\Me\Documents\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main
    args.func(args)
  File "C:\Users\Me\Documents\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command
    simple_launcher(args)
  File "C:\Users\Me\Documents\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 '['C:\\Users\\Me\\Documents\\kohya_ss\\venv\\Scripts\\python.exe', './finetune/tag_images_by_wd14_tagger.py', '--batch_size=1', '--thresh=0.35', '--replace_underscores', '--caption_extension=.txt', 'C:/Users/Me/Pictures/Training/Datasets/Experimental/ds2']' returned non-zero exit status 2.

Wd14 tagging appears to work correctly when this option is not selected. Right now we can work around it by using caption S/R now that it has been fixed on the latest commit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions