Files
ttulttul-ComfyUI-Modal/remote
Ken SimpsonandClaude Opus 5.5 b361483a47 Keep per-item mapped LATENTs and cap Modal containers at instance_count (#12)
* Keep per-item LATENT session refs when joining mapped outputs

Ordered phases bridge values between phases as remote session refs.
Joining mapped LATENT outputs ran _join_latent_batches on those refs,
which copied the first ref's fields and collapsed every item to item 0.
The next phase then broadcast item 0's latent to all items, so a second
KSampler fed by a mapped first KSampler always refined the first image.

Only merge LATENT values that are real latent mappings; otherwise keep
the ordered list. Log boundary inputs that are broadcast because they
cannot be split instead of dropping the error silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cap Modal containers at instance_count across parameter-set pools

Modal enforces max_containers per RemoteEngine parameter set. Remote
components without loaders (e.g. SaveImageAdvanced) had an empty
snapshot profile, so they opened a second pool of GPU containers beside
the samplers and doubled the container count past instance_count.

- Stamp the environment's most common loader snapshot profile onto
  profile-less Comfy-pool components so they share one container pool.
- Hold one host-side slot per in-flight Modal call per deployment app,
  capped at max_containers, so concurrent mapped components share the
  configured budget.
- Lower the per-item unsplittable boundary input log to debug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:36:34 -07:00
..
2026-08-29 11:09:12 -07:00