WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.19k stars 178 forks source link

Speed up BLIP? #95

Closed MoonMoon82 closed 1 year ago

MoonMoon82 commented 1 year ago

I'm using the BLIP node to get more accurat text for image segmentation. It seems that everytime the BLIP node is being executed the model is loaded into memory. Is there a way speed this up? Maybe separate model loading and executing in different nodes?

WASasquatch commented 1 year ago

I could probably do that, yeah. I personally like things loading and unloading so I can do massive images though. That's the logic I deployed with WAS-NS

WASasquatch commented 1 year ago

I'll add a optional BLIP_MODEL input which will override creation of the model in the analyze node.

WASasquatch commented 1 year ago

Alright, there is the BLIP Model Loader node that you can feed as an optional input tot he BLIP analyze node.

Similarly MiDaS Depth Approx has a MiDaS Model Loader node now too.

MoonMoon82 commented 1 year ago

Thank you very much! It boosted my workflow from ~60sec to ~26sec !

MoonMoon82 commented 1 year ago

@WASasquatch Just curious.. wouldn't it also speed up workflows if the CLIPSeg Masking Node also gets a separate Model Loading node?

WASasquatch commented 1 year ago

Added optional CLIPSeg Model Loader. Also exposed the model string, in case there ever is other models to use.

MoonMoon82 commented 1 year ago

@WASasquatch thx! I just tested it! Works great!