Surfaced by CodeRabbit on #10 (pre-existing logic; tracked here, not fixed in that comment-only PR).
`Transport.submitJob` loops over `request.inputs` and, for each `.image`, calls `patchLoadImageNodes(...)` which rewrites every `LoadImage` node in the workflow JSON. With more than one image input, each iteration overwrites the previous binding, so all `LoadImage` nodes end up pointing at the last uploaded filename.
Options:
- Keyed mapping — associate each image input (by index/identifier) with a specific `LoadImage` node and patch only that node.
- Interim guard — reject >1 image input with a clear `ComfyError` until keyed mapping exists:
```swift
if request.inputs.filter({ if case .image = $0 { return true }; return false }).count > 1 {
throw ComfyError.serverRejected(reason: .other("Multiple image inputs are not yet supported in a single request"))
}
```
Acceptance: a two-image request either binds each to its intended node, or fails fast with a descriptive error (no silent last-wins). Add a unit test covering the multi-image case.
Surfaced by CodeRabbit on #10 (pre-existing logic; tracked here, not fixed in that comment-only PR).
`Transport.submitJob` loops over `request.inputs` and, for each `.image`, calls `patchLoadImageNodes(...)` which rewrites every `LoadImage` node in the workflow JSON. With more than one image input, each iteration overwrites the previous binding, so all `LoadImage` nodes end up pointing at the last uploaded filename.
Options:
```swift
if request.inputs.filter({ if case .image = $0 { return true }; return false }).count > 1 {
throw ComfyError.serverRejected(reason: .other("Multiple image inputs are not yet supported in a single request"))
}
```
Acceptance: a two-image request either binds each to its intended node, or fails fast with a descriptive error (no silent last-wins). Add a unit test covering the multi-image case.