mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #747] feat: Add --base-directory argument for ComfyUI #221
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JaFarey on GitHub (Jan 28, 2025).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/747
Originally assigned to: @webfiltered on GitHub.
I use desktop version of comfy and during installation I specified main folder as F:\AI\ComfyUI so I wanted all the models would be stored by default on F:\AI\ComfyUI\models.
Then I edited exrtra modec config.json file so some of the largest and most used models would be stored in separate folder F:\AI\External models\ComfyUI\models
comfyui_desktop:
is_default: "true"
checkpoints: F:\AI\External models\ComfyUI\models\checkpoints
classifiers: models\classifiers
clip: F:\AI\External models\ComfyUI\models\clip
clip_vision: F:\AI\External models\ComfyUI\models\clip_vision
configs: models\configs
controlnet: F:\AI\External models\ComfyUI\models\controlnet
diffusers: models\diffusers
diffusion_models: models\diffusion_models
embeddings: F:\AI\External models\ComfyUI\models\embeddings
gligen: models\gligen
hypernetworks: models\hypernetworks
loras: F:\AI\External models\ComfyUI\models\loras
photomaker: models\photomaker
style_models: F:\AI\External models\ComfyUI\models\style_models
unet: F:\AI\External models\ComfyUI\models\unet
upscale_models: F:\AI\External models\ComfyUI\models\upscale_models
vae: F:\AI\External models\ComfyUI\models\vae
vae_approx: models\vae_approx
animatediff_models: models\animatediff_models
animatediff_motion_lora: models\animatediff_motion_lora
animatediff_video_formats: models\animatediff_video_formats
ipadapter: F:\AI\External models\ComfyUI\models\ipadapter
liveportrait: models\liveportrait
insightface: F:\AI\External models\ComfyUI\models\insightface
layerstyle: models\layerstyle
LLM: F:\AI\External models\ComfyUI\models\LLM
Joy_caption: models\Joy_caption
sams: F:\AI\External models\ComfyUI\models\sams
blip: models\blip
CogVideo: models\CogVideo
xlabs: F:\AI\External models\ComfyUI\models\xlabs
instantid: F:\AI\External models\ComfyUI\models\instantid
CatVTON: F:\AI\External models\ComfyUI\models\CatVTON
custom_nodes: custom_nodes/
download_model_base: models
base_path: F:\AI\ComfyUI
So Why comfy keeps downloading some of the models (like LLM) to it's root folder C:\Users\farey\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\models
...and althoug I have some of the models installed in my default or extra folder it keeps giving me errors that it can't find the model in the root location:
Error no file named diffusion_pytorch_model.bin found in directory C:\Users\farey\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI\models\CatVTON\sd-vae-ft-mse.
I have this issue with the catVTON model. It did not see it in my default location specified during the installation, so I moved the models to "extra folder" and updated the .yaml file and still no result. It started seing the model when I moved it to it's root file but now it is screaming because it can't find .vae file in the same location...
Why is this happening?
Is there any way to keep everything simple and tidy???
All I wanted is to be able to keep all the files in my default location: F:\AI\ComfyUI
and all common models that I could share with other apps in F:\AI\External models\ComfyUI\models
How do I solve it?
How do I stop comfy from downloading some of the models and looking for the models in the root installation folder?
┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Jan 28, 2025):
To resolve the issue of ComfyUI downloading models to the root installation folder and not recognizing models in your specified directories, you need to ensure that your configuration file is correctly set up. Here are some steps you can take:
Verify Configuration Paths: Make sure that all paths in your configuration file are correctly specified and point to the intended directories. It seems like you have already done this, but double-check for any typos or incorrect paths.
Set Base Paths Correctly: Ensure that the
base_pathanddownload_model_baseare set to your desired default location. For example:Check for Conflicting Settings: Ensure there are no conflicting settings in other configuration files that might override your specified paths.
Update Model Paths: If you have moved models to a new location, make sure to update any references to these models in the configuration file. This includes ensuring that the paths for specific models like
CatVTONare correctly set.Prevent Downloads to Root: To prevent ComfyUI from downloading models to the root folder, ensure that the
download_model_baseis set to your desired directory. If ComfyUI still downloads to the root, there might be a default setting or fallback mechanism causing this behavior.Check for Errors: Look for any error messages in the logs that might indicate why ComfyUI is not recognizing the models in your specified paths. This can provide clues on what might be going wrong.
Test with a Minimal Setup: Temporarily simplify your configuration to test if the issue persists. For example, set all paths to a single directory and see if ComfyUI behaves as expected. This can help identify if the issue is with specific paths or a broader configuration problem.
By ensuring that all paths are correctly set and there are no conflicting settings, you should be able to keep your models organized in your specified directories. If the issue persists, it might be worth checking for any updates or patches to ComfyUI that address this behavior.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other
@JaFarey commented on GitHub (Jan 28, 2025):
I also noticed that if I use help/open folder/open extra_model_paths.yaml from inerface it actually opens "extra_models_config.yaml" in C:\Users\farey\AppData\Roaming\ComfyUI, and the "extra_model_paths.yaml" file is set as .exaple file is in other directory: C:\Users\farey\AppData\Local\Programs@comfyorgcomfyui-electron\resources\ComfyUI
Why is that? Which one should I update then?
Are you planning to simplify it? ....and how to set these files properly to avoid 4 different locations mismatch:
Can you implement ui based feature in where would be possible simply pick extra locations folder and all the other models would be stored and downloaded automaticaly to the location selected during the installation?
@webfiltered commented on GitHub (Jan 28, 2025):
Hi there, just wanted to let you know that this is a priority for us. With the desktop app right now, things are a bit more complex, due in part to the way this has organically grown from its original state.
Please edit the file:
extra_models_config.yamlin%APPDATA%\ComfyUI. You can find more details in the ComfyUI Desktop User Guide.We have a lot of improvements planned in this area - including a UI to make this less troublesome.
I'll leave this issue open until it's resolved, if you don't mind; it helps give visibility into the actual issues that people are facing.
@JaFarey commented on GitHub (Jan 28, 2025):
Sure. We can keep it open.
Maybe it will be helpful to the others too.
Thank you.
@JaFarey commented on GitHub (Jan 28, 2025):
Well. I do not know why it is happening, but although I have updated my extra_model_paths file with this path to CatVTON model:
CatVTON: F:\AI\External models\ComfyUI\models\CatVTON, I am still getting the error that the model is not in the root directory.
Other models like checkpoints or loras are being detected there with no issues...
@webfiltered commented on GitHub (Jan 28, 2025):
It is very likely that the custom node pack looking for this model was been written to look for it in a hard-coded location. Do you know which extension is providing that node?
@JaFarey commented on GitHub (Jan 28, 2025):
https://github.com/chflame163/ComfyUI_CatVTON_Wrapper
@JaFarey commented on GitHub (Jan 28, 2025):
It stubbornly looking for this file where it is not supposed to.
It could either look for it in my defined places.
How do I change it.?
@webfiltered commented on GitHub (Jan 28, 2025):
The only way to do this right now is to edit some code:
github.com/chflame163/ComfyUI_CatVTON_Wrapper@e2ae9b62c5/py/cat_vton.py (L38C37-L38C60)This is saying "look in the models directory next to ComfyUI's main.py". You could simply change it to point wherever you please.
We have an update already in progress that will resolve this issue, but depending on testing, it may be a few days before it is released.
@JaFarey commented on GitHub (Jan 29, 2025):
Thank you.
I appreciate your help.
@robinjhuang commented on GitHub (Jan 29, 2025):
@webfiltered This PR adds the latest ComfyUI to desktop, so we can make the change to add the base_path cli-arg now :)
https://github.com/Comfy-Org/desktop/pull/771
@JaFarey commented on GitHub (Jan 30, 2025):
I just noticed that it is doing the same with Florence2 LLM models. Keeps downloading them to the root although I have changed download models and LLM models location :(
@robinjhuang commented on GitHub (Feb 5, 2025):
We have merged this PR that addresses this and will make a release soon!
github.com/Comfy-Org/desktop@1fe0ee6e6d@robinjhuang commented on GitHub (Feb 9, 2025):
Can you try the latest 0.4.18! Should have fixed this issue
@JaFarey commented on GitHub (Feb 9, 2025):
Still does not see the models in this location...
@webfiltered commented on GitHub (Feb 9, 2025):
github.com/kijai/ComfyUI-Florence2@dffd12506d/nodes.py (L152)That custom node is explicitly reading one single directory. In your config, it will only ever read the models from
F:\AI\ComfyUI\models\LLM.@dosubot[bot] commented on GitHub (May 11, 2025):
Hi, @JaFarey. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.
Issue Summary:
--base-directoryargument.Next Steps:
Thank you for your understanding and contribution!