Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image grid render consistency #654

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

webfiltered
Copy link
Collaborator

@webfiltered webfiltered commented Aug 27, 2024

  • Makes image grids of non-uniform-size images fill the space the same as uniform image batches
  • Re-uses existing code
  • Removes workaround
  • "Supports image sizes up to 1 terapixel"
    (at time of writing I hard-coded it to 1048576 x 1048576 max-size squares - how it behaved before, but that seemed silly)

Old

non-uniform-old.mp4

PR

non-uniform-new.mp4

Repro workflow

ComfyUI_frontend-pull-654.json

Workflow requires: https://github.com/ltdrdata/ComfyUI-Impact-Pack/

- Makes image grids of non-uniform-size images fill the space the same as uniform image batches
- Re-uses existing code
- Removes workaround
- "Supports image sizes up to 1 terapixel"
@huchenlei
Copy link
Member

Can you attach a repro workflow?

@webfiltered
Copy link
Collaborator Author

Impact pack + segs model okay?

I don't know anything in ComfyUI core that outputs iterable images of disparate shapes - the nodes I just tried all output tensors, so they'd throw if they tried.

@huchenlei
Copy link
Member

Impact pack + segs model okay?

I don't know anything in ComfyUI core that outputs iterable images of disparate shapes - the nodes I just tried all output tensors, so they'd throw if they tried.

Can you share a JSON workflow file here? It can help future viewer of this PR easily reproduce and verify.

@webfiltered
Copy link
Collaborator Author

Sorry I meant - is it okay if the workflow uses node packs, and not just ComfyUI core? I'll just drop one in anyway.

@huchenlei
Copy link
Member

Sorry I meant - is it okay if the workflow uses node packs, and not just ComfyUI core? I'll just drop one in anyway.

It's ok if the workflow needs custom nodes.

@webfiltered
Copy link
Collaborator Author

Excellent. Also, as it probably didn't notify you - I edited it into the PR.

Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

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

LGTM!

@huchenlei huchenlei merged commit 29d2134 into Comfy-Org:main Aug 27, 2024
4 checks passed
@webfiltered webfiltered deleted the image-grid-consistency branch August 28, 2024 12:20
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.

2 participants