Cannot generate images "TypeError: expected str, bytes or os.PathLike object, not bool" [Fix Inside]
"outdir_txt2img_samples": 8,
"outdir_img2img_samples": "../Outputs/img2img",
"outdir_extras_samples": "../Outputs/txt2img/grids"
Describe the bug
Pressing Generate in txt2img in this commit causes an error and no images to be created, if "Save images to a subdirectory" is ticked in settings then I get "TypeError: expected str, bytes or os.PathLike object, not bool" if it is unticked I get "TypeError: expected str, bytes or os.PathLike object, not int"
To Reproduce
Steps to reproduce the behavior:
type a prompt and press generate
Expected behavior
Generated Images
Error Code
txt2img: dragon
Error completing request
Arguments: ('dragon', '', 'None', 'None', 30, 0, False, False, 9, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, False, 0.7, 0, False, None, '', False, 1, '', 4, '', True) {}
Traceback (most recent call last):
File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\ui.py", line 136, in f
res = list(func(*args, **kwargs))
File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\webui.py", line 58, in f
res = func(*args, **kwargs)
File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\txt2img.py", line 43, in txt2img
processed = process_images(p)
File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\processing.py", line 278, in process_images
os.makedirs(p.outpath_samples, exist_ok=True)
File "X:\Other\ProgrammingRequirements\miniconda3\lib\os.py", line 210, in makedirs
head, tail = path.split(name)
File "X:\Other\ProgrammingRequirements\miniconda3\lib\ntpath.py", line 185, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not bool
Desktop (please complete the following information):
OS: Windows 11
Browser Firefox
Commit revision 75b90a5
Same problem with img2img
Traceback (most recent call last):
File "E:\SD\a11\stable-diffusion-webui\modules\ui.py", line 136, in f
res = list(func(*args, **kwargs))
File "E:\SD\a11\stable-diffusion-webui\webui.py", line 58, in f
res = func(*args, **kwargs)
File "E:\SD\a11\stable-diffusion-webui\modules\img2img.py", line 117, in img2img
processed = process_images(p)
File "E:\SD\a11\stable-diffusion-webui\modules\processing.py", line 279, in process_images
os.makedirs(p.outpath_grids, exist_ok=True)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\os.py", line 210, in makedirs
head, tail = path.split(name)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 211, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not int
I think I see the issue, the settings seem to be saved to the wrong variables for some reason
"outdir_samples": true,
"outdir_txt2img_samples": 8,
"outdir_img2img_samples": "../Outputs/img2img",
"outdir_extras_samples": "../Outputs/txt2img/grids",
"outdir_grids": 80,
"outdir_txt2img_grids": true,
"outdir_img2img_grids": "",
"save_to_dirs": "[date]",
"save_to_dirs_prompt_len": 10,
"outdir_save": "../Outputs/extras",
"samples_save": true,
"samples_format": true,
"grid_save": false,
"return_grid": false,
"grid_format": true,
"grid_extended_filename": true,
"grid_only_if_multiple": "png",
"n_rows": -1,
"jpeg_quality": "../Outputs/img2img/grids"
This is inside the config.json
[Feature Request] Fixing and closing all the bugs (or as many as possible) before adding new features and potentially breaking the app
Cannot generate images anymore, getting an error in the cmd
Cannot generate images "TypeError: expected str, bytes or os.PathLike object, not bool" [Fix Inside]
Sep 22, 2022