ComfyScript v0.7.0a1
Pre-release
Pre-release
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: Addconcat_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')