Kinglord / ComfyUI_LoRA_Sidebar

Fast, visual and customizable LoRA sidebar packed with features for ComfyUI
GNU General Public License v3.0
30 stars 2 forks source link

Lora keep duplicating after generating an image with RGThree Power Lora Loader #3

Open DJLegends1011 opened 2 weeks ago

DJLegends1011 commented 2 weeks ago

Been noticing that every time I drag and drop loras from side bar it has been increasing twice the amount of loras I need after creating an image usually it starts at 2 but the max it can get at long generation is this below image_2024-11-09_045317303

DJLegends1011 commented 2 weeks ago

usually I have to restart ComfyUI to get rid of the issue but it keeps returning

Kinglord commented 2 weeks ago

I just pushed a massive update to the sidebar, please give the new version a spin and let me know if you still have this issue. I tested this on my end and don't have any random duplications. If it still happens in the new version let me know if only certain loras cause it or all and any other repo steps I might need to take. Cheers!

DJLegends1011 commented 2 weeks ago

I will do you make ComfyUI even better than it is can't wait to see your future plugins!

DJLegends1011 commented 2 weeks ago

I just pushed a massive update to the sidebar, please give the new version a spin and let me know if you still have this issue. I tested this on my end and don't have any random duplications. If it still happens in the new version let me know if only certain loras cause it or all and any other repo steps I might need to take. Cheers!

now i'm having an issue in which no LORAs appear after image generation for sidebar image_2024-11-10_015018727

DJLegends1011 commented 2 weeks ago

heres error logs

[LoRA Sidebar]: Starting initial cache build... [LoRA Sidebar]: Building LoRA cache |▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 1.5% (1/68)[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json [LoRA Sidebar]: Building LoRA cache |██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 5.9% (4/68)[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json [LoRA Sidebar]: Building LoRA cache |█████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 10.3% (7/68)[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [LoRA Sidebar]: Building LoRA cache |██████████████████████████████████████████████████| 100.0% (68/68) [LoRA Sidebar]: Cache build complete! 2024-11-10 04:31:51,711 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:31:51,711 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:31:51,711 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:31:51,712 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:31:51,713 - ComfyUI_LoRA_Sidebar - ERROR - Error building initial cache: 'NoneType' object has no attribute 'lower' Error building initial cache: 'NoneType' object has no attribute 'lower' Error building cache: 'NoneType' object has no attribute 'lower'

DJLegends1011 commented 2 weeks ago

better logging

2024-11-10 04:39:08,463 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:39:08,464 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:39:08,464 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 04:39:08,464 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown Error handling request Traceback (most recent call last): File "D:\AiVid\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_protocol.py", line 462, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_app.py", line 537, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\server.py", line 63, in cache_control response: web.Response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\server.py", line 141, in origin_only_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\server.py", line 75, in cors_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar__init.py", line 1730, in get_lora_data ordered_loras = await sort_loras_with_categories(lora_data, settings, favorites, sort_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar__init__.py", line 2676, in sort_loras_with_categories loras = sorted(loras, key=sort_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AiVid\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar\init__.py", line 2661, in sort_key return lora.get('name', '').lower() ^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'lower'

DJLegends1011 commented 2 weeks ago

changing from

return lora.get('name', '').lower()

to this

return (lora.get('name') or '').lower()

seems to fix the issue in the initialized python code

DJLegends1011 commented 2 weeks ago

but the duplication issue still persists...

DJLegends1011 commented 2 weeks ago

worse that some of my lora is not appearing...

Kinglord commented 2 weeks ago

That edit might get things working but it's not going to address the core issue, it means that for some reason the code was unable to grab a name from the lora folders provided by comfy and therefore can't perform a lower operation since there's nothing there. I can make that fail gracefully and throw the lora out, but I have no idea what would cause it to not be able to get a lora name. I'll push out a fix with that change shortly so it can at least work, but I really want to know what is making it fail to pull a name.

Kinglord commented 2 weeks ago

I just pushed a massive update to the sidebar, please give the new version a spin and let me know if you still have this issue. I tested this on my end and don't have any random duplications. If it still happens in the new version let me know if only certain loras cause it or all and any other repo steps I might need to take. Cheers!

now i'm having an issue in which no LORAs appear after image generation for sidebar image_2024-11-10_015018727

This sounds to me like some interference happening from some other UI plugin to Comfy. There's no lora sidebar code that is run when a WF is executed, it's solely an isolated UI window. If you can tell me what other plugins you have installed I can see if one of them is interfering with the sidebar.

Kinglord commented 2 weeks ago

FWIW I test this daily with a ~9k lora collection including symlinks across drives, and you have a relatively small dataset that it seems to be failing on, if you're willing to share more info with me then I can see what it is with your setup that is causing issues like these (especially dupes?). Also if you haven't tried it you might want to use the option to rebuild the data files with - Reprocess All LoRAs on Refresh and see if that helps.

Kinglord commented 2 weeks ago

I pushed out a quick fix for this that should force the bad loras to be sorted out of order at the bottom of your categories, hopefully that makes them easier to spot and we can figure out what's causing issues.

DJLegends1011 commented 2 weeks ago

heres all the custom nodes that I have currently image_2024-11-10_205638554

DJLegends1011 commented 2 weeks ago

FWIW I test this daily with a ~9k lora collection including symlinks across drives, and you have a relatively small dataset that it seems to be failing on, if you're willing to share more info with me then I can see what it is with your setup that is causing issues like these (especially dupes?). Also if you haven't tried it you might want to use the option to rebuild the data files with - Reprocess All LoRAs on Refresh and see if that helps.

dam I have rookie numbers lol

DJLegends1011 commented 2 weeks ago

now i'm having this issue have a total of 63 but can't access the last 4 loras image_2024-11-10_211209903

DJLegends1011 commented 2 weeks ago

2024-11-10 21:11:12,076 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 21:11:12,076 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 21:11:12,077 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown 2024-11-10 21:11:12,077 - ComfyUI_LoRA_Sidebar - ERROR - Failed to parse createdDate for None: unknown Failed to parse createdDate for None: unknown

heres the error for those 4

Kinglord commented 2 weeks ago

heres all the custom nodes that I have currently image_2024-11-10_205638554

Hmm, I have almost all those myself and none of those look like they have issues, my best guess is there's some data issues that are propagating out to cause other issues down the line with rgthree - i do a very hacky thing to get loras into rgthree so if there's bad data there it could do weird things. Once we get rid of all the data errors hopefully the dupe issue also goes away.

DJLegends1011 commented 2 weeks ago

i could try clean install of ComfyUI...

Kinglord commented 2 weeks ago

Not needed, I don't think 😁 - I just pushed a new version that should handle bad data both during processing and caching, lets see if the rgthree issue persists after this. If it does I'll ask you to send me some files and i can try to repro it on my side.

DJLegends1011 commented 2 weeks ago

great!

DJLegends1011 commented 2 weeks ago

tried latest and when dragging lora to existing power lora it now drags 2-3 instead of 1

DJLegends1011 commented 2 weeks ago

besides above heres what I got image_2024-11-10_225517792 along with some logging comfyui.log

Kinglord commented 2 weeks ago

Ok, new version is out that auto fixes bad data even if you don't manually refresh. That should solve any data problems. I'm trying to understand what you mean by it drags 2 or 3 instead of one and I don't get it honestly so let me ask some questions,. When you say it drags 2-3 instead of 1:

Thanks for the info!

DJLegends1011 commented 2 weeks ago

Ok, new version is out that auto fixes bad data even if you don't manually refresh. That should solve any data problems. I'm trying to understand what you mean by it drags 2 or 3 instead of one and I don't get it honestly so let me ask some questions,. When you say it drags 2-3 instead of 1:

  • Is it dragging 2-3 LoRAs from the sidebar to the canvas, I mean do you see 3 IMAGES when you click and drag, like it's grabbed multiple LoRAs at once?
  • Is it just grabbing one LoRA but then it creates 2-3 copies of it? If this is the case does it only do it on rgthree nodes? Does it create 2-3 normal nodes if you use the core node?
  • Are you using anything like a touchscreen or are you using a normal mouse?

Thanks for the info!

its the second issue

DJLegends1011 commented 2 weeks ago

and it only does it on RGThree nodes using singular works fine

DJLegends1011 commented 1 week ago

Ok, new version is out that auto fixes bad data even if you don't manually refresh. That should solve any data problems. I'm trying to understand what you mean by it drags 2 or 3 instead of one and I don't get it honestly so let me ask some questions,. When you say it drags 2-3 instead of 1:

  • Is it dragging 2-3 LoRAs from the sidebar to the canvas, I mean do you see 3 IMAGES when you click and drag, like it's grabbed multiple LoRAs at once?
  • Is it just grabbing one LoRA but then it creates 2-3 copies of it? If this is the case does it only do it on rgthree nodes? Does it create 2-3 normal nodes if you use the core node?
  • Are you using anything like a touchscreen or are you using a normal mouse?

Thanks for the info!

and it doesn't even load lmfao

Cannot import D:\AiVid\ComfyUI\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar module for custom nodes: No module named 'dateutil'

Kinglord commented 1 week ago

I replied to your other post, but it's not loading because you don't have a module i used for the data fixing I did in that version, you can install it yourself with pip or wait for me to refactor the code to not use that lib

DJLegends1011 commented 1 week ago

ill wait since some reason your module can't detect it

Kinglord commented 2 days ago

This issue is fixed in the latest build for me, but you can see if you can get it to happen still. The root cause was a fun one, but all the rgthree stuff should be fine now! @DJLegends1011

DJLegends1011 commented 2 days ago

will do!

DJLegends1011 commented 2 days ago

so far everything works!