-
I would ideally want the output to be the same aspect ratio. Thanks everyone! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 52 replies
-
Hi, the bests results with SDXL will be with the same resolutions as it was trained with, which are in the paper: Since you're training a Dreambooth LoRA, this will probably won't have any impact though, DB LoRAs are really small and practically it doesn't matter the resolution you use if it's not lower or a bad quality one, this will only have an effect for finetunes. With SDXL I can still generate an image like this one without a problem: For example I did an experiment when SDXL came out with this dataset which is just 1024px square images. And with that training I could still generate an extreme landscape image like this one without any problems. For DB LoRAs is a lot more important the quality and description of what you're training than the aspect ratio of the images which the model probably won't learn with just a few images. |
Beta Was this translation helpful? Give feedback.
-
@asomoza thank you! I am using this script and it seems like it forces the model to be 1024x1024. I want to force my own aspect ratio. With the UI HuggingFace generated I was hoping to be able to make enough tweaks to the under lying code such that I allow for different aspect ratios in trianing. Currently, the way the infra is set up, it center crops my data to fit a square with padding, in this instance 1920x1920. Any ideas? Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
This is really helpful, thank you @asomoza. Lastly -- given the Lora-Ease wrapper I am using, is there a way for me to manipulate the Dataset object that code calls? Asking since Lora-Ease is also Hugging Face owned. A path forward would be phenomenal. I will exclusively train for 1920x1080 for the time being. |
Beta Was this translation helpful? Give feedback.
That's a two part question, the script has some arguments to set the resolution and cropping of the images:
--resolution
and--center_crop
which seems you're using.I don't really use the default scripts because I'm always testing new stuff, but if you want to change it so it can accept non-square images you will need to change the Dataset object.
This line is the one that does the resizing so you'll need to change it. If you're using the same resolution images you can practically just delete the resizing from the dataset.
Just as a heads up, If you're struggling with just the image resi…