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 two Iterate downstream consumers
JPPhotof61d8c36359b
diff --git a/docs/src/content/docs/contributing/loop-nodes.md b/docs/src/content/docs/contributing/loop-nodes.mdindex 51d86a6589..64992bfb1a 100644--- a/docs/src/content/docs/contributing/loop-nodes.md+++ b/docs/src/content/docs/contributing/loop-nodes.md@@ -109,9 +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, with one ordinary downstream consumer-from `Collect.collection`, uses a private graph-state planner for prepared-copy expansion, iteration paths, and the-empty-stream barrier. Fan-in, additional downstream consumers, nested or input-driven iterators, and mixed control+`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 controlflow 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 queuediff --git a/invokeai/app/services/shared/README.md b/invokeai/app/services/shared/README.mdindex b2034ad4c6..b900a7fad6 100644--- a/invokeai/app/services/shared/README.md+++ b/invokeai/app/services/shared/README.md@@ -21,11 +21,11 @@ Direct `Iterate`/`Collect` graphs that do not contain `If`, `For`, `ForReturn`,the 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 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, additional downstream consumers, 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.+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;+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 orfinalizes the aggregate without exposing a successor node ID to the generic scheduler. The materializer still owns@@ -253,16 +253,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 and its-exact five-node extension with one ordinary downstream consumer use the private planner described above; fallback-shapes still let the materializer create prepared copies, derive iteration paths, group collector inputs, and record-the explicit close for an empty source.+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+prepared 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-consumer shape or full `Collect` migration: fallback shapes still let the materializer own copy+the supported one- or two-consumer shapes 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 and its five-node one-consumer extension use the private planner instead.+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.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@@ -301,8 +302,9 @@ 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 and its exact five-node extension with one ordinary downstream consumer-use the private planner for expansion and empty-stream closure; workflow-call+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+empty-stream closure; workflow-callinvocations, unsupported loop shapes, and mixed control-flow graphs remain oncompatibility paths. `ForInvocation` and`ForReturnInvocation` now declare one validated, frame-scoped `continuation`