Skip to content

fix: allow to process multiple images#96

Open
bluematter wants to merge 8 commits into
runpod-workers:mainfrom
bluematter:main
Open

fix: allow to process multiple images#96
bluematter wants to merge 8 commits into
runpod-workers:mainfrom
bluematter:main

Conversation

@bluematter
Copy link
Copy Markdown

Motivation

I want to pass in a number of outputs into comfy and get the same amount of outputs sent back in the API

Issues closed

#95

Comment thread src/rp_handler.py
# Redis configuration from environment variables
REDIS_HOST = os.environ.get("REDIS_HOST", "localhost")
REDIS_PORT = int(os.environ.get("REDIS_PORT", 6379))
r = redis.Redis(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you hard code like this ?

Comment thread src/rp_handler.py
REDIS_HOST = os.environ.get("REDIS_HOST", "localhost")
REDIS_PORT = int(os.environ.get("REDIS_PORT", 6379))
r = redis.Redis(
host='redis-13524.fcrce180.us-east-1-1.ec2.redns.redis-cloud.com',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with ENV variable pls

@TimPietrusky
Copy link
Copy Markdown
Contributor

TimPietrusky commented Apr 23, 2025

@bluematter thanks for putting the effort into this PR.

it looks to me that you not only added support for multiple images, but also a lot more (like redis and loras and more). would you mind to clarify everything you have done here, so that we can do a proper review?

@Andergraw
Copy link
Copy Markdown

Hey guys, thank you all for the great work. @bluematter wouldn't it be easier to just fix the batch loading separately and then add the other features sequentially?
Thanks!

@TimPietrusky
Copy link
Copy Markdown
Contributor

@bluematter @Andergraw @khengyun we have added support for multiple output images in #118, is that what you wanted? because multiple input-images are already possible

@Andergraw
Copy link
Copy Markdown

@bluematter @Andergraw @khengyun we have added support for multiple output images in #118, is that what you wanted? because multiple input-images are already possible

This exactly what I wanted, thanks! How is it done? Using the batch input from Empty Latent node? Can It be done with runsync endpoint?
Thanks again!

@TimPietruskyRunPod
Copy link
Copy Markdown
Contributor

Hi @bluematter — thanks for sending this, but this PR is unfortunately too far out of date to merge as-is.

It modifies src/rp_handler.py, which no longer exists on main — the handler was moved to handler.py at the repo root and substantially rewritten in the 5.x series. The diff is 908+/227− against a file that's no longer there, so a clean rebase isn't feasible — it would need to be re-implemented against the current handler.

What the PR appears to add (handling multiple input images) is actually already supported on main: the input schema accepts an input.images array where each element is {name, image (base64)}, and the handler uploads each one to ComfyUI before queueing. See handler.py:170-200 and handler.py:320-340 for the current implementation.

Two options:

  1. If your use case is not covered by the current array-of-images input — could you open a fresh issue describing the specific scenario? I'd be happy to look at it.
  2. If your use case is covered, this PR can be closed.

Either way, the existing diff isn't recoverable into a modern PR. Sorry for the slow reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants