kohya_ss
kohya_ss copied to clipboard
RecursionError: maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last): File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\gradio\routes.py", line 321, in run_predict output = await app.blocks.process_api( File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api result = await self.call_function(fn_index, inputs, iterator, request) File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 856, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Programs\bmaltais GUI\kohya_ss\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Programs\bmaltais GUI\kohya_ss\library\dreambooth_folder_creation_gui.py", line 69, in dreambooth_folder_preparation shutil.copytree(util_training_images_dir_input, training_dir) File "C:\Programs\Python\Python310\lib\shutil.py", line 558, in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, File "C:\Programs\Python\Python310\lib\shutil.py", line 494, in _copytree copytree(srcobj, dstname, symlinks, ignore, copy_function, File "C:\Programs\Python\Python310\lib\shutil.py", line 558, in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, File "C:\Programs\Python\Python310\lib\shutil.py", line 457, in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) File "C:\Programs\Python\Python310\lib\os.py", line 210, in makedirs head, tail = path.split(name) File "C:\Programs\Python\Python310\lib\ntpath.py", line 212, in split seps = _get_bothseps(p) File "C:\Programs\Python\Python310\lib\ntpath.py", line 36, in _get_bothseps if isinstance(path, bytes): RecursionError: maximum recursion depth exceeded while calling a Python object
When I start prepare training data it creates a chain of 257 empty folders.
I noticed that at my end also. I need to squash this bug... Hope to fix it for the next release. I have not found what trigger it yet... But sometime it work... Sometime it fail... Need to find the root cause.
From what I'm seeing, this is triggered when you attempt to use the folder creation tool in a case where the folder (example: img) already exists. Would it be possible to separate the function that sets the key word and class? Most of the time when I run into this problem it's because I've copied all the relevant files (img, log, regs) from a previous training and just want to make changes to the key word, class, or have changed the filewords. This recursion also deletes all files within the folders that get the recursive problem.
edit not sure if this is fixed. I will update a sit looks like I'm one step behind.