diff --git a/backend/internal/service/v1.go b/backend/internal/service/v1.go index de204f9..ceb1c93 100644 --- a/backend/internal/service/v1.go +++ b/backend/internal/service/v1.go @@ -2644,13 +2644,14 @@ func guessRatio(w, h int) string { W int H int } - // The 14 ratios actually used across our models. Must stay in sync with the + // The 13 ratios actually used across our models. Must stay in sync with the // custom-model picker (CustomModelModal RATIO_OPTS) and the docs 对照表, so a - // /v1 `size` maps to exactly one of them. + // /v1 `size` maps to exactly one of them. 9:21 is intentionally absent — + // no image provider accepts it (Runway 400s on it). candidates := []candidate{ {1, 1}, {5, 4}, {4, 3}, {3, 2}, {16, 9}, {2, 1}, {21, 9}, {3, 1}, // 横 - {4, 5}, {3, 4}, {2, 3}, {9, 16}, {9, 21}, {1, 3}, // 竖 + {4, 5}, {3, 4}, {2, 3}, {9, 16}, {1, 3}, // 竖 } best := candidates[0] bestDelta := absFloat(float64(w)/float64(h) - float64(best.W)/float64(best.H)) diff --git a/frontend/src/components/CustomModelModal.vue b/frontend/src/components/CustomModelModal.vue index ef53498..3f17a0e 100644 --- a/frontend/src/components/CustomModelModal.vue +++ b/frontend/src/components/CustomModelModal.vue @@ -6,9 +6,9 @@ import SelectMenu from './SelectMenu.vue' const emit = defineEmits(['close', 'saved']) -// 14 ratios — the union of what our models actually support; kept in sync with -// the backend guessRatio() and the docs 对照表. -const RATIO_OPTS = ['1:1', '5:4', '4:3', '3:2', '16:9', '2:1', '21:9', '3:1', '4:5', '3:4', '2:3', '9:16', '9:21', '1:3'] +// 13 ratios — the union of what our models actually support; kept in sync with +// the backend guessRatio() and the docs 对照表. 9:21 removed (no image provider accepts it). +const RATIO_OPTS = ['1:1', '5:4', '4:3', '3:2', '16:9', '2:1', '21:9', '3:1', '4:5', '3:4', '2:3', '9:16', '1:3'] const IMG_RES = ['1K', '2K', '4K'] const VID_RES = ['720p', '1080p', '2K', '4K'] const ALL_RES = ['1K', '2K', '4K', '720p', '1080p'] diff --git a/frontend/src/views/DocsView.vue b/frontend/src/views/DocsView.vue index ca6126c..70139d5 100644 --- a/frontend/src/views/DocsView.vue +++ b/frontend/src/views/DocsView.vue @@ -74,7 +74,6 @@ const sizeTable = [ { ratio: '3:4 · 竖', k1: '768x1024', k2: '1536x2048', k4: '3072x4096' }, { ratio: '2:3 · 竖', k1: '800x1200', k2: '1600x2400', k4: '2400x3600' }, { ratio: '9:16 · 竖', k1: '720x1280', k2: '1152x2048', k4: '2304x4096' }, - { ratio: '9:21 · 竖超宽', k1: '720x1680', k2: '1080x2520', k4: '2160x5040' }, { ratio: '1:3 · 竖', k1: '512x1536', k2: '768x2304', k4: '1280x3840' }, ]