[GH-ISSUE #2459] [Issue]: Refactor RunPod ComfyUI skips numbered reference image placeholders #1207

Closed
opened 2026-10-21 05:29:03 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2459

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The refactor RunPod ComfyUI transport only feeds the first reference image into the shared %reference_image% replacement path. Legacy/main also replaced numbered RunPod base64 placeholders like %reference_image_01% through %reference_image_04%, so multi-reference RunPod workflows can lose every reference after the first.

Related parity tracker: #2410.
Related closed references: #1018 and #1331.

Expected behavior

RunPod ComfyUI workflows should support numbered base64 reference-image placeholders for the current reference image list:

  • %reference_image_01% through %reference_image_04%
  • %reference_image% remains an alias for slot 01

This should match the RunPod behavior documented as completed in #1018 while preserving the local ComfyUI placeholder behavior closed in #1331.

Actual behavior

Current refactor behavior in src-tauri/src/commands/storage/images/providers.rs:

  • generate_runpod_comfyui calls comfy_replacements with options.reference_images.first().map(String::as_str).
  • comfy_replacements accepts only one reference_image: Option<&str> and inserts only %reference_image%.
  • Static trace found no RunPod replacement entries for %reference_image_01% through %reference_image_04%.

Legacy behavior in packages/server/src/services/image/runpod-comfyui.service.ts looped over collected reference images, replaced each numbered %reference_image_NN%, and kept %reference_image% as the first-reference alias.

Steps to reproduce

  1. Inspect src-tauri/src/commands/storage/images/providers.rs on origin/refactor@1a18f83d.
  2. Trace generate_runpod_comfyui into comfy_replacements.
  3. Note that only options.reference_images.first() is passed into replacement construction.
  4. Compare against legacy packages/server/src/services/image/runpod-comfyui.service.ts, where RunPod numbered %reference_image_NN% placeholders were replaced from the reference image list.
  5. Use a RunPod ComfyUI workflow containing %reference_image_02% with at least two reference images; static trace indicates the second placeholder will remain unreplaced in refactor.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: origin/refactor@1a18f83d static parity trace
  • Run mode: static code trace only
  • OS + version: not relevant
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not run
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: RunPod ComfyUI image generation

Logs, screenshots, or video

No live RunPod provider call was run. Evidence is static trace from #2410.

Regression notes

#1018 says the legacy/main fix added RunPod numbered base64 %reference_image_01% through %reference_image_04% placeholders. #1331 is closed for local ComfyUI numbered placeholder parity, but this residual issue is scoped to the refactor RunPod ComfyUI path.

Additional context

Expected proof should include a focused provider/harness check that a RunPod workflow receives distinct values for %reference_image_01% and %reference_image_02%, while %reference_image% still resolves to the first reference image.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2459 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The refactor RunPod ComfyUI transport only feeds the first reference image into the shared `%reference_image%` replacement path. Legacy/main also replaced numbered RunPod base64 placeholders like `%reference_image_01%` through `%reference_image_04%`, so multi-reference RunPod workflows can lose every reference after the first. Related parity tracker: #2410. Related closed references: #1018 and #1331. ## Expected behavior RunPod ComfyUI workflows should support numbered base64 reference-image placeholders for the current reference image list: - `%reference_image_01%` through `%reference_image_04%` - `%reference_image%` remains an alias for slot 01 This should match the RunPod behavior documented as completed in #1018 while preserving the local ComfyUI placeholder behavior closed in #1331. ## Actual behavior Current refactor behavior in `src-tauri/src/commands/storage/images/providers.rs`: - `generate_runpod_comfyui` calls `comfy_replacements` with `options.reference_images.first().map(String::as_str)`. - `comfy_replacements` accepts only one `reference_image: Option<&str>` and inserts only `%reference_image%`. - Static trace found no RunPod replacement entries for `%reference_image_01%` through `%reference_image_04%`. Legacy behavior in `packages/server/src/services/image/runpod-comfyui.service.ts` looped over collected reference images, replaced each numbered `%reference_image_NN%`, and kept `%reference_image%` as the first-reference alias. ## Steps to reproduce 1. Inspect `src-tauri/src/commands/storage/images/providers.rs` on `origin/refactor@1a18f83d`. 2. Trace `generate_runpod_comfyui` into `comfy_replacements`. 3. Note that only `options.reference_images.first()` is passed into replacement construction. 4. Compare against legacy `packages/server/src/services/image/runpod-comfyui.service.ts`, where RunPod numbered `%reference_image_NN%` placeholders were replaced from the reference image list. 5. Use a RunPod ComfyUI workflow containing `%reference_image_02%` with at least two reference images; static trace indicates the second placeholder will remain unreplaced in refactor. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `origin/refactor@1a18f83d` static parity trace - Run mode: static code trace only - OS + version: not relevant - Node + pnpm versions: not relevant - Rust version, if relevant: not run - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: RunPod ComfyUI image generation ## Logs, screenshots, or video No live RunPod provider call was run. Evidence is static trace from #2410. ## Regression notes #1018 says the legacy/main fix added RunPod numbered base64 `%reference_image_01%` through `%reference_image_04%` placeholders. #1331 is closed for local ComfyUI numbered placeholder parity, but this residual issue is scoped to the refactor RunPod ComfyUI path. ## Additional context Expected proof should include a focused provider/harness check that a RunPod workflow receives distinct values for `%reference_image_01%` and `%reference_image_02%`, while `%reference_image%` still resolves to the first reference image. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:29:03 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jun 6, 2026):

Fixed on refactor in a68177b5.

  • ComfyUI workflow replacements now map up to four reference images into %reference_image_01% through %reference_image_04%.
  • %reference_image% remains an alias for the first reference image, matching the legacy RunPod ComfyUI placeholder behavior.

Verification:

  • cargo test --manifest-path src-tauri/Cargo.toml comfy_replacements_resolve_numbered_reference_image_slots -- --nocapture
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace
  • pnpm check:architecture
<!-- gh-comment-id:4638448558 --> @SpicyMarinara commented on GitHub (Jun 6, 2026): Fixed on `refactor` in `a68177b5`. - ComfyUI workflow replacements now map up to four reference images into `%reference_image_01%` through `%reference_image_04%`. - `%reference_image%` remains an alias for the first reference image, matching the legacy RunPod ComfyUI placeholder behavior. Verification: - `cargo test --manifest-path src-tauri/Cargo.toml comfy_replacements_resolve_numbered_reference_image_slots -- --nocapture` - `cargo check --manifest-path src-tauri/Cargo.toml --workspace` - `pnpm check:architecture`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1207
No description provided.