Skip to content

ComfyScript v0.7.0a1

Pre-release
Pre-release

Choose a tag to compare

@Chaoses-Ib Chaoses-Ib released this 24 Dec 04:29
· 4 commits to main since this release
96e8f47

Note

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

  • Transpiler: Support formatting node inputs as keyword arguments (#119, @longredzhong)

    The default behavior is changed to format as keyword arguments if there are more than 2 inputs, for example:

    model, clip, vae = CheckpointLoaderSimple('v1-5-pruned-emaonly.ckpt')
    conditioning = CLIPTextEncode('beautiful scenery nature glass bottle landscape, , purple galaxy bottle,', clip)
    conditioning2 = CLIPTextEncode('text, watermark', clip)
    latent = EmptyLatentImage(width=512, height=512, batch_size=1)
    latent = KSampler(model=model, seed=156680208700286, steps=20, cfg=8, sampler_name='euler', scheduler='normal', positive=conditioning, negative=conditioning2, latent_image=latent, denoise=1)
    image = VAEDecode(latent, vae)
    SaveImage(image, 'ComfyUI')

    CLI usage:

      --args [pos|pos2orkwd|kwd]  Format node inputs as positional or keyword
                                  arguments.  [default: Pos2OrKwd]

    e.g. python -m comfy_script.transpile --args kwd workflow.json

  • Runtime: util: Add concat_latents, load_latent_from_path, save_latent_and_get_path (#118,#29)

    For example:

    # For print
    queue.watch_display(False)
    
    with Workflow():
        latent = EmptyLatentImage(batch_size=4)
        latent_path = util.save_latent_and_get_path(latent)
    print(latent_path)
    
    with Workflow():
        latent = util.load_latent_from_path(latent_path)
        # Do something with the latent, for example:
        SaveLatent(latent, 'latents/loaded')