jolibrain / joliGEN

Generative AI Image Toolset with GANs and Diffusion for Real-World Applications
https://www.joligen.com
Other
244 stars 32 forks source link

Output image size when applying a model (inference) #553

Closed hsleiman1 closed 1 year ago

hsleiman1 commented 1 year ago

Hi,

Which option shall I use in order to maintain the output image size identical to the input image size when applying a model?

Thank you.

beniz commented 1 year ago

@hsleiman1 can you share more exactly what you are doing ? e.g. running a X resolution model on a Y resolution image ? Sharing your train_config.json from the model and the call generation script would help. Thanks.

hsleiman1 commented 1 year ago

Sure, The model was trained using the following config in the train_config file. trainconfig.txt

When using the inference script gen_single_image.py as mentioned in the doc, the generated image has a different resolution (512x512) compared to the original image (1280x720).

My question is if I can make the inference output has the same size of the input image.

beniz commented 1 year ago

Calling gen_single_image.py with --img-width and --img-height to the size of the input image works for me. We could make it so that the size of the input image is the default if easier.

hsleiman1 commented 1 year ago

Thank you, that worked!