내용으로 건너뛰기

Bedrock playground issue: generation_error sagemaker_inference.errors.BaseInferenceToolkitError: (400, 'generation_error', 'image dimensions must be multiples of 64, got 480x640')

0

Hi everyone,

I would like to try out an image generation model on playground and upload a image 480x640. but I keep getting this error message:

generation_error sagemaker_inference.errors.BaseInferenceToolkitError: (400, 'generation_error', 'image dimensions must be multiples of 64, got 480x640')

but if I know well 480x640 is multiplies of 64....

질문됨 일 년 전130회 조회

1개 답변
0
수락된 답변

The error you're encountering is related to image dimension requirements for the Amazon Bedrock image generation model you're using. While 480 and 640 are indeed divisible by 64 individually (480 = 64 × 7.5 and 640 = 64 × 10), some image generation models in Amazon Bedrock require that both dimensions be exact multiples of 64, not decimal multiples.

In your case, 480 is not an exact multiple of 64 (as 7.5 is not an integer). The model is expecting dimensions that are precise integer multiples of 64, such as 512×640, 512×512, or 768×768.

To resolve this issue, you should resize your image to dimensions that are exact multiples of 64. For example, you could resize your 480×640 image to 512×640 (both dimensions are now exact multiples of 64: 512 = 64 × 8 and 640 = 64 × 10).

When using the Amazon Bedrock image and video playground, you can specify image dimensions and orientation for the generated images. Make sure to select dimensions that comply with the model's requirements to avoid this error.
Sources
Resolve errors when I fine-tune models on Amazon Bedrock | AWS re:Post
Generate an image with the Amazon Bedrock image and video playground - Amazon SageMaker Unified Studio

답변함 일 년 전

전문가

검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.