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

Ultimate SD Upscale tiles should take into consideration ControlNet models #58

Open
XpucT opened this issue Feb 6, 2024 · 9 comments
Open

Comments

@XpucT
Copy link

XpucT commented Feb 6, 2024

Issue.mp4

USDU.json

@OliviaOliveiira
Copy link

Same issue here, looking forward to see the changes!

@ZiBrianQian
Copy link

Faced the same problem few days ago. Thought it's just on my side. Please fix it.

@ssitu
Copy link
Owner

ssitu commented Feb 9, 2024

It already performs the controlnet per tile, am I misunderstanding?

@XpucT
Copy link
Author

XpucT commented Feb 9, 2024

It already performs the controlnet per tile, am I misunderstanding?

Yes it working with model, and not with preprocesses.

preproc.mp4

@ssitu
Copy link
Owner

ssitu commented Feb 9, 2024

Ah ok I think I understand. A problem will be that the controlnet already runs before the node, so I'll have to throw away the first preprocessed image and reapply every tile, but I think that'll do the job.

@ssitu
Copy link
Owner

ssitu commented Feb 9, 2024

On second thought, I won't have access to the pre-processors, so I won't be able to run them.

@bananasss00
Copy link

On second thought, I won't have access to the pre-processors, so I won't be able to run them.

ComfyUI_TiledKSampler support slicing controlnets
https://github.com/BlenderNeko/ComfyUI_TiledKSampler/blob/4fcc003f62efdbdec2f79eab37e1fb8dd84bac64/nodes.py#L255

@ssitu
Copy link
Owner

ssitu commented Feb 19, 2024

On second thought, I won't have access to the pre-processors, so I won't be able to run them.

ComfyUI_TiledKSampler support slicing controlnets https://github.com/BlenderNeko/ComfyUI_TiledKSampler/blob/4fcc003f62efdbdec2f79eab37e1fb8dd84bac64/nodes.py#L255

That's already being done in this node. If I'm understanding the issue correctly, then the suggestion is that the preprocessors should be applied to each tile after they have been upscaled so there's more detail for the sampling. The only solution I can think of is making a new node that has the preprocessors hardcoded and toggleable with the node settings, so it won't be very flexible.

For now, probably the best way to do this is to make the image larger before passing it to the preprocessors. Hopefully the preprocessor will give better detail on the larger image. I don't know how the size of the image impacts the preprocessors, but ideally these two workflows are the same:
[image -> resize -> preprocessor -> tile] is the same as [image -> tile -> resize -> preprocessor]
where the latter is what happens in A1111, and the former is my suggestion.

@OliviaOliveiira
Copy link

On second thought, I won't have access to the pre-processors, so I won't be able to run them.

ComfyUI_TiledKSampler support slicing controlnets https://github.com/BlenderNeko/ComfyUI_TiledKSampler/blob/4fcc003f62efdbdec2f79eab37e1fb8dd84bac64/nodes.py#L255

That's already being done in this node. If I'm understanding the issue correctly, then the suggestion is that the preprocessors should be applied to each tile after they have been upscaled so there's more detail for the sampling. The only solution I can think of is making a new node that has the preprocessors hardcoded and toggleable with the node settings, so it won't be very flexible.

For now, probably the best way to do this is to make the image larger before passing it to the preprocessors. Hopefully the preprocessor will give better detail on the larger image. I don't know how the size of the image impacts the preprocessors, but ideally these two workflows are the same: [image -> resize -> preprocessor -> tile] is the same as [image -> tile -> resize -> preprocessor] where the latter is what happens in A1111, and the former is my suggestion.

Looking forward to see the new node!

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

No branches or pull requests

5 participants