Skip to content

Conversation

@nocrcl
Copy link

@nocrcl nocrcl commented Sep 12, 2025

Added some code from KJNodes to Crop the center of the image and Pad does now really pad the image. Also added ProgressBar in the GUI.

Refering to issue #9742

@kijai I used some of your code. Hope this is allright 🤞

Also this is my very first pull request! So bear with me :3

Added some code from KJNodes to Crop the center of the image and Pad does now really pad the image.
Also added ProgressBar in the GUI.
@nocrcl
Copy link
Author

nocrcl commented Sep 24, 2025

@KohakuBlueleaf can you have a look at it?
Should a remove the pbar_gui bits as they seem to be getting merged from #8668 already?

@KohakuBlueleaf
Copy link
Contributor

@KohakuBlueleaf can you have a look at it? Should a remove the pbar_gui bits as they seem to be getting merged from #8668 already?

Yeah I think this PR should be for crop/pad only
pbar should be discussed in #8668 or another PR

Removed GUI progressbar as discussed
@KohakuBlueleaf
Copy link
Contributor

@nocrcl I did some review and I have some opinions on it not sure if you want to apply it

Basically for this kind of more comprehensive preprocess things I may consider a standalone node for it.
So possible we modify the dataset loading to directly return original images than we setup different preprocess node for different preprocess mode or method.

Which make the code more clean and have more potential in complex preprocess pipeline.

cc @comfyanonymous, not sure how you think about it. I think introduce the possibility of "workflow for dataset processing" is actually a good idea and can be a standalone feature as well.

@nocrcl
Copy link
Author

nocrcl commented Oct 1, 2025

@KohakuBlueleaf That sounds great.
I actually tried this before, to load the image set and apply image processing inside comfyui, but it wouldn't load images with different sizes (which makes sense for the training part).

Still, I love the simplicety and the possibility to get complex with this node set! The way the crop and pad works in this PR made it possible for me to smash a few images into a folder and get a LoRA trained in ComfyUI without thinking too much about the resolutions of the source images.

I may just not be the right one to pull this off. My knowledge and time are just... meh.

@KohakuBlueleaf
Copy link
Contributor

@KohakuBlueleaf That sounds great. I actually tried this before, to load the image set and apply image processing inside comfyui, but it wouldn't load images with different sizes (which makes sense for the training part).

Still, I love the simplicety and the possibility to get complex with this node set! The way the crop and pad works in this PR made it possible for me to smash a few images into a folder and get a LoRA trained in ComfyUI without thinking too much about the resolutions of the source images.

I may just not be the right one to pull this off. My knowledge and time are just... meh.

Unfortunately put those processes into the load image function actually introducing more complexity in our view.

But we have discussed about the dataset process nodes thing and I will implement them.

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