Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
docs(execution): document arbitrary Iterate downstream consumers
JPPhoto598a6c243b0b
diff --git a/docs/src/content/docs/contributing/loop-nodes.md b/docs/src/content/docs/contributing/loop-nodes.mdindex 64992bfb1a..e4a44417d4 100644--- a/docs/src/content/docs/contributing/loop-nodes.md+++ b/docs/src/content/docs/contributing/loop-nodes.md@@ -109,11 +109,10 @@ scheduling for the remaining shapes. `Iterate` records ordered item tokens ina closed `StreamBuffer`; an empty `Iterate` records anexplicit empty close. A direct `Iterate.item` consumer waits for the canonical stream to close, then `Collect` consumesits ordered values; a missing stream falls back to materialized results for legacy snapshots. The exact fresh four-node-`literal collection source -> Iterate -> one ordinary body -> Collect` shape, its exact five-node extension with one-ordinary downstream consumer, or its exact six-node extension with two ordinary downstream consumers from-`Collect.collection`, uses a private graph-state planner for prepared-copy expansion, iteration paths, and the-empty-stream barrier. Fan-in, three or more downstream consumers, nested or input-driven iterators, and mixed control-flow remain on the compatibility materializer for those responsibilities.+`literal collection source -> Iterate -> one ordinary body -> Collect` shape and any number of ordinary downstream+consumers from `Collect.collection` use a private graph-state planner for prepared-copy expansion, iteration paths,+and the empty-stream barrier. Fan-in, nested or input-driven iterators, and mixed control flow remain on the+compatibility materializer for those responsibilities.Focused compatibility coverage now proves empty, nested, fan-in, partial/rehydrated, failed, canceled, and retriedIterate/Collect sessions. This is evidence for the current adapters; it does not remove materialization or queueownership. Direct `Iterate`/`Collect`-only graphs and the exact bounded nested shape now use the generic schedulerdiff --git a/invokeai/app/services/shared/README.md b/invokeai/app/services/shared/README.mdindex b900a7fad6..0a48ce5647 100644--- a/invokeai/app/services/shared/README.md+++ b/invokeai/app/services/shared/README.md@@ -20,11 +20,10 @@ analysis remains an internal author-graph admission decision.Direct `Iterate`/`Collect` graphs that do not contain `If`, `For`, `ForReturn`, or saved-workflow control flow also usethe generic adapter. Its adapter-level readiness predicate waits for canonical Iterate streams to close, and genericcompletion mirrors each Iterate result into that ledger before releasing `Collect`. The exact fresh four-node shape-`literal collection source -> Iterate -> one ordinary body -> Collect`, plus its exact five-node extension with one-ordinary downstream consumer and exact six-node extension with two ordinary downstream consumers from-`Collect.collection`, is planned by a private graph-state planner, which owns its prepared-copy expansion, iteration-paths, downstream admission, and explicit empty-stream barrier without calling the legacy materializer. The planner-excludes fan-in, three or more downstream consumers, nested or input-driven iterators, and all mixed control flow;+`literal collection source -> Iterate -> one ordinary body -> Collect`, plus any number of ordinary downstream+consumers from `Collect.collection`, is planned by a private graph-state planner, which owns its prepared-copy+expansion, iteration paths, downstream admission, and explicit empty-stream barrier without calling the legacy+materializer. The planner excludes fan-in, nested or input-driven iterators, and all mixed control flow;those shapes retain materializer copy expansion, grouping, and empty-source handling on the legacy compatibility route.A fresh graph with exactly one static, non-empty `For`/`ForReturn` pair and ordinary body nodes also uses the genericadapter. It projects readiness and invokes the graph-state continuation boundary, which selects the next iteration or@@ -253,17 +252,17 @@ Activation effects are excluded from data-stream handling. `IterateInvocation` icontrol-flow invocation on this seam: each non-empty prepared copy emits one ordered `item` effect with its iterationindex, and the final copy emits one `close_stream` effect. Direct Iterate/Collect-only graphs now run through thegeneric scheduler adapter; its completion maps these results/effects to the existing frame-scoped iteration-stream-identity, so legacy output mirroring is idempotent. The exact fresh four-node source/Iterate/body/Collect shape, its-exact five-node extension with one ordinary downstream consumer, and its exact six-node extension with two ordinary-downstream consumers use the private planner described above; fallback shapes still let the materializer create+identity, so legacy output mirroring is idempotent. The exact fresh four-node source/Iterate/body/Collect shape and+any number of ordinary downstream consumers use the private planner described above; fallback shapes still let the+materializer createprepared copies, derive iteration paths, group collector inputs, and record the explicit close for an empty source.For a direct `Iterate.item` edge, the scheduler defers `CollectInvocation` while its canonical stream is open, andruntime hydration consumes the closed stream in sequence order. If no stream exists, hydration retains the legacymaterialized-result fallback needed by older snapshots. This is not yet token-authoritative downstream topology beyond-the supported one- or two-consumer shapes or full `Collect` migration: fallback shapes still let the materializer own copy+the supported direct-planner shape or full `Collect` migration: fallback shapes still let the materializer own copyexpansion, iteration paths, collector grouping, collection-input hydration, and empty-source closure; the exact fresh-four-node source/Iterate/body/Collect shape, its five-node one-consumer extension, and its six-node two-consumer-extension use the private planner instead.+four-node source/Iterate/body/Collect shape and any number of ordinary downstream-consumer extensions use the+private planner instead.No author-time activation ports or literal successor IDs are introduced.For a fresh graph with one static, non-empty flat `For`/`ForReturn` pair, the same adapter now projects ordinary@@ -302,8 +301,7 @@ frame-scoped continuation effects and generic readiness/continuationprojection.Direct `Iterate`/`Collect`-only graphs use the generic scheduler adapter forreadiness and completion. The exact fresh four-node source/Iterate/body/Collect-shape, its exact five-node extension with one ordinary downstream consumer, and-its exact six-node extension with two ordinary downstream consumers use the private planner for expansion and+shape and any number of ordinary downstream-consumer extensions use the private planner for expansion andempty-stream closure; workflow-callinvocations, unsupported loop shapes, and mixed control-flow graphs remain oncompatibility paths. `ForInvocation` and