Update Crop and Pad in nodes_train.py#9824
Conversation
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.
|
@KohakuBlueleaf can you have a look at it? |
Yeah I think this PR should be for crop/pad only |
Removed GUI progressbar as discussed
|
@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. 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. |
|
@KohakuBlueleaf That sounds great. 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. |
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