Skip to content

Releases: Chaoses-Ib/ComfyScript

v0.5.1

07 Sep 20:45
Compare
Choose a tag to compare

Docs

Fixes

  • Runtime: comfyui package not load comfyui-legacy nodes (all additional nodes) (#68)

v0.5.0: Previews, CivitAI nodes, ImageViewer and MetadataViewer

06 Sep 22:23
Compare
Choose a tag to compare

Note

ComfyScript is a Python frontend and library for ComfyUI. See README for details and examples.

New features

  • Runtime

  • Transpiler

    • Support converting workflow JSON to runnable scripts via CLI (#43)

      Usage:

      python -m comfy_script.transpile "tests\transpile\default.json" --runtime > script.py
    • Add settings for hook (#27, #38, #42)

      settings.toml:

      [transpile.hook]
      # When ComfyScript is installed as custom nodes, `SaveImage` and similar nodes will be hooked to automatically save the script as the image's metadata. The script will also be printed to the terminal.
      # To disable a feature, change its value to `false`.
      save_script = true
      print_script = true
      
      # Use workflows in API format instead of web UI format when possible.
      # Web UI format contains more information, but may also contain some UI-only virtual nodes (e.g. custom Reroute, PrimitiveNode, Note nodes) that cannot be properly transpiled. API format has better compatibility at the cost of less readable output.
      prefer_api_format = false

      These settings can also be overriden by environment variables and Python code, see settings.example.toml for details.

  • Nodes: Add civitai_comfy_nodes to load checkpoints/loras from CivitAI

    Examples:

    model, clip, vae = CivitAICheckpointLoader('101055@128078')
    model, clip, vae = CivitAICheckpointLoader('https://civitai.com/models/101055?modelVersionId=128078')
    model, clip, vae = CivitAICheckpointLoader('https://civitai.com/models/101055/sd-xl?modelVersionId=128078')
    
    model, clip = CivitAILoraLoader(model, clip, '350450@391994', strength_clip=1, strength_model=1)
    model, clip = CivitAILoraLoader(model, clip, 'https://civitai.com/models/350450?modelVersionId=391994', strength_clip=1, strength_model=1)
    model, clip = CivitAILoraLoader(model, clip, 'https://civitai.com/models/350450/sdxl-lightning-lora-2step?modelVersionId=391994', strength_clip=1, strength_model=1)
  • UI

    • ipywidgets: Add ImageViewer (#51)

      A simple image viewer that can display multiple images with optional titles.

      image

    • Solara: Add MetadataViewer (#49)

      A widget for viewing the metadata of an image generated by ComfyScript / ComfyUI / Stable Diffusion web UI. Workflow JSON files are supported too, including both the web UI format and the API format.

      image

  • Docs

Changes

  • Runtime: Virtual mode: Arguments of queue.watch_display() are changed (#36, #52)

    Before:

    def watch_display(self, display_node: bool = True, display_task: bool = True): ...
    queue.watch_display(False, False)

    Now:

    def watch_display(self, all: bool | None = None, *, preview: bool | None = None, output: bool | None = None, task: bool | None = None): ...
    queue.watch_display(False)
    # or:
    queue.watch_display(preview=False, output=False, task=False)

Fixes

  • Runtime
    • Imported classes may be overridden by custom nodes (#57)
    • Optional inputs should not be set if not provided (#59)
    • Virtual mode
      • Enable connection to https comfyui server (#37, @lucak5s)
      • Not queue the workflow if an exception is raised (#48)
    • Real mode: Fix support for the latest version of comfyui package (#65)
  • Transpiler
    • Fallback to API format if web UI format breaks the transpiler (#42)
    • Read workflow file in UTF-8 encoding (#42)
    • Pos dict and unknown end node in workflow (#42)
    • UI-only node Reroute (rgthree) (#42)

v0.5.0a5

15 May 15:22
Compare
Choose a tag to compare
v0.5.0a5 Pre-release
Pre-release
  • feat(runtime/real): add node cache (#34)

v0.5.0a4

09 May 11:10
Compare
Choose a tag to compare
v0.5.0a4 Pre-release
Pre-release

New features

  • Runtime: Show progress bar by tqdm instead of custom print()

  • Nodes: Add civitai_comfy_nodes to load checkpoints/loras from CivitAI

    Examples:

    model, clip, vae = CivitAICheckpointLoader('101055@128078')
    model, clip, vae = CivitAICheckpointLoader('https://civitai.com/models/101055?modelVersionId=128078')
    model, clip, vae = CivitAICheckpointLoader('https://civitai.com/models/101055/sd-xl?modelVersionId=128078')
    
    model, clip = CivitAILoraLoader(model, clip, '350450@391994', strength_clip=1, strength_model=1)
    model, clip = CivitAILoraLoader(model, clip, 'https://civitai.com/models/350450?modelVersionId=391994', strength_clip=1, strength_model=1)
    model, clip = CivitAILoraLoader(model, clip, 'https://civitai.com/models/350450/sdxl-lightning-lora-2step?modelVersionId=391994', strength_clip=1, strength_model=1)

v0.5.0a3

03 May 14:15
Compare
Choose a tag to compare
v0.5.0a3 Pre-release
Pre-release
  • feat(transpile): add settings for hook (#27, #38)

v0.5.0a2

29 Apr 21:21
Compare
Choose a tag to compare
v0.5.0a2 Pre-release
Pre-release
  • fix(client): enable connection to https comfyui server (#37, @lucak5s)

v0.5.0a1

21 Apr 21:42
Compare
Choose a tag to compare
v0.5.0a1 Pre-release
Pre-release
  • feat(runtime): add node preview display and callbacks (#36)

Note: To install a pre-release version from PyPI instead of a local git repository, --pre option is needed: pip install -U --pre comfy-script[default]

v0.4.6

13 Apr 17:18
Compare
Choose a tag to compare

Fixes

  • Runtime:
    • Virtual mode: Local ComfyUI server test of load() (v0.4.4+, #32)
    • Standalone virtual mode / real mode:
      • Enum values of tuple type
      • Restrict ComfyUI directory test

v0.4.5

13 Apr 15:03
Compare
Choose a tag to compare

Fixes

  • Runtime: comfyui package breaking changes (#33)

    Note that there are still other problems in comfyui: the built package doesn't include JSON configs needed by models (hiddenswitch/ComfyUI#6). A workaround is to use editable install:

    git clone https://github.com/hiddenswitch/ComfyUI.git && cd ComfyUI && pip install --no-build-isolation -e .

v0.4.4

09 Apr 17:40
Compare
Choose a tag to compare

New features

Changes

  • Client: endpoint and set_endpoint() are removed (undocumented before)