-
I would like to output all images to one directory, I find it annoying to hunt through 10 different folders to find the output of whichever function I happened to have been using. Ideally I would like to still have the option to toggle each prompt going to a new folder but all in the same root directory. I'm not great with py syntax, I'm learning but I'm struggling with this one. For instance, I want all image outputs to be saved in "C:\Users\user\stable-diffusion-webui\outputs". I think it's possible with a command line option but I don't know how to implement the change. Does it require editing the webui.py script or the relauncher.py script in additional arguments? If so, where in the code do I make the edit to enter the new directory? This is from https://github.com/sd-webui/stable-diffusion-webui/wiki/Command-line-options
From webui.py file
Thank you all so much for your help! I love this tool and it's helping me learn so much! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I haven't used it, but "Advanced -> Sort samples by prompt" may be what you're looking for |
Beta Was this translation helpful? Give feedback.
-
In webui.py search for: Also if you do not want extra subfolder called "samples" search for: |
Beta Was this translation helpful? Give feedback.
-
Thank you so much thedyze!!! Your instructions worked perfectly and I was able to extend it to 99.9% of all image saving. I removed the samples folder creation by changing: sample_path = os.path.join(outpath, "samples") I was also able to redirect all images and grids to one location by changing all 3 lines below: outpath = opt.outdir_txt2img or opt.outdir or "outputs/txt2img-samples" For the upcalers and other functions: outpathDir = os.path.join(outpath,'RealESRGAN') |
Beta Was this translation helpful? Give feedback.
In webui.py search for:
outpath = opt.outdir_img2img
Replace that entire line with
outpath = "../path/toyour/images"
Also if you do not want extra subfolder called "samples" search for:
sample_path = os.path.join(outpath, "samples")
Replace with
sample_path = outpath