Chaoses-Ib / ComfyScript

A Python frontend and library for ComfyUI
MIT License
390 stars 21 forks source link

transpiler reusing variables that should be unique #55

Closed nykwil closed 1 day ago

nykwil commented 3 months ago

I have a custom node that takes json text and then outputs a whole bunch of different prompts for different purposes, scene, detailer, upscale, etc. the transpiler however uses the same variable for each of the outputs of the node:

Transpiler generates this: string, string, , , , , string, string = PromptBuilder(string, 1910, 'realistic photo', 'hallway', 'woman', 'Lisa', '', 'lab coat', 'standing', 'looking down', 'tiled floor, mri machine', '', 'long shot, wide angle', '4K', '', '', 'glasses, gloves, carpet')

but each of those "string" is used in a different ksampler.

Chaoses-Ib commented 3 months ago

Could you share the workflow?

nykwil commented 3 months ago

image _simple_pdb.json

becomes: image, , positive, , , , , , , , filename, _ = SDPromptReader('ComfyUIxxy00002.png', 0) positive, positive, positive, positive, , , positive, positive = PromptBuilder(positive, 1529, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')

, , _ = SDPromptSaver(image, filename, positive, r'New\Deliberate_v4.safetensors', 'clearvae_main.safetensors', 756313888080631, 20, 8, 'euler', 'normal', None, 1, 1, positive, '', 'png', True, True, True, 100, '%Y-%m-%d', '%H%M%S', False, '')

Chaoses-Ib commented 1 day ago

Sorry for this late reply. Another one reported a similar bug with SplitSigmasDenoise today. It's now fixed. I can't find the Prompt Builder in your workflow to test, but they are very likely to be the same issue. Feel free to reopen this issue if it's still not fixed.