Skip to content

Is it possible to add auto-transpile to create a python script for running? #43

@gaoming714

Description

@gaoming714

I know python -m comfy_script.transpile workflow.json can create script

    model, clip, vae = CheckpointLoaderSimple('realisticVisionV60B1_v51HyperVAE.safetensors')
    conditioning = CLIPTextEncode('beautiful scenery nature glass bottle landscape, , purple galaxy bottle,', clip)
    conditioning2 = CLIPTextEncode('text, watermark', clip)
    latent = EmptyLatentImage(512, 512, 1)
    latent = KSampler(model, 156680208700286, 20, 8, 'euler', 'normal', conditioning, conditioning2, latent, 1)    
    image = VAEDecode(latent, vae)
    SaveImage(image, 'ComfyUI')

then I will add these codes to make it run

from comfy_script.runtime import *
load()
from comfy_script.runtime.nodes import *
with Workflow():

Is it possible to make a auto-transpile to convert workflow into a script.py , so I can convert it and then run without editting any code?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions