Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with WD14 captioning #700

Closed
Coiler12 opened this issue May 2, 2023 · 4 comments
Closed

Error with WD14 captioning #700

Coiler12 opened this issue May 2, 2023 · 4 comments

Comments

@Coiler12
Copy link

Coiler12 commented May 2, 2023

Might be similar to this issue , but thought I'd report it anyway. Attempting to caption a folder with WD14 does nothing and leads to this error. New and not the most technically astute so I don't know what the main issue is-it could just be an issue I had with setting it up. Have the latest Visual C++ Redists installed.

Captioning files in C:/Users/UnLoc/OneDrive/Desktop/LimstellaDS...
accelerate launch "./finetune/tag_images_by_wd14_tagger.py" --batch_size="3" --thresh="0.35" --caption_extension=".txt" "C:/Users/UnLoc/OneDrive/Desktop/LimstellaDS"
The following values were not passed to accelerate launch and had defaults used instead:
--num_processes was set to a value of 1
--num_machines was set to a value of 1
--mixed_precision was set to a value of 'no'
--dynamo_backend was set to a value of 'no'
To avoid this warning pass in values for each of the problematic parameters or run accelerate config.
2023-05-01 20:05:11.482622: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-05-01 20:05:11.482994: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
using existing wd14 tagger model
2023-05-01 20:05:17.240496: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "C:\Users\UnLoc\kohya_ss\finetune\tag_images_by_wd14_tagger.py", line 298, in
main(args)
File "C:\Users\UnLoc\kohya_ss\finetune\tag_images_by_wd14_tagger.py", line 99, in main
model = load_model(args.model_dir)
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\eager\context.py", line 622, in ensure_initialized
context_handle = pywrap_tfe.TFE_NewContext(opts)
tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: cudaGetErrorString symbol not found.
Traceback (most recent call last):
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\Scripts\accelerate.exe_main
.py", line 7, in
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main
args.func(args)
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command
simple_launcher(args)
File "C:\Users\UnLoc\AppData\Local\Programs\Python\Python310\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\UnLoc\AppData\Local\Programs\Python\Python310\python.exe', './finetune/tag_images_by_wd14_tagger.py', '--batch_size=3', '--thresh=0.35', '--caption_extension=.txt', 'C:/Users/UnLoc/OneDrive/Desktop/LimstellaDS']' returned non-zero exit status 1.
...captioning done

@bmaltais
Copy link
Owner

bmaltais commented May 2, 2023

Are you running the GUI using gui.ps1 or gui.bat? THe accelerate values should have been configured when the setup.bat was ran.

@Coiler12
Copy link
Author

Coiler12 commented May 2, 2023

Are you running the GUI using gui.ps1 or gui.bat? THe accelerate values should have been configured when the setup.bat was ran.

Gui.bat. I may have just installed the program wrong.

@bmaltais
Copy link
Owner

bmaltais commented May 2, 2023

I suggest you delete the kohya_ss folder, clone it from github then re-run setup.bat to set things up.

But before you do, check if you have python modules installed globally. Those can wreck havoc with venv if they supperceed the selected python module for the venv.

Run pip freeze and see if there are a lot of modules listed. If there are you may want to uninstall all of them before proceeding with .\setup.exe

A quick way to get rid of all the global python modules is to do:

pip freeze > uninstall.txt
pip uninstall -y -r uninstall.txt

But if you have other python code that depend on those global modules they will be no longer working until you re-install them in a proper venv.

@Coiler12
Copy link
Author

Deleted the folder, ran the pip freeze uninstall cleanup (which did remove a lot of things), and reinstalled. Now it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants