Jedrzej Kosinski
b6a4a4c664
Support async for v3's execute function, still need to test validate_inputs, fingerprint_inputs, and check_lazy_status, fix Any type for v3 by introducing __ne__ trick from comfy_api's typing.py
2025-07-18 15:50:42 -07:00
Jedrzej Kosinski
fd9c34a3eb
Merge branch 'master' into v3-definition - async v3 nodes do not currently work, but I will fix that in the next v3 PR
2025-07-18 14:14:02 -07:00
bigcat88
9eda706e64
V3: 7 more nodes
2025-07-18 06:23:13 +03:00
Jedrzej Kosinski
e431868c0d
Satisfy ruff
2025-07-17 17:34:29 -07:00
Jedrzej Kosinski
95289b3952
Moved helper functions into internal.__init__.py instead of in io.helpers.py as the functions will likely stay the same across different revisions of v3, move helper functions out of io.py to clean up the file a bit, remove Serialization class as not needed at the moment, fix ComfyNodeInternal inherting from ABC breaking lock_class function by removing ABC parent; will need better solution later
2025-07-17 17:32:41 -07:00
Jedrzej Kosinski
ab98b65226
Separate ComfyNodeV3 into an internal base class and one that only has the functions defined that a developer cares about overriding, reference ComfyNodeInternal in execution.py/server.py instead of ComfyNodeV3 to make the code not bound to a particular version of v3 schema (once placed on api)
2025-07-17 16:09:18 -07:00
Jedrzej Kosinski
b99e3d1336
Removed V1/V3 from as_dict and get_io_type functions on Inputs/Outputs, refactor GET_NODE_INFO_V1/V3 to use a function on SchemaV3 instead, add optional key to as_dict for inputs but remove it when dealing with v1 in add_to_dict_v1, cleanup of old test code in io.py, renamed widgetType to widget_type in WidgetInputV3 definition for consistency
2025-07-17 15:29:43 -07:00
bigcat88
326a2593e0
V3: 4 more converted files (starting with A)
2025-07-17 11:22:11 +03:00
bigcat88
5c94199b04
V3: Mask nodes
2025-07-16 21:12:40 +03:00
bigcat88
d703ba9633
V3: AceStepAudio nodes
2025-07-16 15:42:14 +03:00
bigcat88
c3334ae813
V3: renamed DEFINE_SCHEMA to define_schema
2025-07-16 11:24:46 +03:00
kosinkadink1@gmail.com
4263d6feca
Add dynamicPrompts to String.Input
2025-07-16 02:23:08 -05:00
kosinkadink1@gmail.com
59e2d47cfc
Merge branch 'v3-definition' into v3-definition-wip
2025-07-15 14:30:29 -05:00
kosinkadink1@gmail.com
d99f778982
Added ComfyNodeInternal to comfy_api.internal that will contain classes intended to be used by all V3 schema iterations going forward
2025-07-15 14:27:39 -05:00
bigcat88
b17cc99c1e
V3 Nodes: Load,Save,Vae audio nodes; sort imports; ruff
2025-07-15 13:11:50 +03:00
bigcat88
ac05d9a5fa
V3 Nodes: LoadAudio and PreviewAudio
2025-07-15 09:46:46 +03:00
bigcat88
79098e9fc8
V3 Nodes: refactor check for fingerprint_inputs and check_lazy_status
2025-07-14 17:59:34 +03:00
bigcat88
a580176735
V3 Nodes: refactor ComfyNodeV3 class; use of ui.SavedResult; ported SaveAnimatedPNG and SaveAnimatedWEBP nodes
2025-07-14 16:35:25 +03:00
kosinkadink1@gmail.com
a19ca62354
Renamed prepare_class_clone to PREPARE_CLASS_CLONE
2025-07-14 02:59:59 -05:00
kosinkadink1@gmail.com
c9e03684d6
Changed how a node class is cloned and locked for execution, added EXECUTE_NORMALIZED to wrap around execute function so that a NodeOutput is always returned
2025-07-14 02:55:07 -05:00
kosinkadink1@gmail.com
139025f0fd
Create ComfyTypeI that only has as an input, improved hints on Boolean, Int, and Combos
2025-07-14 01:03:21 -05:00
bigcat88
1e36e7ff8b
V3 Nodes: make generic upload parameters for io.Combo.Input
2025-07-12 17:57:29 +03:00
guill
2b653e8c18
Support for async node functions ( #8830 )
...
* Support for async execution functions
This commit adds support for node execution functions defined as async. When
a node's execution function is defined as async, we can continue
executing other nodes while it is processing.
Standard uses of `await` should "just work", but people will still have
to be careful if they spawn actual threads. Because torch doesn't really
have async/await versions of functions, this won't particularly help
with most locally-executing nodes, but it does work for e.g. web
requests to other machines.
In addition to the execute function, the `VALIDATE_INPUTS` and
`check_lazy_status` functions can also be defined as async, though we'll
only resolve one node at a time right now for those.
* Add the execution model tests to CI
* Add a missing file
It looks like this got caught by .gitignore? There's probably a better
place to put it, but I'm not sure what that is.
* Add the websocket library for automated tests
* Add additional tests for async error cases
Also fixes one bug that was found when an async function throws an error
after being scheduled on a task.
* Add a feature flags message to reduce bandwidth
We now only send 1 preview message of the latest type the client can
support.
We'll add a console warning when the client fails to send a feature
flags message at some point in the future.
* Add async tests to CI
* Don't actually add new tests in this PR
Will do it in a separate PR
* Resolve unit test in GPU-less runner
* Just remove the tests that GHA can't handle
* Change line endings to UNIX-style
* Avoid loading model_management.py so early
Because model_management.py has a top-level `logging.info`, we have to
be careful not to import that file before we call `setup_logging`. If we
do, we end up having the default logging handler registered in addition
to our custom one.
2025-07-10 14:46:19 -04:00
kosinkadink1@gmail.com
5ee63e284b
Renamed 'node' to 'cls' in PreviewImage/Mask
2025-07-10 01:53:27 -05:00
kosinkadink1@gmail.com
5423a4f262
Made id on static Outputs optional, still required on DynamicOutput
2025-07-10 01:49:01 -05:00
kosinkadink1@gmail.com
2b5bd2ace3
Set widgetType only when doing MultiType
2025-07-10 01:24:17 -05:00
bigcat88
965d2f9b8f
use options key, remove get_io_type_V1 serialization
2025-07-10 06:47:52 +03:00
bigcat88
e1975567a3
removed widgetType from serialization
2025-07-10 06:38:49 +03:00
bigcat88
982f4d6f31
removed "prepare_class_clone" modification
2025-07-10 04:36:17 +03:00
bigcat88
fefb24cc33
fixes, corrections; ported MaskPreview, WebcamCapture and LoadImageOutput nodes
2025-07-09 13:37:57 +03:00
bigcat88
36770c1658
migrate load and save images nodes to v3 schema (rebased)
2025-07-09 13:37:44 +03:00
kosinkadink1@gmail.com
5f91e2905a
Merge branch 'v3-definition' of https://github.com/comfyanonymous/ComfyUI into v3-definition
2025-07-09 03:58:16 -05:00
kosinkadink1@gmail.com
3aa2d19c70
Merge branch 'master' into v3-definition
2025-07-09 03:58:09 -05:00
kosinkadink1@gmail.com
cc68880914
Moved force_input arg to be before extra_dict to fix
2025-07-09 03:44:37 -05:00
kosinkadink1@gmail.com
904dc06451
Add force_input support to certain WidgetInputV3 inputs
2025-07-09 03:38:50 -05:00
kosinkadink1@gmail.com
56ccfeaa8a
Add fingerprint_inputs support (V3's IS_CHANGED)
2025-07-09 03:25:23 -05:00
kosinkadink1@gmail.com
82e6eeab75
Support validate_inputs for v3 replacing VALIDATE_INPUTS, support check_lazy_mix for v3, prep for renaming IS_CHANGED to fingerprint_inputs, reorder some class methods
2025-07-09 02:26:35 -05:00
kosinkadink1@gmail.com
936bf6b60f
Add metadata to image previews, add a finalize function on SchemaV3 to automatically add hidden values that are required by certain toggles on node definition
2025-07-09 01:09:18 -05:00
kosinkadink1@gmail.com
a86fddcdd4
Fixed MultiCombo, confirmed VALIDATE_INPUTS, IS_CHANGED works
2025-07-09 00:26:15 -05:00
Christian Byrne
9fd0cd7cf7
Add Moonvalley nodes ( #8832 )
2025-07-08 08:54:30 -04:00
Jedrzej Kosinski
18a7207ca4
Mock AutogrowDynamic type
2025-07-04 16:27:03 -05:00
Jedrzej Kosinski
3758c65107
Extracted resources to separate file
2025-06-28 16:46:45 -07:00
Jedrzej Kosinski
0e7ff98e1d
Introduced Resources to ComfyNodeV3
2025-06-28 15:47:02 -07:00
Jedrzej Kosinski
2999212480
Moved ui preview-related classes out of io.py and into ui.py, refactored UIImages and related into PreviewImage and related
2025-06-28 13:53:25 -07:00
Jedrzej Kosinski
1ae7e7a1e2
Updated some Conditioning docstrings
2025-06-28 11:37:03 -07:00
Jedrzej Kosinski
f4ece6731b
Replaced io_type with direct strings instead of using node_typing.py's IO class
2025-06-28 11:14:18 -07:00
Jedrzej Kosinski
0122bc43ea
Added missing type definitions to v3 (present in core code)
2025-06-28 10:55:24 -07:00
Jedrzej Kosinski
d0c077423a
Defined TypedDict hints for Latent, Conditioning, and Audio types
2025-06-27 16:57:55 -07:00
Jedrzej Kosinski
ba857bd8a0
Added simple Type defs to ComfyTypes in io.py
2025-06-27 14:56:31 -07:00
Jedrzej Kosinski
cef73c75fb
Fix recognizing ComfyNodeV3 class by using issubclass, removed override decorator as it was only introduced in py3.12
2025-06-27 14:00:20 -07:00