TinyTerra / ComfyUI_tinyterraNodes

A selection of nodes for Stable Diffusion ComfyUI
GNU General Public License v3.0
393 stars 45 forks source link

Simple XYPlot with new KSampler? #101

Closed tiko13 closed 3 months ago

tiko13 commented 5 months ago

Hello, please is it possible to make simple XY Plot to work with new KSampler? The advanced XYPlot hangs my front end indefinitely on complex workflows (Prompt control, cfg rescale and some input switches). only UI hangs though, upon reopening the tab without restarting backend, it works again. No errors logged obviously

TinyTerra commented 5 months ago

If you have a workflow you're happy to share I can try to run through some debugging. I dont currently have plans of re-introducing the old xyplot, but we'll see

tiko13 commented 5 months ago

Sure, I have stripped the workflow of my custom nodes (used just to simplify many detailing steps) and also all of the nodes that aren't needed to reproduce the issue. To reproduce (hopefully) connect the advanced XYPlot node to KSampler, and try clicking the text boxes, it will hang on the front end layer, you can get out of it by closing and reopening browser tab, no restart of comfy needed workflow (4).json thank you

tiko13 commented 5 months ago

also if you disconnect steps, cfg and steps, the widget starts to work but the displayed data do not make much sense in how they are organized image

TinyTerra commented 5 months ago

The front-end hang should be fixed in the latest push.. although there is currently an issue with Pillow-9.5.0 that is causing a shadow crash when loading a font. From my testing with your workflow installing WAS suite force installs the lower Pillow version.. working on a fix for it but in the meantime just something to be aware of

tiko13 commented 5 months ago

I have retested it and it now works, and snappily at that, thank you for great work. Btw the advanced xyPlot is awesome

tiko13 commented 5 months ago

Maybe one tiny improvement would be an option to 'add all' of a particular field, I will try looking at the code to see if i can figure it out, if yes i can create a pr

TinyTerra commented 5 months ago

I'm working on adding a node based input that would work alongside the current xyPlot node for simpler range based plots, and the like, that may be slightly more limited or constrained than using the text box + syntax, but that option will still be there for more complex plotting. Glad it's working for you though! and by all means if you have an idea you think will work better let me know :)

tiko13 commented 5 months ago

I am not sure if i do anything wrong but while the node parsing now works flawlessly the XYPlot output only ever outputs one image with description of all the combinations. This happens even when i completely strip the workflow to the bare minimum without any other nodes image workflow (41).json

TinyTerra commented 5 months ago

Each row/column is denoted by the syntax

so in the case of the example here, you want to use the following: X:

<1:v_label>
[784:ckpt_name='.XL\juggernautXL_v9Rundiffusionphoto2.safetensors']
<2:v_label>
[784:ckpt_name='.XL\epicrealismXL_v4Photoreal.safetensors']

Y:

<1:v_label>
[799:seed='0']
<2:v_label>
[799:seed='1']

You can add these with the 'Add Plot Line' option in the dropdown

TinyTerra commented 5 months ago

The Preview image node you have will only output a single image though, as it and the latent output use the latent_index option in the xyPlot node to select a single image. I'm not too happy with how that functions at the moment so it's subject to change - especially if other people don't think it should work that way as well

tiko13 commented 5 months ago

Ah, that's on me for not reading the documentation (I'm a developer after all and we categorically refuse to do so :D ). Maybe it would be cool when using the dropdowns to add axis to also add the

TinyTerra commented 5 months ago

Completely understand haha I've got it doing that for the first value, but seeing as it's possible to modify multiple values for each point that may get in the way in some cases. I'll think on it