fix: align image dimensions to FLUX.1 divisible-by-8 requirement
FLUX.1 schnell requires width and height to be divisible by 8. The default OG image size 1200×630 has 630 % 8 = 6 remainder, causing HTTP 400 on every image generation call. Changes: - Pipeline default height 630 → 632 (nearest 8-aligned value) - Provider now rounds any dimension to nearest multiple of 8 as a defensive guard before sending to the API Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,10 @@ class PRAutoBlogger_Image_Pipeline {
|
||||
/**
|
||||
* Default image dimensions (landscape).
|
||||
*/
|
||||
// FLUX.1 requires both dimensions to be divisible by 8.
|
||||
// 1200×632 is the closest 8-aligned pair to the standard OG image size (1200×630).
|
||||
private const DEFAULT_WIDTH = 1200;
|
||||
private const DEFAULT_HEIGHT = 630;
|
||||
private const DEFAULT_HEIGHT = 632;
|
||||
|
||||
/**
|
||||
* The image provider (FLUX.1 via Cloudflare or another).
|
||||
|
||||
Reference in New Issue
Block a user