v0.4.0: Standalone virtual mode, global enums, node docstrings, and real mode workflow tracking
New features
-
Runtime
-
Standalone virtual mode
Virtual mode can now start a ComfyUI server by itself. By default, if the server is not available at
http://127.0.0.1:8188/, virtual mode will try to start a new ComfyUI server. Seeload()for details. -
Global enums
Some enums are now also available in a shorter form, for example:
# Before CheckpointLoaderSimple.ckpt_name.v1_5_pruned_emaonly # After Checkpoints.v1_5_pruned_emaonly
Currently, these global enums include
Checkpoints,CLIPs,CLIPVisions,ControlNets,Diffusers,Embeddings,GLIGENs,Hypernetworks,Loras,PhotoMakers,StyleModels,UNETs,UpscaleModels,VAEsandSamplers,Schedulers. See global enums for details. -
Node docstrings
Information about the nodes are now added to type stubs, including the display name, description, category, input range and round and output node. For example:
In standalone virtual mode and real mode, each node's module name will also be added to their docstrings. This can be used to figure out where a node came from.
-
-
Workflow tracking (#21)
Now workflows will be automatically tracked and saved to images in real mode. But note that changes to inputs made by user code instead of nodes will not be tracked. This means the saved workflows are not guaranteed to be able to reproduce the same results. If user code changes have to be made, one can add some custom metadata to keep the results reproducible. See real mode for an example.
-
The hidden inputs of nodes are now shown in type stubs (#21)
e.g.
extra_pnginfo,promptandunique_id. -
Improved compatibility with custom nodes by trying to simulate the real ComfyUI environment as far as possible
-
-
Enums are now of
StrEnumandFloatEnumtypes if applicable. Now their values can be used interchangeably withstrandfloat.For example, they can now be used as real mode node arguments.
-
-
Nodes: New nodes for converting images between
ImageandPIL.Image.Image, mainly for use in real mode.def ImageToPIL( images: Image ) -> PilImage def PILToImage( images: PilImage ) -> Image def PILToMask( images: PilImage ) -> Image
See images for all nodes about loading/saving images.
Changes
-
All dependencies are optional now
Now ComfyScript should be installed with
[default], for example:python -m pip install -e ".[default]"[default]is necessary to install common dependencies. Seepyproject.tomlfor other options. If no option is specified,comfy-scriptwill be installed without any dependencies. -
Runtime
-
VAEs enum member names are changed
For example,
foo.vae.ptandfoo.vae.safetensors's name will now befooinstead offoo_vae. -
Real mode: Nodes are now wrapped instead of being directly modified (#20)
-
Fixes
- Runtime
-
Ignore invalid str enum values (#22)
This is mainly for mitigating hacks made by ComfyUI-VideoHelperSuite. See #22 for details.
-
Node output name to id conversion
-
