climage 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +12 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -446,6 +446,11 @@ function isKlingV3Model(model) {
|
|
|
446
446
|
function isViduModel(model) {
|
|
447
447
|
return model.includes("/vidu/");
|
|
448
448
|
}
|
|
449
|
+
function usesImageUrlsArray(model) {
|
|
450
|
+
if (model.includes("/hunyuan-image/") && model.includes("/edit")) return true;
|
|
451
|
+
if (model.includes("/kling-image/")) return true;
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
449
454
|
function selectVideoModel(req) {
|
|
450
455
|
if (req.model) return req.model;
|
|
451
456
|
if (req.startFrame && req.endFrame) {
|
|
@@ -533,8 +538,13 @@ function buildImageInput(req) {
|
|
|
533
538
|
if (imageSize) input.image_size = imageSize;
|
|
534
539
|
if (req.n) input.num_images = req.n;
|
|
535
540
|
if (req.inputImages?.[0]) {
|
|
536
|
-
|
|
537
|
-
|
|
541
|
+
const model = req.model ?? "";
|
|
542
|
+
if (usesImageUrlsArray(model)) {
|
|
543
|
+
input.image_urls = req.inputImages.slice(0, 3);
|
|
544
|
+
} else {
|
|
545
|
+
input.image_url = req.inputImages[0];
|
|
546
|
+
input.strength = 0.75;
|
|
547
|
+
}
|
|
538
548
|
}
|
|
539
549
|
return input;
|
|
540
550
|
}
|