ComfyScript v0.6.0: Simpler to use
Note
ComfyScript is a Python frontend and library for ComfyUI. See README for details and examples.
New features
-
Python 3.14 support
(Solara UI doesn't support Python 3.14 yet: widgetti/solara#1108)
-
Runtime
-
Add
utilmodule with some utlity functions (#29,#47,#76)get_int,get_float,get_strandget_imagesconcat_imagessave_imageandsave_image_cwdsave_image_and_get_pathsandload_image_from_paths
For example:
latent = KSampler(...) image = VAEDecode(latent, vae) images = util.get_images(image) # `images` is of type `list[PIL.Image.Image]`
-
Add
nodemodule withnodesandgetproperties (#17, #30, #59)See
utilmodule for examples. -
Virtual mode
-
Using loaded comfyui if inside comfyui (#104)
-
Share comfyui package context vars by default
Docs
-
Installation
-
Update installing only ComfyScript package (#3,#115,#95)
Install/update ComfyScript:
python -m pip install -U "comfy-script[default]"Save and run the following code to test (e.g.
python examples/runtime.py):from comfy_script.runtime import * # ComfyUI server/path # or: load(r'path/to/ComfyUI') load('http://127.0.0.1:8188/') from comfy_script.runtime.nodes import * with Workflow(wait=True): image = EmptyImage() images = util.get_images(image, save=True)
Or without installing Python, directly use ComfyScript with uv:
uv run examples/uv.py
examples/uv.py:# /// script # requires-python = ">=3.9" # dependencies = [ # "comfy-script[default]", # ] # /// from comfy_script.runtime import * load('http://127.0.0.1:8188/') from comfy_script.runtime.nodes import * with Workflow(wait=True): image = EmptyImage() images = util.get_images(image, save=True)
-
Add installing with ComfyUI & uv venv
-
Add VS Code Notebook kernel list troubleshooting
-
-
Transpiler: Update usage
If you installed ComfyScript outside of ComfyUI, you can still use the transpiler by:
- CLI
Or without installing ComfyScript, directly with uv:
python -m comfy_script.transpile "workflow.json" --api http://127.0.0.1:8188/uvx --from "comfy-script[default]" python -m comfy_script.transpile "workflow.json" --api http://127.0.0.1:8188/
- Python code
- Jupyter Notebook / web: MetadataViewer
- CLI
-
Runtime
- Add docs for
Workflowcontext manager
- Add docs for
-
Images: Add metadata (#19)
-
Models
-
Examples
-
Add projects using this library and some examples (#108)
- CarbBot: Simple Discord Bot for interfacing with ComfyUI and/or the Stability AI API for text2image generation using the SDXL model
- comfy-character-app: A ComfyUI and ComfyScript Gradio-based app for generating characters using a multi-step process.
- io_comfyui: Let Blender work with ComfyUI by ComfyScript.
- Mea comfy wrap: Simple script for wraping comfy ui workflows for future usage as a micro services with gRPC interface
- the-searcher-SD: proof of concept of a tool to enhance likeness of subjects in SDXL
- Randomize_ComfyScript: Randomizer script for ComfyUI using ComfyScript
Changes
-
cliextra (optional dependencies) is now enabled by defaultclickis ~100KB. You can still disable this if you like.
Fixes
- Runtime
main.serveris no longer the server instance (#86)- ComfyUI
LogInterceptorbreaks Jupyter Notebook - redirect
__main__.__file__toComfyUI/main.py(#89) - Node/output type namespace confusion (#22)
- Virtual mode
- Real mode
- comfyui package breaks cli_args
- comfyui package
LogInterceptorbreaks Jupyter Notebook too - comfyui package
receive_all_progress_notificationsis readonly now (#65)
- Transpiler
- Nodes
- Update
ComfyUI_Ib_CustomNodesto fixPILToImageandPILToMask(#83)
- Update