Skip to content

Async execute cannot reuse already computed results #114

@thatname

Description

@thatname

If there is another await KSampler() between a KSampler() and a VAEDecode(), like this:

from comfy_script.runtime import *
load(watch=False)
queue.start_watch(False,False,False)
from comfy_script.runtime.nodes import *

...
latent1 = KSampler()           # generate one image
await DummyOut(latent1)  # using DummyOut() from KJNodes package to create an output node.
latent2 = KSampler())         # generate another image using different prompt
await DummyOut(latent2) 
image1 = VAEDecode(latent1, vae)

The latent1 KSampler() will run twice.
If the latent2 KSampler() removed, the latent1 KSampler will run only once, which is expected behavior,

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestruntime

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions