ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Add individual models to cli args

Open ljleb opened this issue 2 years ago • 3 comments

Adds the following options to cli arguments:

	--checkpoint-dir path\to\dir	Add a path to a checkpoint directory.
	--config-dir path\to\dir	Add a path to a model config directory.
	--clip-dir path\to\dir		Add a path to a clip directory.
	--clip-vision-dir path\to\dir	Add a path to a clip vision directory.
	--controlnet-dir path\to\dir	Add a path to a controlnet or T2I checkpoint directory.
	--embedding-dir path\to\dir	Add a path to an embedding directory.
	--lora-dir path\to\dir		Add a path to a lora model directory.
	--style-model-dir path\to\dir	Add a path to a style model directory.
	--upscale-model-dir path\to\dir	Add a path to an upscale model directory.
	--vae-dir path\to\dir		Add a path to a vae directory.

Specifying the same option multiple times will add multiple directories instead of just one. For example, --checkpoint-dir E:\sd\ckpt --checkpoint-dir D:\sd2\finetunes will add both directories to the checkpoint search paths.

Feel free to edit the PR or ask for changes.

Closes #35

ljleb avatar Mar 14 '23 02:03 ljleb

This PR also normalizes the model names in config files to singular form, to minimize surprise when guessing config keys. Let me know if this is not wanted.

Note that I changed the arguments to reflect the model tags used in folder_paths.py.

Feel free to close this PR if you do not indent to support per-model cli argument.

ljleb avatar Mar 19 '23 23:03 ljleb

I tried this and there's a few issues. The first one is that if a extra_model_paths.yaml is present it just crashes on startup. The second one is that UI doesn't work at all if you run it and open up: http://127.0.0.1:8188/

comfyanonymous avatar Mar 25 '23 06:03 comfyanonymous

With recent changes it is possible that the code no longer works. I'll take a look when I find some time.

ljleb avatar Mar 26 '23 03:03 ljleb

I personally don't need this anymore, feel free to add cli arguments in a new PR if you want.

ljleb avatar Jul 18 '23 06:07 ljleb