shiimizu / ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++
GNU General Public License v3.0
190 stars 14 forks source link

CLIP Text Encode++ in a1111 mode, causes loss of IT/s after very few image gen's #4

Closed MotorMan closed 1 year ago

MotorMan commented 1 year ago

found this earlier today when i started actually watching the IT/s's on my gen's, after noticing they were going from less than 280sec to over 400 sec.

it seems it's really simple to reproduce this. just load up an updated comfyUI, load the default workflow, then replace the default CLIP Text Encode's with CLIP Text Encode++, and then set them to A1111, and just put a basic prompt in there, no need for weights or my favorite, prompt switching (aka [x|x|x].). then set the steps and resolution on the sampler to a something high that will take at least 10-20 seconds to complete, the higher, the easier it is to see the slow down. i use 720x720 and 100 steps, and within 4 images it's showing the IT/s loss. and within 11 images, it's lost over 1IT/s also noticed during this, the GPU is only using ~74% at start, and by the 11th image, it's down to just ~57%, CPU usage is also quite high during all of the gens.

and a side note, with the same setup, and in comfy/comfy++ mode, it nice and solid on the IT/s's, so it's just the auto1111 parser that is causing the issue. and another side note, this is on SD V1.5 models.

and just so you can have a general idea of what the loss looks like for me, i'll paste my notes here. these are all in period removed format, meaning 828 would be 8.28IT/s. smZnodes in comfy mode - 828,844,844,838,838,837,836,838,834,831,832,831,827,826,823,827,824,824,826 ----- 10min later, 824,823,823,824,823,826, smZnodes in a1111 mode - 601,602,581,569,546,532,519,504,496,484, smZnodes in a1111 mode, short neg - 610,616,600,577,562,544,528,516,496,486,480,466 smZnodes in full mode - 613,620,602,578,560,543,529,515,502,492,480, smZnodes in compel mode - 603,616,591,571,553,539,525,516,500,489,480, smZnodes in fixed A mode - 617,621,604,577,565,545,532,518,504,494,484, smZnodes in a1, multi-cond off - 607,620,603,577,564,548,525,518,503,495,482, smZnodes in a1, all off - 610,617,601,574,560,542,529,518,501,489,480, smZnodes in a1, bot 2 on - 563,575,554,537,517,502,487,481,470,461,452

hope all this info helps!

shiimizu commented 1 year ago

Thanks for the report :) The latest commit (https://github.com/shiimizu/ComfyUI_smZNodes/commit/e2185fb453abbe4ae92c257e84be34d10eb518b4) should have this fixed.

MotorMan commented 1 year ago

first results look like it indeed has been fixed, YAY! (and all while writing this out nice and solid IT/s's!) it did pop up another issue, but i'm not so sure it might be your node causing it, happens when i use two CLIP Text Encode++'s for positive and negative, something about "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!" but i think i have been hearing this pop up with other nodes, so i'm gonna close this one and call it fixed, then probably research this error a bit more, and if it is from the latest commit, then i'll just open a new issue. thanks for all the help!