Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safetensors do not appear in Load Diffusion Model node while the models already in unet folder #179

Open
ZHAORITIANisavailable opened this issue Dec 15, 2024 · 24 comments

Comments

@ZHAORITIANisavailable
Copy link

Before installing the GGUF package, there was a UnetLoader node which can load my flux_dev.safetensors in my unet folder, everything was fine. After I installed the GGUF nodes, the UnetLoader node is gone and seems to be replaced by the Load Diffusion Model node, but the flux_dev.safetensors doesn't show in the node Load Diffusion Model, only .gguf models are listed, as shown in the pic.
屏幕截图 2024-12-16 000040
I then loaded a workflow with the default flux_dev.safetensors file shown in the Load Diffusion Model node and tried to run it, and it triggered an error:

Prompt outputs failed validation
UNETLoader:

  • Value not in list: unet_name: 'flux_dev.safetensors' not in ['flux1-dev-Q8_0.gguf']

It seems that the safetensors are not included in the model list, but I placed the safetensors in the unet folder indeed.

@roofling
Copy link

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

@city96
Copy link
Owner

city96 commented Dec 16, 2024

Looks like that nodepack includes the ComfyUI-GGUF nodeset in a subfolder for use in their own custom nodes, which makes sense.

But for some reason the manager think it's required for any workflow that includes our nodes as it gets listed here as a duplicate despite never being exported here as far as I can tell.

Pinging @ltdrdata - should probably have some logic for node class collisions with popular node sets as this could in theory be used as an exploit to force people to install unknown nodes. Also seems like an issue with the script that is used to parse node class mappings picking up any instance of NODE_CLASS_MAPPINGS dicts even if they're not used, I think...?

@city96
Copy link
Owner

city96 commented Dec 16, 2024

The actual issue with the base nodes only listing gguf files seems to be caused by this bit of code in that linked node pack overriding the file list for the built in nodes.

Something like this would work if the goal is to add .gguf to the base path list:

orig = folder_paths.folder_names_and_paths.get("diffusion_models", folder_paths.folder_names_and_paths.get("unet", [[], set()]))
folder_paths.folder_names_and_paths["diffusion_models"] = (orig[0], {*orig[1], ".gguf"})

Though it might just be easier to create a new custom key and list both i.e how we do it here and here. @krich-cto

@ltdrdata
Copy link

ltdrdata commented Dec 16, 2024

Looks like that nodepack includes the ComfyUI-GGUF nodeset in a subfolder for use in their own custom nodes, which makes sense.

But for some reason the manager think it's required for any workflow that includes our nodes as it gets listed here as a duplicate despite never being exported here as far as I can tell.

Pinging @ltdrdata - should probably have some logic for node class collisions with popular node sets as this could in theory be used as an exploit to force people to install unknown nodes. Also seems like an issue with the script that is used to parse node class mappings picking up any instance of NODE_CLASS_MAPPINGS dicts even if they're not used, I think...?

This isn’t an issue that can be resolved by ComfyUI-Manager; it seems like it needs to be addressed on the core side.
We are in the process of establishing a standardization policy for custom nodes. It seems necessary to include such cases in the guidelines.

@city96
Copy link
Owner

city96 commented Dec 16, 2024

Unsure what you mean by core side but I think the main problem at hand should be resolvable by updating the db entry as the other node pack in question doesn't actually provide any of the conflicting nodes as far as I can tell, and they're just erroneously picked up despite not being imported anywhere (presumably because of a recursive scan function).

@ltdrdata
Copy link

ltdrdata commented Dec 16, 2024

Oh, I thought you were referring to the issue of another node overriding your nodes.

I added the ComfyUI-GGUF nodes as a preemption nodes.

@ZHAORITIANisavailable
Copy link
Author

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

Thanks that works for me

@Pasha488586
Copy link

Thank you, deleting helped me ComfyUI-Flow-Control

@elnumerof
Copy link

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

Thanks that works for me

and... how to uninstall [ComfyUI-Flow-Control] ???? thanks!

@roofling
Copy link

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

Thanks that works for me

and... how to uninstall [ComfyUI-Flow-Control] ???? thanks!

You can uninstall any custom node by going into the comfy manager custom node list within comfyui. There will be a big list of custom nodes. Search your node in the text box to find it. Then click the uninstall button.

@elnumerof
Copy link

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

Thanks that works for me

and... how to uninstall [ComfyUI-Flow-Control] ???? thanks!

You can uninstall any custom node by going into the comfy manager custom node list within comfyui. There will be a big list of custom nodes. Search your node in the text box to find it. Then click the uninstall button.

now it works! Wow, it had been 3 days without a solution and reading in several forums I found this thread.. Thanks for the help!!

@Pythonpa
Copy link

I just had this exact issue. After I uninstalled the ComfyUI-Flow-Control custom node, everything worked properly again. So it seems this custom node is not the problem. I am not sure why Comfy Manager is recommending I install Flow Control since it doesn't seem to actually be required.

Great! It works for me~

@HenriJohansson
Copy link

HenriJohansson commented Dec 25, 2024

The actual issue with the base nodes only listing gguf files seems to be caused by this bit of code in that linked node pack overriding the file list for the built in nodes.

Something like this would work if the goal is to add .gguf to the base path list:

orig = folder_paths.folder_names_and_paths.get("diffusion_models", folder_paths.folder_names_and_paths.get("unet", [[], set()]))
folder_paths.folder_names_and_paths["diffusion_models"] = (orig[0], {*orig[1], ".gguf"})

Though it might just be easier to create a new custom key and list both i.e how we do it here and here. @krich-cto

In the code I got from your repository had and if statement before that piece of code which caused the code block to be skipped since folder_paths.folder_names_and_paths already had the member "clip_gguf", but for some reason inside clip_gguf the path for it was empty. This code which is now in the master branch skips the copying of the path and that is reason for these issues people are having. I don't know why the dictionary at this point has the variable inside of it without a path partially initialized, but I guess there is a reason?
Master branch code nodes.py, line 21:

if "clip_gguf" not in folder_paths.folder_names_and_paths:
    orig = folder_paths.folder_names_and_paths.get("text_encoders", folder_paths.folder_names_and_paths.get("clip", [[], set()]))
    folder_paths.folder_names_and_paths["clip_gguf"] = (orig[0], {".gguf"})

Could you push a change removing the if statement?

Ps. After this I can see .gguf files again
image

@ltdrdata
Copy link

The ComfyUI-Flow-Control node is moved to dev channel. And I added a warning message to description.

@karankatke
Copy link

karankatke commented Dec 26, 2024

i have never installed ComfyUI Flow Control node and i still have this same issue. Please help, basically .safetensor files are not shown in Unet Loader

EDIT : i think i made it work by just creating a folder in the unet folder called safetensor and it showed up

@city96
Copy link
Owner

city96 commented Dec 26, 2024

@HenriJohansson If I'm reading it right, then your specific issue is different from the one addressed here (which is about the built-in ComfyUI node not showing safetensors files). Anyway, here's a patch that probably fixes it, though it'd be good to know how/why the key is already present in the list. 3dc384b (also, editing on my laptop so if it breaks horribly I'll just revert it lol)

@karankatke The first thing I'd try is track down if the issue exists with no custom nodes installed/enabled, and if not add them back 1 by 1 to find out which one breaks it.

@HenriJohansson
Copy link

HenriJohansson commented Dec 26, 2024 via email

@jurgenwerk
Copy link

jurgenwerk commented Dec 31, 2024

I have a fresh installation of ComfyUI and I have a file flux1Dev_v10.safetensors in the unet folder. However, the Load Diffusion Model will only display "undefined". The solutions to this problem are mentioning to remove the ComfyUI-Flow-Control node but I have never installed it nor it is present in my ComfyUI/custom_nodes folder.

image

I am not sure what to do here. Any help is appreciated.

@chichungliu42
Copy link

I have the same issue. I only installed the ComfyUI-Manager and ComfyUI-GGUF custom nodes.

@DamonTenchi
Copy link

I have the same issue. I only installed the ComfyUI-Manager and ComfyUI-GGUF custom nodes.

Same here. installed ComfyUI manager v3.3.9 and running python V3.12.7
Ive never had Flow control installed. Is there any solution to this or do we need to wait for an update?

@ltdrdata
Copy link

I have the same issue. I only installed the ComfyUI-Manager and ComfyUI-GGUF custom nodes.

Same here. installed ComfyUI manager v3.3.9 and running python V3.12.7 Ive never had Flow control installed. Is there any solution to this or do we need to wait for an update?

Disable all custom nodes except ComfyUI-GGUF and try again.

@bassam-radi
Copy link

I have the same issue. I only installed the ComfyUI-Manager and ComfyUI-GGUF custom nodes.

Same here. installed ComfyUI manager v3.3.9 and running python V3.12.7 Ive never had Flow control installed. Is there any solution to this or do we need to wait for an update?

Disable all custom nodes except ComfyUI-GGUF and try again.

i disabled everything expect GGUF and still not working

@jurgenwerk
Copy link

I fixed my difussion model not showing up by restarting ComfyUI. Sometimes when you put stuff in ComfyUI folders it doesn't detect it immediately.

@bassam-radi
Copy link

The actual issue with the base nodes only listing gguf files seems to be caused by this bit of code in that linked node pack overriding the file list for the built in nodes.

Something like this would work if the goal is to add .gguf to the base path list:

orig = folder_paths.folder_names_and_paths.get("diffusion_models", folder_paths.folder_names_and_paths.get("unet", [[], set()]))
folder_paths.folder_names_and_paths["diffusion_models"] = (orig[0], {*orig[1], ".gguf"})

Though it might just be easier to create a new custom key and list both i.e how we do it here and here. @krich-cto

this worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests