Commit Graph

84 Commits

Author SHA1 Message Date
doctorpangloss
87ab9d42d0 Merge branch 'execution_model_inversion' of github.com:guill/ComfyUI into pr-execution 2024-07-19 17:49:41 -07:00
doctorpangloss
cc99d89ac6 Merge branch 'master' of github.com:comfyanonymous/ComfyUI 2024-07-18 16:31:21 -07:00
Thomas Ward
c5a48b15bd
Make default hash lib configurable without code changes via CLI argument (#3947)
* cli_args: Add --duplicate-check-hash-function.

* server.py: compare_image_hash configurable hash function

Uses an argument added in cli_args to specify the type of hashing to default to for duplicate hash checking.  Uses an `eval()` to identify the specific hashlib class to utilize, but ultimately safely operates because we have specific options and only those options/choices in the arg parser.  So we don't have any unsafe input there.

* Add hasher() to node_helpers

* hashlib selection moved to node_helpers

* default-hashing-function instead of dupe checking hasher

This makes a default-hashing-function option instead of previous selected option.

* Use args.default_hashing_function

* Use safer handling for node_helpers.hasher()

Uses a safer handling method than `eval` to evaluate default hashing function.

* Stray parentheses are evil.

* Indentation fix.

Somehow when I hit save I didn't notice I missed a space to make indentation work proper.  Oops!
2024-07-16 18:27:09 -04:00
Chenlei Hu
99458e8aca
Add FrontendManager to manage non-default front-end impl (#3897)
* Add frontend manager

* Add tests

* nit

* Add unit test to github CI

* Fix path

* nit

* ignore

* Add logging

* Install test deps

* Remove 'stable' keyword support

* Update test

* Add web-root arg

* Rename web-root to front-end-root

* Add test on non-exist version number

* Use repo owner/name to replace hard coded provider list

* Inline cmd args

* nit

* Fix unit test
2024-07-16 11:26:11 -04:00
doctorpangloss
3d67224937 Improve model downloading from Hugging Face Hub 2024-07-09 12:57:33 -07:00
doctorpangloss
a1fee05e60 Improve configuration via files, including automatically updating configuration when configuration files change. 2024-07-08 10:01:17 -07:00
doctorpangloss
a13088ccec Merge upstream 2024-07-04 11:58:55 -07:00
Chenlei Hu
9dd549e253
Add --no-custom-node cmd flag (#3903)
* Add --no-custom-node cmd flag

* nit
2024-07-01 17:54:03 -04:00
doctorpangloss
8cdc246450 Merge branch 'master' of github.com:comfyanonymous/ComfyUI 2024-06-17 16:19:48 -07:00
Jacob Segal
9d624564fa Merge branch 'master' into execution_model_inversion 2024-06-16 19:08:09 -07:00
comfyanonymous
0ec513d877 Add a --force-channels-last to inference models in channel last mode. 2024-06-15 01:08:12 -04:00
doctorpangloss
a79ccd625f bf16 selection for AMD 2024-05-22 22:45:15 -07:00
doctorpangloss
3d98440fb7 Merge branch 'master' of github.com:comfyanonymous/ComfyUI 2024-05-16 14:28:49 -07:00
comfyanonymous
46daf0a9a7 Add debug options to force on and off attention upcasting. 2024-05-16 04:09:41 -04:00
comfyanonymous
bb4940d837 Only enable attention upcasting on models that actually need it. 2024-05-14 17:00:50 -04:00
doctorpangloss
aa0cfb54ce Refine configuration of OpenTelemetry 2024-05-07 17:04:31 -07:00
Garrett Sutula
bacce529fb
Add TLS Support (#3312)
* Add TLS Support

* Add to readme

* Add guidance for windows users on generating certificates

* Add guidance for windows users on generating certificates

* Fix typo
2024-04-30 20:17:02 -04:00
doctorpangloss
2643730acc Tracing 2024-04-17 08:20:07 -07:00
doctorpangloss
e49c662c7f Enable previews by default and over distributed channels 2024-04-09 13:15:05 -07:00
Jacob Segal
6b6a93cc5d Merge branch 'master' into execution_model_inversion 2024-03-23 16:31:14 -07:00
doctorpangloss
feae8c679b Add nodes to support OpenAPI and similar backend workflows 2024-03-22 14:22:50 -07:00
doctorpangloss
0db040cc47 Improve API support
- Removed /api/v1/images because you should use your own CDN style
   image host and /view for maximum compatibility
 - The /api/v1/prompts POST application/json response will now return
   the outputs dictionary
 - Caching has been removed
 - More tests
 - Subdirectory prefixes are now supported
 - Fixed an issue where a Linux frontend and Windows backend would have
   paths that could not interact with each other correctly
2024-03-21 16:24:22 -07:00
doctorpangloss
a892411cf8 Add known controlnet models and add --disable-known-models to prevent it from appearing or downloading 2024-03-13 18:11:16 -07:00
doctorpangloss
93cdef65a4 Merge upstream 2024-03-12 09:49:47 -07:00
comfyanonymous
0ed72befe1 Change log levels.
Logging level now defaults to info. --verbose sets it to debug.
2024-03-11 13:54:56 -04:00
doctorpangloss
00728eb20f Merge upstream 2024-03-11 09:32:57 -07:00
comfyanonymous
65397ce601 Replace prints with logging and add --verbose argument. 2024-03-10 12:14:23 -04:00
Jacob Segal
6d09dd70f8 Make custom VALIDATE_INPUTS skip normal validation
Additionally, if `VALIDATE_INPUTS` takes an argument named `input_types`,
that variable will be a dictionary of the socket type of all incoming
connections. If that argument exists, normal socket type validation will
not occur. This removes the last hurdle for enabling variant types
entirely from custom nodes, so I've removed that command-line option.

I've added appropriate unit tests for these changes.
2024-02-24 23:17:01 -08:00
doctorpangloss
fca0d8a050 Plugins can add configuration 2024-02-22 11:58:40 -08:00
doctorpangloss
06e74226df Add external address parameter 2024-02-15 17:39:15 -08:00
Jacob Segal
12627ca75a Add a command-line argument to enable variants
This allows the use of nodes that have sockets of type '*' without
applying a patch to the code.
2024-02-14 21:06:53 -08:00
doctorpangloss
f195230e2a More tweaks to cli args 2024-02-09 01:40:27 -08:00
doctorpangloss
a3f9d007d4 Fix CLI args issues 2024-02-09 01:20:57 -08:00
doctorpangloss
d5bcaa515c Specify worker,frontend as default roles 2024-02-08 20:37:16 -08:00
doctorpangloss
0673262940 Fix entrypoints, add comfyui-worker entrypoint 2024-02-08 19:08:42 -08:00
doctorpangloss
72e92514a4 Better compatibility with pre-existing prompt_worker method 2024-02-08 18:07:37 -08:00
doctorpangloss
92898b8c9d Improved support for distributed queues 2024-02-08 14:55:07 -08:00
doctorpangloss
3367362cec Fix directml again now that I understand what the command line is doing 2024-02-08 10:17:49 -08:00
doctorpangloss
123c512a84 Fix compatibility with Python 3.9, 3.10, fix Configuration class declaration issue 2024-02-07 21:52:20 -08:00
doctorpangloss
1b2ea61345 Improved API support
- Run comfyui workflows directly inside other python applications using
   EmbeddedComfyClient.
 - Optional telemetry in prompts and models using anonymity preserving
   Plausible self-hosted or hosted.
 - Better OpenAPI schema
 - Basic support for distributed ComfyUI backends. Limitations: no
   progress reporting, no easy way to start your own distributed
   backend, requires RabbitMQ as a message broker.
2024-02-07 14:20:21 -08:00
doctorpangloss
2400da51e5 PyInstaller 2024-01-29 17:02:45 -08:00
doctorpangloss
82edb2ff0e Merge with latest upstream. 2024-01-29 15:06:31 -08:00
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
comfyanonymous
53c8a99e6c Make server storage the default.
Remove --server-storage argument.
2024-01-11 17:21:40 -05: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
doctorpangloss
369aeb598f Merge upstream, fix 3.12 compatibility, fix nightlies issue, fix broken node 2024-01-03 16:00:36 -08:00
comfyanonymous
1b103e0cb2 Add argument to run the VAE on the CPU. 2023-12-30 05:49:07 -05:00
comfyanonymous
2f9d6a97ec Add --deterministic option to make pytorch use deterministic algorithms. 2023-12-17 16:59:21 -05:00
comfyanonymous
b0aab1e4ea Add an option --fp16-unet to force using fp16 for the unet. 2023-12-11 18:36:29 -05:00
comfyanonymous
31b0f6f3d8 UNET weights can now be stored in fp8.
--fp8_e4m3fn-unet and --fp8_e5m2-unet are the two different formats
supported by pytorch.
2023-12-04 11:10:00 -05:00