space-nuko / comfybox Goto Github PK
View Code? Open in Web Editor NEWCustomizable Stable Diffusion frontend for ComfyUI
License: GNU General Public License v3.0
Customizable Stable Diffusion frontend for ComfyUI
License: GNU General Public License v3.0
This will get complicated with #4 introduced but will help ease adoption
Need to make sure the litegraph state is properly accounted for since it was changed in litegraph.ts
Might overlap with #9. But anyway I'll often be prompting a lot and I'll suddenly ask myself "is the LoRA/model I'm using even contributing anything to the final output?" and want to test my theory. But I want to test this on a specific prompt/seed/config that I like so I can see how changing the settings affects only that output.
If I have a bunch of stuff queued already and want to go back to those settings after my tests then it's too hard right now. Instead would be neat to have a settings stack per-workflow that you can push on/pop off or save for later. Kind of like git stash
I guess.
Also the saved data could be converted to standard prompts for reuse in other workflows, too.
It works but it's pretty barebones. Should have at least the gallery/list/queue sidebar and dark mode added.
Nodes and links added to subgraphs can have IDs that overlap with the parent graph. This is not good from ComfyBox's perspective since a lot of the data structures assume the ID is unique. It also means the prompt will become invalid on the backend because ComfyUI makes the same assumption. Might havve to replace some of the IDs when a subgraph is attached if they overlap.
Otherwise one has to wait for the image to be fully loaded by the gallery to have width/height information available, leading to some timing issues with HR Fix
Saves time having to scroll the whole UI to jump back to the prompt box
Just one long list of all the most recently generated images that can be paged through with the lightbox
For example it's pretty common for many workflows to have positive/negative conditioning boxes. So I could tag one with PositivePrompt
and then look through my prompt history for something to put into there, so long as the workflow supports a positive/negative prompt.
Requires saving the tag with the widget node but it's doable.
If a node is missing, but declared optional, treat it as NodeMode.NEVER
. Also have a new node property called optionalNodeTag
that disables the corresponding widgets in the frontend if the node is missing from the install
Some events already work in a "global" fashion like the default queue prompt button and the beforeQueued
/afterQueued
event. So it makes sense to have users create their own global events that are forwarded throughout the graph.
I wonder how this would work however. There would be some global state with a dict of Record<EventName, LGraphNode[]>
somewhere I think. When onAction
is called each node on the bus is triggered in sequence.
Support saving a chunk of the graph as a litegraph subgraph combined with the ComfyBox panel controls to append to the layout
Checking for correctness is important since the UI being saved needs to be arranged in a modular way
And even if the controls are deeply nested in either the node graph or the UI the layouting system needs to track them still if the parent is updated/deleted (super hard?!)
I think klecks is too heavy a dependency for too little benefit. Didn't want to have to mess with canvas drawing myself but I might need to
There should be at least mask editing/zooming/mobile support for now
Helps promote a cleaner look
A lot of times I generate a prompt and the images contain details in the prompt. So they're better picked up by the HR Fix pass I want to add the tags in but turn them off for other prompts.
It would be nice to have a partitioned tags editor like https://github.com/eideehi/sd-webui-better-prompt so tags can be toggled on and off without picking through the textarea
So the user can easily tell what's left out of the backend graph
Useful for discovering new configs for a workflow
Consider that the range of randomization could differ from the raw min/max of the node. For example restricting CFG scale to 3-10 instead of 0-1000000 or whatever. And that the user might want to change these often so they shouldn't be node attributes. Maybe a separate sidebar tab with some preset values dropdown
These will be saved alongside the workflow
For example a quick way of generating small, medium and large images by manipulating parameters all at once
Also a way to apply certain types of snapshots on top and excluding parameters from being saved to the snapshot. Let's you combine different snapshots targeting different features (example: upscale size and Lora model configuration) without combinational explosion
Some of the ComfyUI nodes have interesting default ranges for their parameters. Notably the steps
and seed
parameters have gigantic ranges that make adjusting them with a slider impractical.
So maybe ComfyBox should supply its own defaults for those nodes. And make them user configurable for good measure
Strategy:
I'm in ComfyBox directory in Windows 11, I tried "pnpm install" and get an error: ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE In litegraph\packages\core: No matching version found for @litegraph-ts/tsconfig@* inside the workspace
I think I will have it so all the controls in the subgraph have to be contained in a container layout first before it can be saved in a template. Then you can just move around the block where you want it.
Some widgets should always mirror each other. For example if you lock together TEnc and UNet strength for a LoRA module. There could be two sets of sliders. One has two sliders individually, the other has one slider controlling the other two.
When the locked slider is changed the value should be copied to the other two sliders. But also when the toggle is locked the value should also be copied right then. So that should be handled if a linked widget's visibility changes or through a "bang" action on the checkmark state changing
Since it's a common need could be implemented as a separate feature without the need to use any wires. In the attributes panel you'd be able to set a list of linked widgets that act as senders and receivers. It is a feature in Native Instruments REAKTOR called "IC" (Internal Connection)
I want to write a ComfyUI extension that extends the server to send back metadata/info about certain model files.
They're ui/button
and such right now, for future proofing I want them to be like ComfyBox/UI/Button
Expose outputs on all widget nodes for controlling useful frontend attributes
May want to fold in hidden/disabled into one enum
For example if I want to test new models in a standardized way, I can load the exact settings from a sidebar and insert the new model in without hunting for it a lot
People should be able to add on their own localizations if they have a special workflow. So three things are needed:
Should technically be possible with a rollup workflow
As to what can be extended:
That should be it I think. Surprisingly little to do with the backend since that's the domain of ComfyUI
REAKTOR has these, nice for easily telling what type a node is even if its title has been changed
In Max you have the ability to add an attribute as an input slot through the properties panel. For example to toggle visibility on and off. The same should be possible in ComfyBox
And for that matter, exposing the raw value of any arbitrary widget as an input/output parameter. So you can have a toggle that
Have to be very careful as widget names are assumed to be unique for the purposes of serialization
Tabs, accordion, block, and invisible (no padding/styling)
Block and invisible can be merged with CSS classes use (?)
Accordion should hide the elements with styling instead of removing them in the DOM (?)
Tabs are special since they can have multiple pages. And user might want to toggle them with the graph. But containers won't have litegraph instances bound to them like in REAKTOR since it's not a good design imo. Instead maybe a context menu option for just adding a litegraph node for the tab index
Say I want to test a bunch of CFG scales and adjust the slider a lot, would be nice to see a diff of the changes in the queued sidebar if there aren't too many in the promt.
A ComfyUI backend extension that adds all the additional networks features missing in base ComfyUI. Browsing models in a database, showing and editing model info, selecting models with an enhanced dropdown.
Many visual programming languages take this approach. Instead of coupling the UI controls to the node, the two are separated out. There is an explicit slider or button or etc. for every editable parameter.
Makes understanding where sliders are coming from much easier. And you can detach and reattach the two for more control. It's not typical to do in vanilla ComfyUI as the graph canvas itself acts as the UI the majority of the time.
Instead of having UI.Slider
and UI.Number
nodes, have just a UI.Number
node with a property called representation
where you can choose slider
, knob
, number
, stepper
...
It needs the ability to display the UI differently depending on mobile or desktop screens. Preferably using media query syntax. Also need the ability to set different attributes depending on the view type.
So you'd have the same nodes but in different places depending on the workflow being shown. And possibly different classes/other attributes for easier mobile use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.