@nodaro/shared 3.67.0 → 3.69.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/{chunk-T4GIHHXY.cjs → chunk-25C2E2GI.cjs} +6 -6
- package/dist/{chunk-T4GIHHXY.cjs.map → chunk-25C2E2GI.cjs.map} +1 -1
- package/dist/{chunk-OXTF4Y3P.cjs → chunk-3AB3YIFM.cjs} +6 -6
- package/dist/{chunk-OXTF4Y3P.cjs.map → chunk-3AB3YIFM.cjs.map} +1 -1
- package/dist/{chunk-23IKLMRL.cjs → chunk-3OHRFSQL.cjs} +53 -51
- package/dist/{chunk-23IKLMRL.cjs.map → chunk-3OHRFSQL.cjs.map} +1 -1
- package/dist/{chunk-GNLA5NTT.cjs → chunk-4IMEJQVQ.cjs} +4 -4
- package/dist/{chunk-GNLA5NTT.cjs.map → chunk-4IMEJQVQ.cjs.map} +1 -1
- package/dist/{chunk-JTYCJ5OL.cjs → chunk-54E2JO4E.cjs} +100 -33
- package/dist/chunk-54E2JO4E.cjs.map +1 -0
- package/dist/{chunk-HTDKEYMY.cjs → chunk-5EQRIUGI.cjs} +139 -91
- package/dist/chunk-5EQRIUGI.cjs.map +1 -0
- package/dist/{chunk-AT53ZQUC.js → chunk-5WHU7CYE.js} +3 -3
- package/dist/{chunk-AT53ZQUC.js.map → chunk-5WHU7CYE.js.map} +1 -1
- package/dist/{chunk-BNR5FKL5.js → chunk-5ZCZL73I.js} +3 -3
- package/dist/{chunk-BNR5FKL5.js.map → chunk-5ZCZL73I.js.map} +1 -1
- package/dist/{chunk-6FQBKI2A.cjs → chunk-6JSYNKFL.cjs} +4 -4
- package/dist/{chunk-6FQBKI2A.cjs.map → chunk-6JSYNKFL.cjs.map} +1 -1
- package/dist/{chunk-WZG6GZIL.cjs → chunk-6QJHSN6J.cjs} +4 -4
- package/dist/{chunk-WZG6GZIL.cjs.map → chunk-6QJHSN6J.cjs.map} +1 -1
- package/dist/{chunk-OFQ6CU6S.js → chunk-7EQJIGVT.js} +3 -3
- package/dist/{chunk-OFQ6CU6S.js.map → chunk-7EQJIGVT.js.map} +1 -1
- package/dist/{chunk-XEPKONJC.js → chunk-7OSUEYZ4.js} +3 -3
- package/dist/{chunk-XEPKONJC.js.map → chunk-7OSUEYZ4.js.map} +1 -1
- package/dist/{chunk-3L7GMQ4M.cjs → chunk-7PC2YHBN.cjs} +54 -49
- package/dist/chunk-7PC2YHBN.cjs.map +1 -0
- package/dist/{chunk-BMDOPJBP.cjs → chunk-AGIG5HUU.cjs} +17 -17
- package/dist/{chunk-BMDOPJBP.cjs.map → chunk-AGIG5HUU.cjs.map} +1 -1
- package/dist/{chunk-5LWYX4GV.js → chunk-AH6OQXLW.js} +3 -3
- package/dist/{chunk-5LWYX4GV.js.map → chunk-AH6OQXLW.js.map} +1 -1
- package/dist/{chunk-RVQW623D.js → chunk-BDW25A7Y.js} +72 -18
- package/dist/chunk-BDW25A7Y.js.map +1 -0
- package/dist/{chunk-5J2LIQYU.js → chunk-DE55SA2X.js} +5 -5
- package/dist/{chunk-5J2LIQYU.js.map → chunk-DE55SA2X.js.map} +1 -1
- package/dist/{chunk-VBP4DH37.js → chunk-DNWFFVC6.js} +130 -15
- package/dist/chunk-DNWFFVC6.js.map +1 -0
- package/dist/{chunk-CLAKSLXF.js → chunk-E3PU7YC6.js} +3 -3
- package/dist/{chunk-CLAKSLXF.js.map → chunk-E3PU7YC6.js.map} +1 -1
- package/dist/{chunk-MVXZP6VB.js → chunk-FUYBUT65.js} +97 -2
- package/dist/chunk-FUYBUT65.js.map +1 -0
- package/dist/{chunk-SW5ZD7BO.js → chunk-G6AOKNAY.js} +3 -3
- package/dist/{chunk-SW5ZD7BO.js.map → chunk-G6AOKNAY.js.map} +1 -1
- package/dist/{chunk-EFYWV2V5.cjs → chunk-I6TBKTW3.cjs} +61 -61
- package/dist/{chunk-EFYWV2V5.cjs.map → chunk-I6TBKTW3.cjs.map} +1 -1
- package/dist/{chunk-3YWZ5SOZ.js → chunk-KLEKJUQI.js} +5 -5
- package/dist/{chunk-3YWZ5SOZ.js.map → chunk-KLEKJUQI.js.map} +1 -1
- package/dist/{chunk-OXBU5AGH.js → chunk-LSX2OFNB.js} +3 -3
- package/dist/{chunk-OXBU5AGH.js.map → chunk-LSX2OFNB.js.map} +1 -1
- package/dist/{chunk-66QSUUB4.cjs → chunk-LY6IR5LL.cjs} +12 -12
- package/dist/{chunk-66QSUUB4.cjs.map → chunk-LY6IR5LL.cjs.map} +1 -1
- package/dist/{chunk-5GG4CG4Y.js → chunk-LZPG4XHT.js} +3 -3
- package/dist/{chunk-5GG4CG4Y.js.map → chunk-LZPG4XHT.js.map} +1 -1
- package/dist/{chunk-PGDR7CO3.cjs → chunk-MGSGLRHZ.cjs} +8 -8
- package/dist/{chunk-PGDR7CO3.cjs.map → chunk-MGSGLRHZ.cjs.map} +1 -1
- package/dist/{chunk-Z77M7Q2R.js → chunk-ML55U7WM.js} +3 -3
- package/dist/{chunk-Z77M7Q2R.js.map → chunk-ML55U7WM.js.map} +1 -1
- package/dist/{chunk-ALRXY4QH.cjs → chunk-N7ZJD4CK.cjs} +6 -2
- package/dist/chunk-N7ZJD4CK.cjs.map +1 -0
- package/dist/{chunk-O2QOBA6Q.js → chunk-NPGP6FMU.js} +43 -3
- package/dist/chunk-NPGP6FMU.js.map +1 -0
- package/dist/{chunk-IWUW3YPM.cjs → chunk-NTCSXKZ3.cjs} +5 -5
- package/dist/{chunk-IWUW3YPM.cjs.map → chunk-NTCSXKZ3.cjs.map} +1 -1
- package/dist/chunk-NWNRATS3.js +13 -0
- package/dist/chunk-NWNRATS3.js.map +1 -0
- package/dist/{chunk-SCDE676D.js → chunk-OEOOXL3F.js} +65 -23
- package/dist/chunk-OEOOXL3F.js.map +1 -0
- package/dist/{chunk-GF7ZA26H.js → chunk-OOUJZR4K.js} +4 -4
- package/dist/{chunk-GF7ZA26H.js.map → chunk-OOUJZR4K.js.map} +1 -1
- package/dist/{chunk-5IZHECUP.js → chunk-OZA4DE23.js} +3 -3
- package/dist/{chunk-5IZHECUP.js.map → chunk-OZA4DE23.js.map} +1 -1
- package/dist/{chunk-GTBW2KAY.js → chunk-PHQVAPSD.js} +8 -6
- package/dist/{chunk-GTBW2KAY.js.map → chunk-PHQVAPSD.js.map} +1 -1
- package/dist/{chunk-5NVGKXJV.cjs → chunk-PLANUXQL.cjs} +89 -3
- package/dist/chunk-PLANUXQL.cjs.map +1 -0
- package/dist/{chunk-ZQ2BHOFH.cjs → chunk-Q2LEJXLZ.cjs} +6 -6
- package/dist/{chunk-ZQ2BHOFH.cjs.map → chunk-Q2LEJXLZ.cjs.map} +1 -1
- package/dist/{chunk-PJAJCFLP.cjs → chunk-QNPYYSLT.cjs} +168 -44
- package/dist/chunk-QNPYYSLT.cjs.map +1 -0
- package/dist/{chunk-G2G7XGFU.cjs → chunk-RURPG6IS.cjs} +7 -7
- package/dist/{chunk-G2G7XGFU.cjs.map → chunk-RURPG6IS.cjs.map} +1 -1
- package/dist/{chunk-PAUWEWTY.js → chunk-TDU45K6Z.js} +12 -7
- package/dist/chunk-TDU45K6Z.js.map +1 -0
- package/dist/{chunk-X2YHKP4D.cjs → chunk-TWUFC32F.cjs} +8 -8
- package/dist/{chunk-X2YHKP4D.cjs.map → chunk-TWUFC32F.cjs.map} +1 -1
- package/dist/{chunk-O6TBB4IF.cjs → chunk-TZWXZDSX.cjs} +48 -2
- package/dist/chunk-TZWXZDSX.cjs.map +1 -0
- package/dist/{chunk-F6XIH3TZ.cjs → chunk-UJREE6EQ.cjs} +9 -9
- package/dist/{chunk-F6XIH3TZ.cjs.map → chunk-UJREE6EQ.cjs.map} +1 -1
- package/dist/{chunk-CFTXW3ZL.js → chunk-UVUHVY7F.js} +3 -3
- package/dist/{chunk-CFTXW3ZL.js.map → chunk-UVUHVY7F.js.map} +1 -1
- package/dist/{chunk-37ZSFS6A.cjs → chunk-WML66SUV.cjs} +9 -9
- package/dist/{chunk-37ZSFS6A.cjs.map → chunk-WML66SUV.cjs.map} +1 -1
- package/dist/{chunk-M5QY464F.cjs → chunk-XZYZYWKG.cjs} +21 -21
- package/dist/{chunk-M5QY464F.cjs.map → chunk-XZYZYWKG.cjs.map} +1 -1
- package/dist/{chunk-3QJ3UR5Z.js → chunk-YT4ZTJVC.js} +9 -9
- package/dist/{chunk-3QJ3UR5Z.js.map → chunk-YT4ZTJVC.js.map} +1 -1
- package/dist/{chunk-V6OXSXIX.js → chunk-YVQFYW2U.js} +86 -4
- package/dist/chunk-YVQFYW2U.js.map +1 -0
- package/dist/{chunk-E62W5I6A.cjs → chunk-ZWEVRMFN.cjs} +97 -2
- package/dist/chunk-ZWEVRMFN.cjs.map +1 -0
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +295 -219
- package/dist/entries/credits.d.cts +233 -70
- package/dist/entries/credits.d.ts +233 -70
- package/dist/entries/credits.js +11 -11
- package/dist/entries/llm-models.cjs +84 -68
- package/dist/entries/llm-models.d.cts +36 -3
- package/dist/entries/llm-models.d.ts +36 -3
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +111 -107
- package/dist/entries/media.d.cts +17 -2
- package/dist/entries/media.d.ts +17 -2
- package/dist/entries/media.js +3 -3
- package/dist/entries/model-catalog.cjs +133 -133
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +433 -397
- package/dist/entries/models.d.cts +2 -2
- package/dist/entries/models.d.ts +2 -2
- package/dist/entries/models.js +8 -8
- package/dist/entries/nodes.cjs +212 -212
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +153 -153
- package/dist/entries/pipeline.d.cts +1 -1
- package/dist/entries/pipeline.d.ts +1 -1
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/runtime-config.cjs +53 -29
- package/dist/entries/runtime-config.d.cts +53 -1
- package/dist/entries/runtime-config.d.ts +53 -1
- package/dist/entries/runtime-config.js +1 -1
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/types.d.cts +12 -5
- package/dist/entries/types.d.ts +12 -5
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +152 -152
- package/dist/entries/video.d.cts +2 -1
- package/dist/entries/video.d.ts +2 -1
- package/dist/entries/video.js +6 -6
- package/dist/index.cjs +1882 -1726
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +25 -25
- package/dist/{model-constants-DZ3tPGFO.d.ts → model-constants-B5DNHIP8.d.ts} +156 -12
- package/dist/{model-constants-BstsUup6.d.cts → model-constants-CQr_d3Kw.d.cts} +156 -12
- package/package.json +1 -1
- package/src/__tests__/add-captions-nemotron-pricing.test.ts +13 -1
- package/src/__tests__/extend-providers.test.ts +43 -6
- package/src/__tests__/fixtures/measured-input-quote-parity.json +2352 -1
- package/src/__tests__/fixtures/planned-length-quote-parity.json +100 -10
- package/src/__tests__/fixtures/probed-node-quote-parity.json +132 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +945 -38
- package/src/__tests__/gemini-omni-extend.test.ts +110 -0
- package/src/__tests__/gvp-supported-providers.test.ts +3 -0
- package/src/__tests__/llm-models.test.ts +116 -2
- package/src/__tests__/llm-price-key.test.ts +2 -0
- package/src/__tests__/nemotron-transcribe-pricing.test.ts +32 -0
- package/src/__tests__/runtime-config-lists.test.ts +92 -0
- package/src/__tests__/seedance-2-5-flash-catalog.test.ts +194 -0
- package/src/__tests__/video-character-refs.test.ts +48 -0
- package/src/catalog-projection.ts +12 -5
- package/src/credit-estimators/add-captions-nemotron.ts +11 -1
- package/src/credit-estimators/index.ts +6 -1
- package/src/credit-estimators/nemotron-transcribe.ts +35 -3
- package/src/credit-estimators/pitch-tempo.ts +14 -0
- package/src/credit-estimators/video-sfx.ts +15 -0
- package/src/credit-estimators/video-utils.ts +48 -12
- package/src/credit-identifiers.ts +51 -32
- package/src/entries/credits.ts +18 -0
- package/src/entries/llm-models.ts +4 -0
- package/src/entries/models.ts +11 -0
- package/src/entries/runtime-config.ts +10 -1
- package/src/gemini-omni-extend-quote.ts +76 -0
- package/src/lip-sync-pricing.ts +16 -1
- package/src/llm-models.ts +117 -2
- package/src/model-catalog.ts +95 -0
- package/src/model-constants.ts +274 -11
- package/src/node-default-mappings.ts +2 -0
- package/src/priced-clip-seconds.ts +19 -1
- package/src/runtime-config/lists.ts +87 -0
- package/src/runtime-config/worlds.ts +10 -0
- package/src/seedance-extend-rate.ts +83 -20
- package/src/seedance-lip-sync.ts +68 -0
- package/src/video-character-refs.ts +26 -6
- package/dist/chunk-3L7GMQ4M.cjs.map +0 -1
- package/dist/chunk-5NVGKXJV.cjs.map +0 -1
- package/dist/chunk-ALRXY4QH.cjs.map +0 -1
- package/dist/chunk-E62W5I6A.cjs.map +0 -1
- package/dist/chunk-HTDKEYMY.cjs.map +0 -1
- package/dist/chunk-JTYCJ5OL.cjs.map +0 -1
- package/dist/chunk-MVXZP6VB.js.map +0 -1
- package/dist/chunk-O2QOBA6Q.js.map +0 -1
- package/dist/chunk-O6TBB4IF.cjs.map +0 -1
- package/dist/chunk-PAUWEWTY.js.map +0 -1
- package/dist/chunk-PJAJCFLP.cjs.map +0 -1
- package/dist/chunk-RVQW623D.js.map +0 -1
- package/dist/chunk-SCDE676D.js.map +0 -1
- package/dist/chunk-SMOO5FAH.js +0 -10
- package/dist/chunk-SMOO5FAH.js.map +0 -1
- package/dist/chunk-V6OXSXIX.js.map +0 -1
- package/dist/chunk-VBP4DH37.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pricedClipSeconds } from './chunk-
|
|
1
|
+
import { pricedClipSeconds } from './chunk-NWNRATS3.js';
|
|
2
2
|
|
|
3
3
|
// src/video-depth.ts
|
|
4
4
|
var VIDEO_DEPTH_PROVIDERS = ["video-depth-anything", "depth-anything-frames"];
|
|
@@ -81,5 +81,5 @@ function videoDepthCreditId(provider, durationSec) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export { FAL_VIDEO_DEPTH_PROVIDERS, REPLICATE_VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_BUCKETS, VIDEO_DEPTH_COLORMAPS, VIDEO_DEPTH_LIMITS, VIDEO_DEPTH_MODEL_SIZES, VIDEO_DEPTH_PROVIDERS, VIDEO_DEPTH_RESOLUTIONS, checkVideoDepthLength, resolveVideoDepthColormap, resolveVideoDepthModelSize, resolveVideoDepthProvider, videoDepthColormaps, videoDepthCreditId, videoDepthLevers, videoDepthNeedsGrayscalePass };
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
85
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-E3PU7YC6.js.map
|
|
85
|
+
//# sourceMappingURL=chunk-E3PU7YC6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/video-depth.ts"],"names":[],"mappings":";;;AAoBO,IAAM,qBAAA,GAAwB,CAAC,sBAAA,EAAwB,uBAAuB;AAG9E,IAAM,yBAAA,mBAAiD,IAAI,GAAA,CAAI,CAAC,sBAAsB,CAAC;AACvF,IAAM,+BAAA,mBAAuD,IAAI,GAAA,CAAI,CAAC,uBAAuB,CAAC;AAQ9F,SAAS,0BAA0B,GAAA,EAAkC;AAC1E,EAAA,OAAO,OAAO,QAAQ,QAAA,IAAa,qBAAA,CAA4C,SAAS,GAAG,CAAA,GACtF,GAAA,GACD,qBAAA,CAAsB,CAAC,CAAA;AAC7B;AAEO,IAAM,uBAAA,GAA0B,CAAC,OAAA,EAAS,MAAA,EAAQ,OAAO;AAIzD,SAAS,2BAA2B,GAAA,EAAmC;AAC5E,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAA,IAAa,wBAA8C,QAAA,CAAS,GAAG,IACxF,GAAA,GACD,OAAA;AACN;AACO,IAAM,wBAAwB,CAAC,WAAA,EAAa,OAAA,EAAS,SAAA,EAAW,SAAS,SAAS;A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AE,IAAI,IAAA,EAAK;AACnE,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,KAAA,CAAM,kBAAA,CAAmB,iBAAiB,GAAG,CAAA;AACjE,EAAA,OAAO;AAAA,IACL,EAAA,EAAI,KAAA;AAAA,IACJ,OAAA,EACE,YAAY,GAAA,CAAI,MAAM,CAAC,CAAA,sBAAA,EAAyB,GAAA,CAAI,mBAAmB,cAAc,CAAC,WAC5E,MAAM,CAAA,MAAA,EAAS,KAAK,KAAA,CAAM,GAAG,CAAC,CAAA,IAAA,EAAO,OAAA,GAAU,4DAA4D,EAAE,CAAA,+BAAA;AAAA,GAC3H;AACF;AASO,IAAM,sBAAsB,CAAC,EAAA,EAAI,EAAA,EAAI,EAAA,EAAI,KAAK,GAAG;AAGxD,SAAS,qBAAqB,QAAA,EAA0B;AACtD,EAAA,OAAO,gCAAgC,GAAA,CAAI,QAAQ,CAAA,GAC/C,kBAAA,CAAmB,wBACnB,kBAAA,CAAmB,eAAA;AACzB;AAcO,SAAS,kBAAA,CAAmB,UAAkB,WAAA,EAAgD;AACnG,EAAA,MAAM,MAAA,GAAS,qBAAqB,QAAQ,CAAA;AAC5C,EAAA,MAAM,KAAA,GAAQ,OAAO,WAAA,KAAgB,QAAA,IAAY,MAAA,CAAO,SAAS,WAAW,CAAA,IAAK,WAAA,GAAc,CAAA,IAAK,WAAA,IAAe,MAAA;AACnH,EAAA,OAAO,GAAG,QAAQ,CAAA,CAAA,EAAI,QAAQ,iBAAA,CAAkB,WAAW,IAAI,MAAM,CAAA,CAAA,CAAA;AACvE","file":"chunk-CLAKSLXF.js","sourcesContent":["/**\n * Video Depth — the one contract every layer reads: which providers exist and\n * which lane serves each, which optional levers a provider honours, how long a\n * clip may be, and which price row a run is charged from.\n *\n * Colormaps: fal renders every `VIDEO_DEPTH_COLORMAPS` entry natively. The\n * Replicate model's native output is inferno-colorized, so it offers only\n * `inferno` (passed through as-is) and `grayscale`, which a worker ffmpeg pass\n * produces from the inferno output (`videoDepthNeedsGrayscalePass`).\n *\n * Price rows are `model_pricing` rows (`<provider>:<n>s`); the credit amounts\n * live there, never here. Both providers have one row per whole second of the\n * clip, up to the longest clip each accepts. Worked examples (repeated in\n * docs/nodes/processing-video/video-depth.md):\n * video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.015 s → `:15s`, 15.06 s → `:16s`.\n * depth-anything-frames: 0.4 s → `:1s`, 4 s → `:4s`, 4.1 s → `:5s`, 15.015 s → `:15s`, 15.06 s → `:16s`, 80 s → `:80s`.\n */\n\nimport { pricedClipSeconds } from \"./priced-clip-seconds.js\"\n\nexport const VIDEO_DEPTH_PROVIDERS = [\"video-depth-anything\", \"depth-anything-frames\"] as const\nexport type VideoDepthProvider = (typeof VIDEO_DEPTH_PROVIDERS)[number]\n\nexport const FAL_VIDEO_DEPTH_PROVIDERS: ReadonlySet<string> = new Set([\"video-depth-anything\"])\nexport const REPLICATE_VIDEO_DEPTH_PROVIDERS: ReadonlySet<string> = new Set([\"depth-anything-frames\"])\n\n/**\n * The provider a run uses: `raw` when it is a Video Depth provider, else the\n * default (the first entry). Raw workflow JSON or a FieldMapping can carry any\n * value; the dispatch, the model deny and the price row all read this one\n * resolution, so an unknown id never reaches a price row or slips the deny.\n */\nexport function resolveVideoDepthProvider(raw: unknown): VideoDepthProvider {\n return typeof raw === \"string\" && (VIDEO_DEPTH_PROVIDERS as readonly string[]).includes(raw)\n ? (raw as VideoDepthProvider)\n : VIDEO_DEPTH_PROVIDERS[0]\n}\n\nexport const VIDEO_DEPTH_MODEL_SIZES = [\"small\", \"base\", \"large\"] as const\nexport type VideoDepthModelSize = (typeof VIDEO_DEPTH_MODEL_SIZES)[number]\n\n/** The model size a run uses: `raw` when it is one, else `large` (the providers index lookup tables with it). */\nexport function resolveVideoDepthModelSize(raw: unknown): VideoDepthModelSize {\n return typeof raw === \"string\" && (VIDEO_DEPTH_MODEL_SIZES as readonly string[]).includes(raw)\n ? (raw as VideoDepthModelSize)\n : \"large\"\n}\nexport const VIDEO_DEPTH_COLORMAPS = [\"grayscale\", \"turbo\", \"inferno\", \"magma\", \"viridis\"] as const\nexport type VideoDepthColormap = (typeof VIDEO_DEPTH_COLORMAPS)[number]\nexport const VIDEO_DEPTH_RESOLUTIONS = [\"auto\", \"360p\", \"480p\", \"720p\", \"1080p\"] as const\nexport type VideoDepthResolution = (typeof VIDEO_DEPTH_RESOLUTIONS)[number]\n\nexport type VideoDepthLever = \"colormap\" | \"resolution\" | \"sideBySide\"\nconst ALL_LEVERS: ReadonlySet<VideoDepthLever> = new Set([\"colormap\", \"resolution\", \"sideBySide\"])\nconst COLORMAP_ONLY: ReadonlySet<VideoDepthLever> = new Set([\"colormap\"])\nconst NO_LEVERS: ReadonlySet<VideoDepthLever> = new Set()\n\n/** The optional levers `provider` honours. A lever absent here is dropped, never sent. */\nexport function videoDepthLevers(provider: string): ReadonlySet<VideoDepthLever> {\n if (FAL_VIDEO_DEPTH_PROVIDERS.has(provider)) return ALL_LEVERS\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) return COLORMAP_ONLY\n return NO_LEVERS\n}\n\nconst REPLICATE_COLORMAPS: readonly VideoDepthColormap[] = [\"grayscale\", \"inferno\"]\n\n/** The colormaps `provider` can deliver, in display order; empty when it has no colormap lever. */\nexport function videoDepthColormaps(provider: string): readonly VideoDepthColormap[] {\n if (FAL_VIDEO_DEPTH_PROVIDERS.has(provider)) return VIDEO_DEPTH_COLORMAPS\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) return REPLICATE_COLORMAPS\n return []\n}\n\n/** The colormap a run uses: the requested one when `provider` offers it, else `grayscale`; `undefined` when the provider has no colormap lever. Coerces, never throws. */\nexport function resolveVideoDepthColormap(provider: string, requested: unknown): VideoDepthColormap | undefined {\n if (!videoDepthLevers(provider).has(\"colormap\")) return undefined\n const offered = videoDepthColormaps(provider)\n return typeof requested === \"string\" && (offered as readonly string[]).includes(requested)\n ? (requested as VideoDepthColormap)\n : \"grayscale\"\n}\n\n/** True when the worker must turn the Replicate model's native inferno output into grayscale with ffmpeg. */\nexport function videoDepthNeedsGrayscalePass(provider: string, colormap: VideoDepthColormap | undefined): boolean {\n return REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider) && resolveVideoDepthColormap(provider, colormap) === \"grayscale\"\n}\n\nexport const VIDEO_DEPTH_LIMITS = {\n /** fal `max_frames` ceiling. */\n FAL_MAX_FRAMES: 2400,\n /** Longest clip the fal lane accepts, whatever its frame rate: its top price row, `:300s` (a low-fps clip under the frame limit can otherwise run past every price row). */\n FAL_MAX_SECONDS: 300,\n /** Frame rate assumed when the clip reports none (variable-rate or missing). */\n ASSUMED_FPS: 30,\n /** Longest clip the Replicate lane accepts. */\n REPLICATE_MAX_SECONDS: 80,\n} as const\n\nconst fmt = (n: number): string => n.toLocaleString(\"en-US\")\n\n/** Refuse a clip the provider cannot take — run BEFORE any credit reservation. */\nexport function checkVideoDepthLength(\n provider: string,\n probe: { durationSec: number; fps?: number },\n): { ok: true } | { ok: false; message: string } {\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) {\n if (probe.durationSec <= VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS) return { ok: true }\n return {\n ok: false,\n message: `Video is ${Math.ceil(probe.durationSec)} s. This provider accepts at most ${VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS} s.`,\n }\n }\n if (probe.durationSec > VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS) {\n return {\n ok: false,\n message: `Video is ${Math.ceil(probe.durationSec)} s. This provider accepts at most ${VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS} s. Trim the clip and run again.`,\n }\n }\n const assumed = !(typeof probe.fps === \"number\" && probe.fps > 0)\n const fps = assumed ? VIDEO_DEPTH_LIMITS.ASSUMED_FPS : (probe.fps as number)\n const frames = Math.ceil(probe.durationSec * fps - 1e-9)\n if (frames <= VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES) return { ok: true }\n const maxSec = Math.floor(VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES / fps)\n return {\n ok: false,\n message:\n `Video is ${fmt(frames)} frames; the limit is ${fmt(VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES)} ` +\n `(about ${maxSec} s at ${Math.round(fps)} fps${assumed ? \", assumed 30 fps because the clip reports no frame rate\" : \"\"}). Trim the clip and run again.`,\n }\n}\n\n/**\n * The length buckets, in seconds, both providers were priced in before their\n * per-second rows. A row is no longer picked from these: a clip's whole seconds\n * name its row, so a `:15s` is the 15-second row and a `:120s` on Depth Anything\n * per frame is past its limit. Each per-second row took its admin switches from\n * the bucket that priced it (migrations 590 and 595).\n */\nexport const VIDEO_DEPTH_BUCKETS = [15, 30, 60, 120, 300] as const\n\n/** The longest clip `provider` accepts (`checkVideoDepthLength`); the fal limit for anything else. */\nfunction videoDepthMaxSeconds(provider: string): number {\n return REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)\n ? VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS\n : VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS\n}\n\n/**\n * The price row for a clip of `durationSec`.\n *\n * One row per whole second of the clip on both lanes: the clip's length rounded\n * UP (`pricedClipSeconds`: up to 0.05 s past a whole second is ignored first), so\n * a clip under one second is priced as one. `video-depth-anything:1s` … `:300s`\n * (decided 2026-11-03), `depth-anything-frames:1s` … `:80s` (decided 2026-11-04).\n *\n * Unknown, non-positive or longer than the provider accepts → the provider's\n * longest clip (fal `:300s`, Replicate `:80s`), its highest REACHABLE row — the\n * most a run on it can be charged, never a row a run could not reach.\n */\nexport function videoDepthCreditId(provider: string, durationSec: number | null | undefined): string {\n const maxSec = videoDepthMaxSeconds(provider)\n const known = typeof durationSec === \"number\" && Number.isFinite(durationSec) && durationSec > 0 && durationSec <= maxSec\n return `${provider}:${known ? pricedClipSeconds(durationSec) : maxSec}s`\n}\n"]}
|
|
1
|
+
{"version":3,"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C,kBAAA,CAAmB,wBACnB,kBAAA,CAAmB,eAAA;AACzB;AAcO,SAAS,kBAAA,CAAmB,UAAkB,WAAA,EAAgD;AACnG,EAAA,MAAM,MAAA,GAAS,qBAAqB,QAAQ,CAAA;AAC5C,EAAA,MAAM,KAAA,GAAQ,OAAO,WAAA,KAAgB,QAAA,IAAY,MAAA,CAAO,SAAS,WAAW,CAAA,IAAK,WAAA,GAAc,CAAA,IAAK,WAAA,IAAe,MAAA;AACnH,EAAA,OAAO,GAAG,QAAQ,CAAA,CAAA,EAAI,QAAQ,iBAAA,CAAkB,WAAW,IAAI,MAAM,CAAA,CAAA,CAAA;AACvE","file":"chunk-E3PU7YC6.js","sourcesContent":["/**\n * Video Depth — the one contract every layer reads: which providers exist and\n * which lane serves each, which optional levers a provider honours, how long a\n * clip may be, and which price row a run is charged from.\n *\n * Colormaps: fal renders every `VIDEO_DEPTH_COLORMAPS` entry natively. The\n * Replicate model's native output is inferno-colorized, so it offers only\n * `inferno` (passed through as-is) and `grayscale`, which a worker ffmpeg pass\n * produces from the inferno output (`videoDepthNeedsGrayscalePass`).\n *\n * Price rows are `model_pricing` rows (`<provider>:<n>s`); the credit amounts\n * live there, never here. Both providers have one row per whole second of the\n * clip, up to the longest clip each accepts. Worked examples (repeated in\n * docs/nodes/processing-video/video-depth.md):\n * video-depth-anything: 0.4 s → `:1s`, 9 s → `:9s`, 9.2 s → `:10s`, 15.015 s → `:15s`, 15.06 s → `:16s`.\n * depth-anything-frames: 0.4 s → `:1s`, 4 s → `:4s`, 4.1 s → `:5s`, 15.015 s → `:15s`, 15.06 s → `:16s`, 80 s → `:80s`.\n */\n\nimport { pricedClipSeconds } from \"./priced-clip-seconds.js\"\n\nexport const VIDEO_DEPTH_PROVIDERS = [\"video-depth-anything\", \"depth-anything-frames\"] as const\nexport type VideoDepthProvider = (typeof VIDEO_DEPTH_PROVIDERS)[number]\n\nexport const FAL_VIDEO_DEPTH_PROVIDERS: ReadonlySet<string> = new Set([\"video-depth-anything\"])\nexport const REPLICATE_VIDEO_DEPTH_PROVIDERS: ReadonlySet<string> = new Set([\"depth-anything-frames\"])\n\n/**\n * The provider a run uses: `raw` when it is a Video Depth provider, else the\n * default (the first entry). Raw workflow JSON or a FieldMapping can carry any\n * value; the dispatch, the model deny and the price row all read this one\n * resolution, so an unknown id never reaches a price row or slips the deny.\n */\nexport function resolveVideoDepthProvider(raw: unknown): VideoDepthProvider {\n return typeof raw === \"string\" && (VIDEO_DEPTH_PROVIDERS as readonly string[]).includes(raw)\n ? (raw as VideoDepthProvider)\n : VIDEO_DEPTH_PROVIDERS[0]\n}\n\nexport const VIDEO_DEPTH_MODEL_SIZES = [\"small\", \"base\", \"large\"] as const\nexport type VideoDepthModelSize = (typeof VIDEO_DEPTH_MODEL_SIZES)[number]\n\n/** The model size a run uses: `raw` when it is one, else `large` (the providers index lookup tables with it). */\nexport function resolveVideoDepthModelSize(raw: unknown): VideoDepthModelSize {\n return typeof raw === \"string\" && (VIDEO_DEPTH_MODEL_SIZES as readonly string[]).includes(raw)\n ? (raw as VideoDepthModelSize)\n : \"large\"\n}\nexport const VIDEO_DEPTH_COLORMAPS = [\"grayscale\", \"turbo\", \"inferno\", \"magma\", \"viridis\"] as const\nexport type VideoDepthColormap = (typeof VIDEO_DEPTH_COLORMAPS)[number]\nexport const VIDEO_DEPTH_RESOLUTIONS = [\"auto\", \"360p\", \"480p\", \"720p\", \"1080p\"] as const\nexport type VideoDepthResolution = (typeof VIDEO_DEPTH_RESOLUTIONS)[number]\n\nexport type VideoDepthLever = \"colormap\" | \"resolution\" | \"sideBySide\"\nconst ALL_LEVERS: ReadonlySet<VideoDepthLever> = new Set([\"colormap\", \"resolution\", \"sideBySide\"])\nconst COLORMAP_ONLY: ReadonlySet<VideoDepthLever> = new Set([\"colormap\"])\nconst NO_LEVERS: ReadonlySet<VideoDepthLever> = new Set()\n\n/** The optional levers `provider` honours. A lever absent here is dropped, never sent. */\nexport function videoDepthLevers(provider: string): ReadonlySet<VideoDepthLever> {\n if (FAL_VIDEO_DEPTH_PROVIDERS.has(provider)) return ALL_LEVERS\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) return COLORMAP_ONLY\n return NO_LEVERS\n}\n\nconst REPLICATE_COLORMAPS: readonly VideoDepthColormap[] = [\"grayscale\", \"inferno\"]\n\n/** The colormaps `provider` can deliver, in display order; empty when it has no colormap lever. */\nexport function videoDepthColormaps(provider: string): readonly VideoDepthColormap[] {\n if (FAL_VIDEO_DEPTH_PROVIDERS.has(provider)) return VIDEO_DEPTH_COLORMAPS\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) return REPLICATE_COLORMAPS\n return []\n}\n\n/** The colormap a run uses: the requested one when `provider` offers it, else `grayscale`; `undefined` when the provider has no colormap lever. Coerces, never throws. */\nexport function resolveVideoDepthColormap(provider: string, requested: unknown): VideoDepthColormap | undefined {\n if (!videoDepthLevers(provider).has(\"colormap\")) return undefined\n const offered = videoDepthColormaps(provider)\n return typeof requested === \"string\" && (offered as readonly string[]).includes(requested)\n ? (requested as VideoDepthColormap)\n : \"grayscale\"\n}\n\n/** True when the worker must turn the Replicate model's native inferno output into grayscale with ffmpeg. */\nexport function videoDepthNeedsGrayscalePass(provider: string, colormap: VideoDepthColormap | undefined): boolean {\n return REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider) && resolveVideoDepthColormap(provider, colormap) === \"grayscale\"\n}\n\nexport const VIDEO_DEPTH_LIMITS = {\n /** fal `max_frames` ceiling. */\n FAL_MAX_FRAMES: 2400,\n /** Longest clip the fal lane accepts, whatever its frame rate: its top price row, `:300s` (a low-fps clip under the frame limit can otherwise run past every price row). */\n FAL_MAX_SECONDS: 300,\n /** Frame rate assumed when the clip reports none (variable-rate or missing). */\n ASSUMED_FPS: 30,\n /** Longest clip the Replicate lane accepts. */\n REPLICATE_MAX_SECONDS: 80,\n} as const\n\nconst fmt = (n: number): string => n.toLocaleString(\"en-US\")\n\n/** Refuse a clip the provider cannot take — run BEFORE any credit reservation. */\nexport function checkVideoDepthLength(\n provider: string,\n probe: { durationSec: number; fps?: number },\n): { ok: true } | { ok: false; message: string } {\n if (REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)) {\n if (probe.durationSec <= VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS) return { ok: true }\n return {\n ok: false,\n message: `Video is ${Math.ceil(probe.durationSec)} s. This provider accepts at most ${VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS} s.`,\n }\n }\n if (probe.durationSec > VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS) {\n return {\n ok: false,\n message: `Video is ${Math.ceil(probe.durationSec)} s. This provider accepts at most ${VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS} s. Trim the clip and run again.`,\n }\n }\n const assumed = !(typeof probe.fps === \"number\" && probe.fps > 0)\n const fps = assumed ? VIDEO_DEPTH_LIMITS.ASSUMED_FPS : (probe.fps as number)\n const frames = Math.ceil(probe.durationSec * fps - 1e-9)\n if (frames <= VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES) return { ok: true }\n const maxSec = Math.floor(VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES / fps)\n return {\n ok: false,\n message:\n `Video is ${fmt(frames)} frames; the limit is ${fmt(VIDEO_DEPTH_LIMITS.FAL_MAX_FRAMES)} ` +\n `(about ${maxSec} s at ${Math.round(fps)} fps${assumed ? \", assumed 30 fps because the clip reports no frame rate\" : \"\"}). Trim the clip and run again.`,\n }\n}\n\n/**\n * The length buckets, in seconds, both providers were priced in before their\n * per-second rows. A row is no longer picked from these: a clip's whole seconds\n * name its row, so a `:15s` is the 15-second row and a `:120s` on Depth Anything\n * per frame is past its limit. Each per-second row took its admin switches from\n * the bucket that priced it (migrations 590 and 595).\n */\nexport const VIDEO_DEPTH_BUCKETS = [15, 30, 60, 120, 300] as const\n\n/** The longest clip `provider` accepts (`checkVideoDepthLength`); the fal limit for anything else. */\nfunction videoDepthMaxSeconds(provider: string): number {\n return REPLICATE_VIDEO_DEPTH_PROVIDERS.has(provider)\n ? VIDEO_DEPTH_LIMITS.REPLICATE_MAX_SECONDS\n : VIDEO_DEPTH_LIMITS.FAL_MAX_SECONDS\n}\n\n/**\n * The price row for a clip of `durationSec`.\n *\n * One row per whole second of the clip on both lanes: the clip's length rounded\n * UP (`pricedClipSeconds`: up to 0.05 s past a whole second is ignored first), so\n * a clip under one second is priced as one. `video-depth-anything:1s` … `:300s`\n * (decided 2026-11-03), `depth-anything-frames:1s` … `:80s` (decided 2026-11-04).\n *\n * Unknown, non-positive or longer than the provider accepts → the provider's\n * longest clip (fal `:300s`, Replicate `:80s`), its highest REACHABLE row — the\n * most a run on it can be charged, never a row a run could not reach.\n */\nexport function videoDepthCreditId(provider: string, durationSec: number | null | undefined): string {\n const maxSec = videoDepthMaxSeconds(provider)\n const known = typeof durationSec === \"number\" && Number.isFinite(durationSec) && durationSec > 0 && durationSec <= maxSec\n return `${provider}:${known ? pricedClipSeconds(durationSec) : maxSec}s`\n}\n"]}
|
|
@@ -2574,6 +2574,42 @@ var VIDEO_MODELS = {
|
|
|
2574
2574
|
{ identifier: "seedance-2-5:30s:1080p", credits: 11850, note: "30s 1080p (max)" }
|
|
2575
2575
|
]
|
|
2576
2576
|
},
|
|
2577
|
+
// Seedance 2.5 Flash — the fast tier of Seedance 2.5, listed beside it (no
|
|
2578
|
+
// default, preset or role moves to it). Its own facts, never the sibling's:
|
|
2579
|
+
// 480p/720p only (no 1080p), 10 images / 5 videos / 5 audio references
|
|
2580
|
+
// (SEEDANCE_2_5_FLASH_REF_LIMITS), WAV/MP3 reference audio only, a prompt plus
|
|
2581
|
+
// reference audio alone is a valid request, and no draft mode or HD finalize.
|
|
2582
|
+
"seedance-2-5-flash": {
|
|
2583
|
+
id: "seedance-2-5-flash",
|
|
2584
|
+
kind: "video",
|
|
2585
|
+
// `v2v`: it edits a clip by instruction through the same Seedance reference
|
|
2586
|
+
// lane as Seedance 2.5 (SEEDANCE_VIDEO_EDIT_PROVIDERS).
|
|
2587
|
+
modes: ["i2v", "t2v", "v2v"],
|
|
2588
|
+
family: "Bytedance",
|
|
2589
|
+
maker: "bytedance",
|
|
2590
|
+
label: "Seedance 2.5 Flash",
|
|
2591
|
+
series: "Seedance",
|
|
2592
|
+
description: "Seedance 2.5 Flash \u2014 the faster, lower-cost tier of Seedance 2.5: 4\u201330s with native sound at 480p or 720p, from text, a first frame or first and last frames, up to 10 image / 5 video / 5 audio references (audio alone works too), and video edits by instruction.",
|
|
2593
|
+
useCases: ["fast", "narrative", "long-form"],
|
|
2594
|
+
features: ["end-frame", "audio", "reference-image", "video-reference", "reference-to-video"],
|
|
2595
|
+
aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
|
|
2596
|
+
durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
|
|
2597
|
+
defaultDuration: 8,
|
|
2598
|
+
autoDuration: true,
|
|
2599
|
+
referenceTaskTypes: ["reference", "edit", "extend"],
|
|
2600
|
+
resolutions: ["480p", "720p"],
|
|
2601
|
+
// No seed in KIE's schema for Flash either — the provider config omits it.
|
|
2602
|
+
noSeed: true,
|
|
2603
|
+
pricing: [
|
|
2604
|
+
{ identifier: "seedance-2-5-flash", credits: 820, note: "default 8s 720p \u2014 see :Ns:res variants for exact" },
|
|
2605
|
+
{ identifier: "seedance-2-5-flash:8s:480p", credits: 370, note: "8s 480p" },
|
|
2606
|
+
{ identifier: "seedance-2-5-flash:8s:720p", credits: 820, note: "8s 720p" },
|
|
2607
|
+
{ identifier: "seedance-2-5-flash:8s:480p-ref", credits: 230, note: "8s 480p with reference video" },
|
|
2608
|
+
{ identifier: "seedance-2-5-flash:8s:720p-ref", credits: 510, note: "8s 720p with reference video" },
|
|
2609
|
+
{ identifier: "seedance-2-5-flash:30s:480p", credits: 1390, note: "30s 480p (max)" },
|
|
2610
|
+
{ identifier: "seedance-2-5-flash:30s:720p", credits: 3080, note: "30s 720p (max)" }
|
|
2611
|
+
]
|
|
2612
|
+
},
|
|
2577
2613
|
// ── Wan ──
|
|
2578
2614
|
// Wan 3.0 (standard + Prime) — a NEW generation, not a tier of the 2.x ladder.
|
|
2579
2615
|
// One id per SKU serves BOTH modes (no t2v twin, no alias): first/last frame
|
|
@@ -3186,6 +3222,33 @@ var VIDEO_MODELS = {
|
|
|
3186
3222
|
{ identifier: "seedance-2-5-extend:1080p:per-2s:9u", credits: 4275, note: "8s added at 1080p to a source of 10s or more" }
|
|
3187
3223
|
]
|
|
3188
3224
|
},
|
|
3225
|
+
// Seedance 2.5 Flash extends ANY video the way Seedance 2.5 does (the
|
|
3226
|
+
// source's last 10 s declared as an extension, no start image), generated
|
|
3227
|
+
// on Seedance 2.5 Flash: its own entry, so a deployment can withhold or
|
|
3228
|
+
// release it apart from Flash generation, at Flash's own 480p / 720p and
|
|
3229
|
+
// 4–30 s. Charged per second of video sent and added, at its resolution's
|
|
3230
|
+
// row, the price of two seconds (decided 2026-11-16).
|
|
3231
|
+
"seedance-2-5-flash-extend": {
|
|
3232
|
+
id: "seedance-2-5-flash-extend",
|
|
3233
|
+
kind: "video",
|
|
3234
|
+
modes: ["extend"],
|
|
3235
|
+
family: "Bytedance",
|
|
3236
|
+
maker: "bytedance",
|
|
3237
|
+
label: "Seedance 2.5 Flash Extend",
|
|
3238
|
+
series: "Seedance",
|
|
3239
|
+
description: "Extend ANY video with Seedance 2.5 Flash, the faster and lower-cost tier: a 4\u201330s continuation (audio included) of the source's last 10 seconds at 480p or 720p, joined onto it. Charged per second of video sent and added; the figure is the default run, 8s added at 720p to a source of 10s or more.",
|
|
3240
|
+
useCases: ["extend", "fast"],
|
|
3241
|
+
durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
|
|
3242
|
+
defaultDuration: 8,
|
|
3243
|
+
resolutions: ["480p", "720p"],
|
|
3244
|
+
pricing: [
|
|
3245
|
+
// The default run (8 s added to a source of 10 s or more: 18 s sent and
|
|
3246
|
+
// added, 9 units of the two-second row) at each resolution. A run is
|
|
3247
|
+
// charged its own seconds: `seedance-2-5-flash-extend:<res>:per-2s` × (sent + added) ÷ 2.
|
|
3248
|
+
{ identifier: "seedance-2-5-flash-extend:720p:per-2s:9u", credits: 1152, note: "default run: 8s added at 720p to a source of 10s or more \u2014 priced per second sent and added" },
|
|
3249
|
+
{ identifier: "seedance-2-5-flash-extend:480p:per-2s:9u", credits: 522, note: "8s added at 480p to a source of 10s or more" }
|
|
3250
|
+
]
|
|
3251
|
+
},
|
|
3189
3252
|
"seedance-2-0-extend": {
|
|
3190
3253
|
id: "seedance-2-0-extend",
|
|
3191
3254
|
kind: "video",
|
|
@@ -3228,6 +3291,38 @@ var VIDEO_MODELS = {
|
|
|
3228
3291
|
{ identifier: "kling-4-extend:5s:1080p", credits: 638, note: "5s 1080p" }
|
|
3229
3292
|
]
|
|
3230
3293
|
},
|
|
3294
|
+
// Gemini Omni Flash 1.2 extends ANY 16:9 or 9:16 video from its tail
|
|
3295
|
+
// (decided 2026-11-17): the source's last 10 s go to fal's extend, which
|
|
3296
|
+
// returns them with the new seconds joined on; the run keeps the user's own
|
|
3297
|
+
// source and joins only the new seconds to it. Its own entry, so a
|
|
3298
|
+
// deployment can withhold it apart from Gemini Omni Flash 1.2 generation.
|
|
3299
|
+
// Charged per second sent and added on its own rows; each figure below is
|
|
3300
|
+
// a whole run's quote id (the whole 10 s window sent).
|
|
3301
|
+
"gemini-omni-flash-1-2-extend": {
|
|
3302
|
+
id: "gemini-omni-flash-1-2-extend",
|
|
3303
|
+
kind: "video",
|
|
3304
|
+
modes: ["extend"],
|
|
3305
|
+
family: "Google",
|
|
3306
|
+
maker: "google",
|
|
3307
|
+
label: "Gemini Omni Flash 1.2 Extend",
|
|
3308
|
+
series: "Gemini",
|
|
3309
|
+
description: "Extend ANY 16:9 or 9:16 video with Gemini Omni Flash 1.2: a 3\u201310s continuation with sound, from 360p to 4K, of the source's last 10 seconds, joined onto it. Charged per second of video sent and added; the figure is the default run, 8s added at 720p to a source of 10s or more.",
|
|
3310
|
+
useCases: ["extend", "fast"],
|
|
3311
|
+
durations: [3, 4, 5, 6, 7, 8, 9, 10],
|
|
3312
|
+
defaultDuration: 8,
|
|
3313
|
+
resolutions: ["360p", "720p", "1080p", "4k"],
|
|
3314
|
+
pricing: [
|
|
3315
|
+
// Whole-run quotes (`geminiOmniExtendQuoteCreditId`) of runs that send
|
|
3316
|
+
// the whole 10 s window. A run is charged its own seconds: its sent row
|
|
3317
|
+
// per second sent plus its resolution's row per second added, the total
|
|
3318
|
+
// rounded up to the next 10.
|
|
3319
|
+
{ identifier: "gemini-omni-flash-1-2-extend:720p:sent-10s:added-8s", credits: 390, note: "default run: 8s added at 720p to a source of 10s or more \u2014 priced per second sent and added" },
|
|
3320
|
+
{ identifier: "gemini-omni-flash-1-2-extend:360p:sent-10s:added-3s", credits: 100, note: "3s added at 360p to a source of 10s or more (min)" },
|
|
3321
|
+
{ identifier: "gemini-omni-flash-1-2-extend:1080p:sent-10s:added-8s", credits: 560, note: "8s added at 1080p to a source of 10s or more" },
|
|
3322
|
+
{ identifier: "gemini-omni-flash-1-2-extend:4k:sent-10s:added-8s", credits: 1050, note: "8s added at 4K to a source of 10s or more" },
|
|
3323
|
+
{ identifier: "gemini-omni-flash-1-2-extend:4k:sent-10s:added-10s", credits: 1300, note: "10s added at 4K to a source of 10s or more (max)" }
|
|
3324
|
+
]
|
|
3325
|
+
},
|
|
3231
3326
|
// PixVerse V6 extends ANY video natively (no tail recipe): the whole source
|
|
3232
3327
|
// goes to its extend, which returns it with the new seconds joined on; the
|
|
3233
3328
|
// run keeps the user's own source and joins only the new seconds to it. Its
|
|
@@ -5306,5 +5401,5 @@ function modelIdsByKindMode(kind, modes, opts = {}) {
|
|
|
5306
5401
|
}
|
|
5307
5402
|
|
|
5308
5403
|
export { CONTAINER_OVERHANG_SEC, FLUX2_RES_MP, FLUX_3_KLEIN_DEFAULT_RESOLUTION, FLUX_3_KLEIN_I2I, FLUX_3_KLEIN_MAX_INPUT_IMAGES, FLUX_3_KLEIN_RESOLUTIONS, FLUX_3_KLEIN_T2I, GEMINI_3_1_DEFAULT_VOICE, GEMINI_3_1_TTS_ACCENTS, GEMINI_3_1_TTS_PACES, GEMINI_3_1_TTS_STYLES, GEMINI_3_1_TTS_VOICES, GEMINI_3_8_DEFAULT_VOICE, GEMINI_3_8_TONE_TAGS, GEMINI_3_8_TTS_VOICES, GEMINI_TTS_MAX_CHARS, GEMINI_TTS_VOICE_GROUPS, IMAGE_GIF_FRAME_SIZE, IMAGE_OUTPUT_FORMAT_LABELS, IMAGE_SVG_LEVEL_LABELS, MASKLESS_OUTPUT_FORMATS, MINIMAX_H3_IMAGE_DEFAULT_RESOLUTION, MINIMAX_H3_IMAGE_I2I, MINIMAX_H3_IMAGE_MAX_INPUT_IMAGES, MINIMAX_H3_IMAGE_RESOLUTIONS, MINIMAX_H3_IMAGE_T2I, MODEL_CATALOG, MODEL_INPUT_ADJUSTMENT_FIELDS, MODEL_KINDS, MODEL_MAKERS, MODEL_RECOMMENDATIONS, REPLICA_CONSENT_ATTESTATION, REPLICA_CONSENT_MAX_SEC, REPLICA_CONSENT_SENTENCE, REPLICA_MAX_BYTES, REPLICA_SOURCE_MAX_SEC, REPLICA_SOURCE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_MAX_SEC, SEEDANCE_DRAFT_FINALIZE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_PROVIDER, SEEDANCE_DRAFT_FINALIZE_RESOLUTION, SEEDANCE_DRAFT_MODELS, SEEDANCE_DRAFT_RESOLUTION, SEEDREAM_5_5_DEFAULT_RESOLUTION, SEEDREAM_5_5_I2I, SEEDREAM_5_5_MAX_INPUT_IMAGES, SEEDREAM_5_5_MIN_PROMPT_CHARS, SEEDREAM_5_5_RESOLUTIONS, SEEDREAM_5_5_T2I, SPEECH_PER_1K_PRICE_NOTE, SPEECH_UNIT_PRICE_NOTE, TRANSPARENT_OUTPUT_FORMATS, TTS_DIRECTION_MAX_CHARS, VIDEO_DURATION_AUTO, aspectRatioOptionsByKind, autoAspectNeedsSourceImage, backgroundOptionsByKind, buildModelMenu, creditRangesAll, defaultResolutionFor, durationsByMode, editPlanSourceDurationSec, extractVideoDurationFromNode, fitAspectRatioToModel, flux3KleinCreditId, flux3KleinResolution, getAspectRatioOptions, getCreditRange, getDurationsForModel, getModel, getQualityOptions, getResolutionOptions, groupByFamily, groupByKindAndFamily, hasFeature, isAutoAspectToken, isAutoVideoDuration, isFlux2Model, isFlux3Klein, isFlux3KleinI2i, isMinimaxH3Image, isMinimaxH3ImageI2i, isModelMakerId, isSeedanceDraftCapable, isSeedream55, isSeedream55I2i, isVideoAutoAspectToken, listModels, maskEditMatchesSource, maskedEditResolution, minimaxH3ImageCreditId, modelIdsByKindMode, modelMakerOf, modelTakesSeed, modelsWithFeature, nearestCatalogAspectRatio, normalizeModelInput, normalizeVideoRequestParams, outputFormatOptionsByKind, qualityOptionsByKind, resolutionAtAspectRatio, resolutionNearestSource, resolutionOptionsByKind, resolutionsAtAspectRatio, seedanceDraftFinalizeBillableSec, seedanceDraftFinalizeCreditId, seedream55Resolution, sourceImageSizeNeeded, svgLevelOptionsByKind, validateModelInput, videoAutoAspectRunsAt };
|
|
5309
|
-
//# sourceMappingURL=chunk-
|
|
5310
|
-
//# sourceMappingURL=chunk-
|
|
5404
|
+
//# sourceMappingURL=chunk-FUYBUT65.js.map
|
|
5405
|
+
//# sourceMappingURL=chunk-FUYBUT65.js.map
|