功能增加
This commit is contained in:
1 parent
b340fc7ad7
commit
f1993eb388
69 files changed
+2243
-162
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import type { EnabledImageCapability, GenerationStatus } from "@/lib/types";
|
||||
import { imageDimensionsForEngine } from "@/lib/image-size-presets";
|
||||
|
||||
export type ImageCreationEngine = "jimeng" | "evolink" | "bailian";
|
||||
|
||||
@@ -159,7 +160,8 @@ function assignSize(payload: Record<string, unknown>, input: Record<string, unkn
|
||||
const width = asPositiveInteger(input.width);
|
||||
const height = asPositiveInteger(input.height);
|
||||
if (!width || !height) return;
|
||||
payload.size = ratioFromDimensions(width, height) || `${width}x${height}`;
|
||||
const dimensions = imageDimensionsForEngine({ width, height }, "evolink");
|
||||
payload.size = ratioFromDimensions(dimensions.width, dimensions.height) || `${dimensions.width}x${dimensions.height}`;
|
||||
}
|
||||
|
||||
function asStringArray(value: unknown): string[] {
|
||||
|
||||
Reference in new issue
Block a user