ComfyUI-FLUX-BFL-API icon indicating copy to clipboard operation
ComfyUI-FLUX-BFL-API copied to clipboard

'aspect_ratio' is required?

Open walterFeng opened this issue 7 months ago • 1 comments

why a 'aspect_ratio' input is required in kontext node?

In the document, I didn't see the input item of the aspect ratio. But I noticed that the official comfyUI node still has the option of aspect ratio, so I wonder if this aspect ratio is necessary?

If the answer is mandatory, If the answer is necessary, can users be allowed to input it manually?

Because when I use it, I hope that any image output can maintain the aspect ratio of the image I input, rather than limiting a fixed aspect ratio. The input item "aspect ratio" will eventually cause my output image to be cropped.

Image https://docs.bfl.ml/kontext/kontext_image_editing#flux-1-kontext-image-editing-parameters-for-%2Fflux-kontext-pro

This is the node of the comfyui official (v0.3.39):

Image

Supplement: I can understand that the aspect ratio is needed when Text-to-image generated. But in the official examples of flux-kontext, I noticed that when kontext is used for image editing, the resulting images all maintain the same aspect ratio as the original images, which is what I want to see.

walterFeng avatar Jun 04 '25 07:06 walterFeng

Hi,

Thanks for your feedback!

You’re right that the aspect_ratio input could be optional — and I’ll consider allowing that in a future version.

However, just to clarify: the model does not automatically preserve the input image’s aspect ratio. If you don’t specify aspect_ratio, it defaults to 1:1 (1024x1024), as mentioned in the documentation. So if your input image has a different aspect ratio, the output might be cropped or padded to fit the square dimensions.

Image

If you want to maintain the input image’s proportions, you’ll need to manually set the matching aspect_ratio.

Hope this clears things up — and thanks again for the helpful suggestion!

gelasdev avatar Jun 06 '25 18:06 gelasdev