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

set height and width for img2img pipeline #92

Merged
merged 5 commits into from
Jan 16, 2025
Merged

Conversation

noskill
Copy link
Collaborator

@noskill noskill commented Jan 10, 2025

No description provided.

@noskill noskill requested a review from Necr0x0Der January 10, 2025 16:17
@@ -866,8 +870,8 @@ def setup(self, fimage, width=None, height=None,
if self.model_type == ModelType.FLUX and hasattr(cscales, '__len__'):
cscales = cscales[0] # multiple controlnets are not yet supported
self.pipe_params.update({
"width": image.size[0] if width is None else width,
"height": image.size[1] if height is None else height,
"width": image.width if width is None else width,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can image have either size or width/height fields depending on its source? E.g., if the image is loaded from the source file using PIL, it'll have width/height. If it comes from automatic processing with numpy, it'll have size?

@noskill noskill requested a review from Necr0x0Der January 16, 2025 09:11
@Necr0x0Der Necr0x0Der merged commit 4256ddc into singnet:main Jan 16, 2025
1 check passed
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