ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Feature Request: model and output path setting

Open mrgreaper opened this issue 2 years ago • 4 comments

Sym linking is not ideal, setting a model folder is pretty standard these days and most of us use more than one software that uses models. The same for choosing where to put the output images, personally mine go to a portable drive, not sure how to do that with ComfyUI.

mrgreaper avatar Mar 15 '23 20:03 mrgreaper

See also #66, #35, and #18 for alternate suggestions regarding this issue.

jordanbtucker avatar Mar 15 '23 21:03 jordanbtucker

https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example

Update the ui, copy the new ComfyUI/extra_model_paths.yaml.example to ComfyUI/extra_model_paths.yaml and edit it to set the path to your a1111 ui.

comfyanonymous avatar Mar 18 '23 07:03 comfyanonymous

Awesome, will test later. Thank you for adding this

ghost avatar Mar 18 '23 14:03 ghost

is it also possible to set the output path?

arijoon avatar Mar 19 '23 08:03 arijoon

You can now use --output-directory directory/path to set the output path.

comfyanonymous avatar Apr 05 '23 19:04 comfyanonymous

You can now use --output-directory directory/path to set the output path.

That unfortunately does not work for UNC paths on Windows:

  File "C:\Applications\StableDiffusion\ComfyUI\ComfyUI\folder_paths.py", line 214, in get_save_image_path
    if os.path.commonpath((output_dir, os.path.abspath(full_output_folder))) != output_dir:
  File "ntpath.py", line 804, in commonpath
ValueError: Paths don't have the same drive

tusharbhutt avatar Jul 15 '23 15:07 tusharbhutt

Where did you try to change please? In the .bat file or in the .yaml file.

Jandolek1 avatar Jul 16 '23 18:07 Jandolek1

Where did you try to change please? In the .bat file or in the .yaml file.

Batch file...

tusharbhutt avatar Jul 16 '23 19:07 tusharbhutt

Yes, I tried and does not work :/

Jandolek1 avatar Jul 16 '23 21:07 Jandolek1

I'm astonished to see that such an advanced and revolutionary piece of software just dumps all output files in the same folder with a meaningless ComfyUI_00123.png format.

A1111 is miles ahead here, naming files as output/YYYY-MM-DD/batchnumber_seed.png in a folder with the current date.

Is there some solution, extension or any possible way to emulate the same output format from automatic1111?

andreszs avatar Jul 31 '23 11:07 andreszs

I'm astonished to see that such an advanced and revolutionary piece of software just dumps all output files in the same folder with a meaningless ComfyUI_00123.png format.

A1111 is miles ahead here, naming files as output/YYYY-MM-DD/batchnumber_seed.png in a folder with the current date.

Is there some solution, extension or any possible way to emulate the same output format from automatic1111?

Maybe you can find it in the WAS node suite.

ltdrdata avatar Jul 31 '23 14:07 ltdrdata

@ltdrdata It seems the README says nothing about output paths, and that plugin seems to add other features which are irrelevant in this case.

andreszs avatar Aug 01 '23 13:08 andreszs

Hi, maybe im just dumb but is there no documentation / ability on how to set the output path inside the yaml? im currently trying the following but this doesn't seem to work...

a111:
    base_path: E:\stable-diffusion-ai
    
    output-directory: stable-diff-output\comfyui

Also an ability (like a boolean here) to make automatic folders for different dates would be sick (but probably another PR i imagine)

Schokostoffdioxid avatar Aug 10 '23 22:08 Schokostoffdioxid

@Schokostoffdioxid My model paths yaml doesn't include an output-directory value. However, I now set the output path and filename using a primitive node as explained here: Change output file names in ComfyUI

Basically, to output files in a folder with current date you add this to your Primitive node: %date:yyyy-MM-dd%/%date:hhmmss%_%KSampler.seed%

So the file would be saved as output/2023-08-15/083821_109992800202691_00001_.png, which means output/date/time_seed_00001_.png.

image

andreszs avatar Aug 15 '23 11:08 andreszs

In my advanced menu i dont have any of the same stuff there. ALL i have are "Loaders, conditioning & model_merging" in advanced. Anyone else?

Skettalee avatar Sep 01 '23 04:09 Skettalee

I'm astonished to see that such an advanced and revolutionary piece of software just dumps all output files in the same folder with a meaningless ComfyUI_00123.png format.

A1111 is miles ahead here, naming files as output/YYYY-MM-DD/batchnumber_seed.png in a folder with the current date.

Is there some solution, extension or any possible way to emulate the same output format from automatic1111?

I've created a node for the purpose of customizing the file and folder names: https://github.com/thedyze/save-image-extended-comfyui

thedyze avatar Oct 06 '23 21:10 thedyze

delete

jlitz avatar Dec 02 '23 09:12 jlitz

You can now use --output-directory directory/path to set the output path.

That unfortunately does not work for UNC paths on Windows:

  File "C:\Applications\StableDiffusion\ComfyUI\ComfyUI\folder_paths.py", line 214, in get_save_image_path
    if os.path.commonpath((output_dir, os.path.abspath(full_output_folder))) != output_dir:
  File "ntpath.py", line 804, in commonpath
ValueError: Paths don't have the same drive

just fyi this works fine in Windows

in run_nvidia_gpu.bat just put it here

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --output-directory "G:\projects\project-name\comfy-output"
pause

Works great with network shares mounted as drive letters

githubarooski avatar May 20 '24 07:05 githubarooski