fix(baoyu-imagine): align Replicate schemas and output handling
This commit is contained in:
parent
4c3238ba1c
commit
7b3214e27a
|
|
@ -82,6 +82,29 @@ test("Replicate input builder keeps nano-banana mapping for compatible models",
|
|||
);
|
||||
});
|
||||
|
||||
test("Replicate fallback preserves --n for unknown models", () => {
|
||||
assert.deepEqual(
|
||||
buildInput(
|
||||
"A robot painter",
|
||||
"unknown-owner/unknown-model",
|
||||
makeArgs({
|
||||
aspectRatio: "16:9",
|
||||
quality: "2k",
|
||||
n: 4,
|
||||
}),
|
||||
["ref"],
|
||||
),
|
||||
{
|
||||
prompt: "A robot painter",
|
||||
aspect_ratio: "16:9",
|
||||
resolution: "2K",
|
||||
number_of_images: 4,
|
||||
output_format: "png",
|
||||
image_input: ["ref"],
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test("Replicate input builder maps Seedream models to size-based schema", () => {
|
||||
assert.deepEqual(
|
||||
buildInput(
|
||||
|
|
|
|||
|
|
@ -138,6 +138,10 @@ function buildNanoBananaInput(prompt: string, args: CliArgs, referenceImages: st
|
|||
input.resolution = "2K";
|
||||
}
|
||||
|
||||
if (args.n > 1) {
|
||||
input.number_of_images = args.n;
|
||||
}
|
||||
|
||||
input.output_format = "png";
|
||||
|
||||
if (referenceImages.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue