Commit Graph

25 Commits

Author SHA1 Message Date
Jacob Segal
36b2214e30 Execution Model Inversion
This PR inverts the execution model -- from recursively calling nodes to
using a topological sort of the nodes. This change allows for
modification of the node graph during execution. This allows for two
major advantages:

    1. The implementation of lazy evaluation in nodes. For example, if a
    "Mix Images" node has a mix factor of exactly 0.0, the second image
    input doesn't even need to be evaluated (and visa-versa if the mix
    factor is 1.0).

    2. Dynamic expansion of nodes. This allows for the creation of dynamic
    "node groups". Specifically, custom nodes can return subgraphs that
    replace the original node in the graph. This is an incredibly
    powerful concept. Using this functionality, it was easy to
    implement:
        a. Components (a.k.a. node groups)
        b. Flow control (i.e. while loops) via tail recursion
        c. All-in-one nodes that replicate the WebUI functionality
        d. and more
    All of those were able to be implemented entirely via custom nodes,
    so those features are *not* a part of this PR. (There are some
    front-end changes that should occur before that functionality is
    made widely available, particularly around variant sockets.)

The custom nodes associated with this PR can be found at:
https://github.com/BadCafeCode/execution-inversion-demo-comfyui

Note that some of them require that variant socket types ("*") be
enabled.
2024-01-28 20:48:42 -08:00
pythongosssss
235727fed7
Store user settings/data on the server and multi user support (#2160)
* wip per user data

* Rename, hide menu

* better error
rework default user

* store pretty

* Add userdata endpoints
Change nodetemplates to userdata

* add multi user message

* make normal arg

* Fix tests

* Ignore user dir

* user tests

* Changed to default to browser storage and add server-storage arg

* fix crash on empty templates

* fix settings added before load

* ignore parse errors
2024-01-08 17:06:44 -05:00
Jack Bauer
6aa1bcd601
Remove hard coded max_items in history API 2023-11-26 17:23:11 +04:00
comfyanonymous
2dd5b4dd78 Only show last 200 elements in the UI history tab. 2023-11-20 16:56:29 -05:00
pythongosssss
43ae9fe721 add system stats function 2023-08-04 08:29:51 +01:00
comfyanonymous
907c9fbf0d Refactor to make it easier to set the api path. 2023-07-14 00:50:49 -04:00
comfyanonymous
30ea187160 Merge branch 'use-relative-paths' of https://github.com/mcmonkey4eva/ComfyUI 2023-07-13 23:56:29 -04:00
comfyanonymous
876dadca84 Highlight nodes with errors in red even when workflow works fine. 2023-07-13 10:07:50 -04:00
Alex "mcmonkey" Goodwin
5797ff89b0 use relative paths for all web connections
This enables local reverse-proxies to host ComfyUI on a path, eg "http://example.com/ComfyUI/" in such a way that at least everything I tested works. Without this patch, proxying ComfyUI in this way will yield errors.
2023-07-10 02:09:03 -07:00
ssit
0c874e604c Fix unhandled message "execution_cached" 2023-06-12 17:16:03 -04:00
space-nuko
1c40296d74 Fix 2023-06-05 09:20:20 -05:00
space-nuko
b4f434ee66 Preview sampled images with TAESD 2023-06-05 09:20:17 -05:00
space-nuko
6b2a8a3845 Show message in the frontend if prompt execution raises an exception 2023-05-27 21:06:07 -05:00
comfyanonymous
e7b9d2c02c /prompt endpoint error is now in json format. 2023-05-14 01:30:58 -04:00
pythongosssss
c8355ed39f use window.name instead of session storage
- prevents duplicate stealing session id
2023-04-23 10:31:21 +01:00
pythongosssss
8d0a142321 adds simple access to server from custom nodes 2023-03-24 11:39:09 +00:00
pythongosssss
85989c74e5 Updated a1111 pnginfo importer, supports:
- model name, other basic settings
 - clip skip
 - hr upscale
 - loras
 - embeddings
2023-03-12 21:36:42 +00:00
pythongosssss
5c55c93367 Updated to reuse session id if available 2023-03-07 13:24:15 +00:00
pythongosssss
4bdfbb3379 Fixed check for polling 2023-03-06 16:47:02 +00:00
pythongosssss
9913114044 Only poll if it has never opened 2023-03-03 21:13:11 +00:00
pythongosssss
592b377ac4 Added dynamic loading of extensions 2023-03-03 19:05:39 +00:00
pythongosssss
2e52d01cdc Documenting methods 2023-03-03 15:47:33 +00:00
pythongosssss
a5c5c97ded More work on UI 2023-03-03 15:20:49 +00:00
pythongosssss
2eaa664089
Refactored sockets 2023-03-02 21:33:50 +00:00
pythongosssss
5e25c77074
Initial refactoring changes
- Moved to web folder
 - Splitting into individual files
2023-03-02 20:00:06 +00:00