@nodaro/prompts 1.3.1 → 1.5.0
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/index.cjs +51 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +51 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/seedance-2-inputs.test.ts +22 -0
- package/src/factory-presets/generate-image.ts +48 -0
- package/src/seedance-2-inputs.ts +20 -1
package/dist/index.cjs
CHANGED
|
@@ -10570,6 +10570,10 @@ var clean = (u) => {
|
|
|
10570
10570
|
return t && t.length > 0 ? t : void 0;
|
|
10571
10571
|
};
|
|
10572
10572
|
var cleanList = (xs) => (xs ?? []).map(clean).filter((x) => x !== void 0);
|
|
10573
|
+
function promptBindsFirstFrame(prompt) {
|
|
10574
|
+
if (!prompt) return false;
|
|
10575
|
+
return /@image_\d+\s+as\s+the\s+(first|opening)\s*(\(first\))?\s*frame/i.test(prompt);
|
|
10576
|
+
}
|
|
10573
10577
|
function resolveSeedance2Inputs(args) {
|
|
10574
10578
|
const firstFrameUrl = clean(args.firstFrameUrl);
|
|
10575
10579
|
const lastFrameUrl = clean(args.lastFrameUrl);
|
|
@@ -10600,7 +10604,8 @@ function resolveSeedance2Inputs(args) {
|
|
|
10600
10604
|
lastOrdinal = referenceImageUrls.length;
|
|
10601
10605
|
}
|
|
10602
10606
|
let promptSuffix = "";
|
|
10603
|
-
|
|
10607
|
+
const suppressFrameSentence = promptBindsFirstFrame(args.prompt);
|
|
10608
|
+
if (suppressFrameSentence && firstOrdinal > 0 && lastOrdinal === 0) ; else if (firstOrdinal > 0 && lastOrdinal > 0) {
|
|
10604
10609
|
promptSuffix = `Use ${REF_BINDING.ordinal(firstOrdinal)} as the opening (first) frame and ${REF_BINDING.ordinal(lastOrdinal)} as the closing (last) frame of the video.`;
|
|
10605
10610
|
} else if (firstOrdinal > 0) {
|
|
10606
10611
|
promptSuffix = REF_BINDING.frame(firstOrdinal, "opening");
|
|
@@ -26814,6 +26819,50 @@ var GENERATE_IMAGE_PRESETS = [
|
|
|
26814
26819
|
negativePrompt: "leftover callout labels, visible text labels, text boxes, leader lines, garbled text, restyled scene, recolored unrelated elements, redrawn image, cartoon, illustration, watermark, blurry"
|
|
26815
26820
|
}
|
|
26816
26821
|
},
|
|
26822
|
+
// ── Face Privacy (connect the photo → {image:1}) ─────────────────────────
|
|
26823
|
+
// gpt-image-2 + aspectRatio "auto" so the output keeps the input photo's
|
|
26824
|
+
// shape. NOTE: KIE's gpt-image-2 spec forces resolution 1K when aspect is
|
|
26825
|
+
// "auto" (the config panel's fail-safe snaps any other value back), so
|
|
26826
|
+
// these pin 1K explicitly rather than shipping a self-contradicting 2K.
|
|
26827
|
+
{
|
|
26828
|
+
id: "generate-image/faceless-3d-head",
|
|
26829
|
+
name: "Faceless \xB7 3D Blank Head",
|
|
26830
|
+
description: "Persons' faces \u2192 smooth generic white 3D head shape; everything else untouched.",
|
|
26831
|
+
group: "Face Privacy",
|
|
26832
|
+
data: {
|
|
26833
|
+
provider: "gpt-image-2",
|
|
26834
|
+
aspectRatio: "auto",
|
|
26835
|
+
resolution: "1K",
|
|
26836
|
+
prompt: "make the persons in {image:1} faceless by making it 3d white generic face shape, keep everything else the same",
|
|
26837
|
+
negativePrompt: "visible facial features, eyes, nose, mouth, skin texture on the face, changing the background, altering clothing, hair or body, restyling the scene, relighting, changing pose or framing, cartoon look, distorted anatomy, watermark, blurry"
|
|
26838
|
+
}
|
|
26839
|
+
},
|
|
26840
|
+
{
|
|
26841
|
+
id: "generate-image/remove-faces",
|
|
26842
|
+
name: "Remove Faces",
|
|
26843
|
+
description: "Erase persons' faces entirely; everything else untouched.",
|
|
26844
|
+
group: "Face Privacy",
|
|
26845
|
+
data: {
|
|
26846
|
+
provider: "gpt-image-2",
|
|
26847
|
+
aspectRatio: "auto",
|
|
26848
|
+
resolution: "1K",
|
|
26849
|
+
prompt: "remove persons faces from {image:1}, keep everything else the same",
|
|
26850
|
+
negativePrompt: "visible facial features, eyes, nose, mouth, leftover face fragments, changing the background, altering clothing, hair or body, restyling the scene, relighting, changing pose or framing, horror or gore look, distorted anatomy, watermark, blurry"
|
|
26851
|
+
}
|
|
26852
|
+
},
|
|
26853
|
+
{
|
|
26854
|
+
id: "generate-image/transparent-faces",
|
|
26855
|
+
name: "Transparent Faces",
|
|
26856
|
+
description: "Persons' faces become transparent; everything else untouched.",
|
|
26857
|
+
group: "Face Privacy",
|
|
26858
|
+
data: {
|
|
26859
|
+
provider: "gpt-image-2",
|
|
26860
|
+
aspectRatio: "auto",
|
|
26861
|
+
resolution: "1K",
|
|
26862
|
+
prompt: "make faces transparent in {image:1}, keep everything else the same",
|
|
26863
|
+
negativePrompt: "opaque faces, visible facial features, eyes, nose, mouth, changing the background, altering clothing, hair or body, restyling the scene, relighting, changing pose or framing, distorted anatomy, watermark, blurry"
|
|
26864
|
+
}
|
|
26865
|
+
},
|
|
26817
26866
|
// ── Photography & Cinematic ──────────────────────────────────────────────
|
|
26818
26867
|
{
|
|
26819
26868
|
id: "generate-image/cinematic-portrait",
|
|
@@ -31750,6 +31799,7 @@ exports.listPickerCatalogs = listPickerCatalogs;
|
|
|
31750
31799
|
exports.migratePersonValue = migratePersonValue;
|
|
31751
31800
|
exports.pickerFanoutTargets = pickerFanoutTargets;
|
|
31752
31801
|
exports.projectPickerCatalog = projectPickerCatalog;
|
|
31802
|
+
exports.promptBindsFirstFrame = promptBindsFirstFrame;
|
|
31753
31803
|
exports.renderStructuredFields = renderStructuredFields;
|
|
31754
31804
|
exports.resolveBrandInput = resolveBrandInput;
|
|
31755
31805
|
exports.resolveCharacterMentions = resolveCharacterMentions;
|