@nodetool-ai/fal-nodes 0.8.10 → 0.8.14
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/README.md +1 -1
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/fal-base.d.ts +28 -34
- package/dist/fal-base.d.ts.map +1 -1
- package/dist/fal-base.js +34 -142
- package/dist/fal-base.js.map +1 -1
- package/dist/fal-dynamic.d.ts.map +1 -1
- package/dist/fal-dynamic.js +17 -9
- package/dist/fal-dynamic.js.map +1 -1
- package/dist/fal-factory.d.ts +2 -1
- package/dist/fal-factory.d.ts.map +1 -1
- package/dist/fal-factory.js +38 -12
- package/dist/fal-factory.js.map +1 -1
- package/dist/fal-manifest.json +15544 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -6
- package/dist/fal-provider.d.ts +0 -88
- package/dist/fal-provider.d.ts.map +0 -1
- package/dist/fal-provider.js +0 -376
- package/dist/fal-provider.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { NodeClass } from "@nodetool-ai/node-sdk";
|
|
2
|
-
export { FalProvider } from "./fal-provider.js";
|
|
3
2
|
export { FalRawNode, FalDynamicNode } from "./fal-dynamic.js";
|
|
4
3
|
export { createFalNodeClass, loadFalNodesFromManifest } from "./fal-factory.js";
|
|
5
4
|
export type { FalManifestEntry } from "./fal-factory.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAChF,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAYlF,eAAO,MAAM,SAAS,EAAE,SAAS,SAAS,EAEzC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C,GAAG,IAAI,CAIP"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { loadPackageAssetJson } from "@nodetool-ai/config";
|
|
2
2
|
import { loadFalNodesFromManifest } from "./fal-factory.js";
|
|
3
3
|
import { registerFalCostReconciler } from "./fal-billing.js";
|
|
4
|
-
export { FalProvider } from "./fal-provider.js";
|
|
5
4
|
export { FalRawNode, FalDynamicNode } from "./fal-dynamic.js";
|
|
6
5
|
export { createFalNodeClass, loadFalNodesFromManifest } from "./fal-factory.js";
|
|
7
6
|
export { estimateFalCost, reportFalCost, getFalPricing } from "./fal-cost.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAElF,gFAAgF;AAChF,yBAAyB,EAAE,CAAC;AAE5B,SAAS,YAAY;IACnB,OAAO,oBAAoB,CACzB,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAC5D,OAAO,IAAI,CAAC,GAAG,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAyB,wBAAwB,CACrE,YAAY,EAAE,CACf,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,QAEhC;IACC,KAAK,MAAM,SAAS,IAAI,SAAS,EAAE,CAAC;QAClC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.0.0"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.
|
|
7
|
+
"version": "0.8.14",
|
|
8
8
|
"description": "FAL AI nodes for nodetool",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
"lint": "node ../../scripts/run-tsc.mjs --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"@nodetool-ai/
|
|
20
|
-
"@nodetool-ai/
|
|
21
|
-
"@nodetool-ai/
|
|
22
|
-
"@nodetool-ai/model-pricing": "0.8.10"
|
|
18
|
+
"@nodetool-ai/config": "0.8.14",
|
|
19
|
+
"@nodetool-ai/node-sdk": "0.8.14",
|
|
20
|
+
"@nodetool-ai/runtime": "0.8.14",
|
|
21
|
+
"@nodetool-ai/model-pricing": "0.8.14"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"@types/node": "^22.0.0",
|
package/dist/fal-provider.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FalProvider — TypeScript port of nodetool-fal fal_provider.py.
|
|
3
|
-
*
|
|
4
|
-
* Provides textToImage, imageToImage, textToSpeech methods and the full list
|
|
5
|
-
* of available image models (ported from get_available_image_models).
|
|
6
|
-
*/
|
|
7
|
-
interface FalImageModel {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
}
|
|
11
|
-
export type GptImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
12
|
-
/** All FAL AI image models available through the provider. */
|
|
13
|
-
export declare const FAL_IMAGE_MODELS: readonly FalImageModel[];
|
|
14
|
-
export interface TextToImageParams {
|
|
15
|
-
/** Text description of the desired image. */
|
|
16
|
-
prompt: string;
|
|
17
|
-
/** FAL endpoint ID (e.g. "fal-ai/flux/dev"). */
|
|
18
|
-
model: string;
|
|
19
|
-
negativePrompt?: string;
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
seed?: number;
|
|
23
|
-
guidanceScale?: number;
|
|
24
|
-
numInferenceSteps?: number;
|
|
25
|
-
safetyCheck?: boolean;
|
|
26
|
-
quality?: GptImageQuality;
|
|
27
|
-
}
|
|
28
|
-
export interface ImageToImageParams {
|
|
29
|
-
/** Input image as raw bytes (PNG or JPEG). */
|
|
30
|
-
imageBytes: Uint8Array;
|
|
31
|
-
/** Text prompt describing the desired transformation. */
|
|
32
|
-
prompt: string;
|
|
33
|
-
/** FAL endpoint ID. */
|
|
34
|
-
model: string;
|
|
35
|
-
negativePrompt?: string;
|
|
36
|
-
strength?: number;
|
|
37
|
-
guidanceScale?: number;
|
|
38
|
-
numInferenceSteps?: number;
|
|
39
|
-
targetWidth?: number;
|
|
40
|
-
targetHeight?: number;
|
|
41
|
-
seed?: number;
|
|
42
|
-
quality?: GptImageQuality;
|
|
43
|
-
}
|
|
44
|
-
export interface TextToSpeechParams {
|
|
45
|
-
text: string;
|
|
46
|
-
/** FAL TTS endpoint ID (e.g. "fal-ai/mmaudio-v2/text-to-audio"). */
|
|
47
|
-
model: string;
|
|
48
|
-
numSteps?: number;
|
|
49
|
-
duration?: number;
|
|
50
|
-
cfgStrength?: number;
|
|
51
|
-
negativePrompt?: string;
|
|
52
|
-
seed?: number;
|
|
53
|
-
}
|
|
54
|
-
export declare class FalProvider {
|
|
55
|
-
private readonly apiKey;
|
|
56
|
-
totalRequests: number;
|
|
57
|
-
totalImages: number;
|
|
58
|
-
constructor(apiKeyOrSecrets: string | Record<string, string>);
|
|
59
|
-
/**
|
|
60
|
-
* Generate an image from a text prompt.
|
|
61
|
-
* Returns the raw image bytes (PNG).
|
|
62
|
-
*/
|
|
63
|
-
textToImage(params: TextToImageParams): Promise<Uint8Array>;
|
|
64
|
-
/**
|
|
65
|
-
* Transform an existing image based on a text prompt.
|
|
66
|
-
* Returns raw image bytes (PNG).
|
|
67
|
-
*/
|
|
68
|
-
imageToImage(params: ImageToImageParams): Promise<Uint8Array>;
|
|
69
|
-
/**
|
|
70
|
-
* Generate audio from text using a FAL TTS endpoint.
|
|
71
|
-
* Returns the raw audio bytes.
|
|
72
|
-
*/
|
|
73
|
-
textToSpeech(params: TextToSpeechParams): Promise<Uint8Array>;
|
|
74
|
-
/** Return all available FAL AI image models. */
|
|
75
|
-
getAvailableImageModels(): readonly FalImageModel[];
|
|
76
|
-
/**
|
|
77
|
-
* Upload bytes to FAL CDN and return the CDN URL.
|
|
78
|
-
* Thin wrapper around falUpload for callers that already have a FalProvider.
|
|
79
|
-
*/
|
|
80
|
-
upload(data: Uint8Array, contentType: string): Promise<string>;
|
|
81
|
-
/**
|
|
82
|
-
* Convert an image ref ({data, uri}) to a data: URI or FAL CDN URL
|
|
83
|
-
* suitable for passing as image_url in API arguments.
|
|
84
|
-
*/
|
|
85
|
-
imageRefToUrl(imageRef: Record<string, unknown>): Promise<string | null>;
|
|
86
|
-
}
|
|
87
|
-
export {};
|
|
88
|
-
//# sourceMappingURL=fal-provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fal-provider.d.ts","sourceRoot":"","sources":["../src/fal-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,KAAK,CAAC;AAUV,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAqHpD,CAAC;AAMF,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,OAA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AC,CAyBlE;IAMD,gDAAgD;IAChD,uBAAuB,IAAI,SAAS,aAAa,EAAE,CAElD;IAMD;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnE;IAED;;;OAGG;IACG,aAAa,CACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;CACF"}
|
package/dist/fal-provider.js
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FalProvider — TypeScript port of nodetool-fal fal_provider.py.
|
|
3
|
-
*
|
|
4
|
-
* Provides textToImage, imageToImage, textToSpeech methods and the full list
|
|
5
|
-
* of available image models (ported from get_available_image_models).
|
|
6
|
-
*/
|
|
7
|
-
import { getFalApiKey, falSubmit, falUpload, imageToDataUrl } from "./fal-base.js";
|
|
8
|
-
import { snapToGptImage2Size } from "@nodetool-ai/runtime";
|
|
9
|
-
const GPT_IMAGE_25_EDIT_ENDPOINTS = {
|
|
10
|
-
"openai/gpt-image-2.5/flare/text-to-image": "openai/gpt-image-2.5/flare/edit",
|
|
11
|
-
"openai/gpt-image-2.5/sunburst/text-to-image": "openai/gpt-image-2.5/sunburst/edit",
|
|
12
|
-
"openai/gpt-image-2.5/flare/edit": "openai/gpt-image-2.5/flare/edit",
|
|
13
|
-
"openai/gpt-image-2.5/sunburst/edit": "openai/gpt-image-2.5/sunburst/edit"
|
|
14
|
-
};
|
|
15
|
-
/** All FAL AI image models available through the provider. */
|
|
16
|
-
export const FAL_IMAGE_MODELS = [
|
|
17
|
-
// FLUX.2 Models
|
|
18
|
-
{ id: "fal-ai/flux-2-pro", name: "FLUX.2 Pro" },
|
|
19
|
-
{ id: "fal-ai/flux-2-max", name: "FLUX.2 Max" },
|
|
20
|
-
{ id: "fal-ai/flux-2", name: "FLUX.2" },
|
|
21
|
-
{ id: "fal-ai/flux-2/turbo", name: "FLUX.2 Turbo" },
|
|
22
|
-
{ id: "fal-ai/flux-2/flash", name: "FLUX.2 Flash" },
|
|
23
|
-
{ id: "fal-ai/flux-2-flex", name: "FLUX.2 Flex" },
|
|
24
|
-
{ id: "fal-ai/flux-2/lora", name: "FLUX.2 with LoRA" },
|
|
25
|
-
{ id: "fal-ai/flux-2/klein/9b", name: "FLUX.2 Klein 9B" },
|
|
26
|
-
{ id: "fal-ai/flux-2/klein/4b", name: "FLUX.2 Klein 4B" },
|
|
27
|
-
// Google Models
|
|
28
|
-
{ id: "fal-ai/nano-banana-2", name: "Nano Banana 2" },
|
|
29
|
-
{ id: "google/nano-banana-2-lite", name: "Nano Banana 2 Lite" },
|
|
30
|
-
{ id: "fal-ai/nano-banana-pro", name: "Nano Banana Pro" },
|
|
31
|
-
{ id: "google/nano-banana-lite", name: "Nano Banana Lite" },
|
|
32
|
-
{ id: "fal-ai/nano-banana", name: "Nano Banana" },
|
|
33
|
-
{ id: "fal-ai/imagen4/preview", name: "Imagen 4 Preview" },
|
|
34
|
-
// ByteDance Seedream Models
|
|
35
|
-
{
|
|
36
|
-
id: "bytedance/seedream/v5/pro/text-to-image",
|
|
37
|
-
name: "Seedream 5.0 Pro"
|
|
38
|
-
},
|
|
39
|
-
{ id: "bytedance/seedream/v5/lite/text-to-image", name: "Seedream 5.0 Lite" },
|
|
40
|
-
{
|
|
41
|
-
id: "fal-ai/bytedance/seedream/v4.5/text-to-image",
|
|
42
|
-
name: "Seedream 4.5"
|
|
43
|
-
},
|
|
44
|
-
{ id: "fal-ai/bytedance/seedream/v4/text-to-image", name: "Seedream 4.0" },
|
|
45
|
-
// Qwen Models
|
|
46
|
-
{ id: "fal-ai/qwen-image-2/pro/text-to-image", name: "Qwen Image 2 Pro" },
|
|
47
|
-
{ id: "fal-ai/qwen-image-2/text-to-image", name: "Qwen Image 2" },
|
|
48
|
-
{ id: "fal-ai/qwen-image-max/text-to-image", name: "Qwen Image Max" },
|
|
49
|
-
{ id: "fal-ai/qwen-image", name: "Qwen Image" },
|
|
50
|
-
// Ideogram Models
|
|
51
|
-
{ id: "ideogram/v4", name: "Ideogram v4" },
|
|
52
|
-
{ id: "ideogram/v4/fast", name: "Ideogram v4 Fast" },
|
|
53
|
-
{ id: "ideogram/v4/instant", name: "Ideogram v4 Instant" },
|
|
54
|
-
{ id: "ideogram/v4/lora", name: "Ideogram v4 with LoRA" },
|
|
55
|
-
// Krea Models
|
|
56
|
-
{ id: "fal-ai/krea-2/turbo", name: "Krea 2 Turbo" },
|
|
57
|
-
{ id: "krea/v2/large/text-to-image", name: "Krea 2 Large" },
|
|
58
|
-
{ id: "krea/v2/medium/text-to-image", name: "Krea 2 Medium" },
|
|
59
|
-
// Recraft Models
|
|
60
|
-
{ id: "fal-ai/recraft/v4.1/pro/text-to-image", name: "Recraft v4.1 Pro" },
|
|
61
|
-
{ id: "fal-ai/recraft/v4.1/text-to-image", name: "Recraft v4.1" },
|
|
62
|
-
{ id: "fal-ai/recraft/v4.1/text-to-vector", name: "Recraft v4.1 Vector" },
|
|
63
|
-
// Other Recent Models
|
|
64
|
-
{ id: "reve/2.1/text-to-image", name: "Reve 2.1" },
|
|
65
|
-
{ id: "openai/gpt-image-2", name: "GPT Image 2" },
|
|
66
|
-
{
|
|
67
|
-
id: "openai/gpt-image-2.5/flare/text-to-image",
|
|
68
|
-
name: "GPT Image 2.5 Flare"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "openai/gpt-image-2.5/sunburst/text-to-image",
|
|
72
|
-
name: "GPT Image 2.5 Sunburst"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "xai/grok-imagine-image/quality/text-to-image",
|
|
76
|
-
name: "Grok Imagine Image"
|
|
77
|
-
},
|
|
78
|
-
{ id: "microsoft/mai-image-2.5", name: "MAI Image 2.5" },
|
|
79
|
-
{ id: "fal-ai/hidream-o1-image", name: "HiDream O1" },
|
|
80
|
-
{ id: "fal-ai/z-image/turbo", name: "Z-Image Turbo" },
|
|
81
|
-
{ id: "fal-ai/z-image/base", name: "Z-Image Base" },
|
|
82
|
-
{ id: "fal-ai/wan/v2.7/pro/text-to-image", name: "Wan v2.7 Pro" },
|
|
83
|
-
{ id: "fal-ai/wan/v2.7/text-to-image", name: "Wan v2.7" },
|
|
84
|
-
{
|
|
85
|
-
id: "fal-ai/hunyuan-image/v3/text-to-image",
|
|
86
|
-
name: "Hunyuan Image v3"
|
|
87
|
-
},
|
|
88
|
-
{ id: "nvidia/cosmos-3-super/text-to-image", name: "Cosmos 3 Super" },
|
|
89
|
-
// FLUX.1 Models
|
|
90
|
-
{ id: "fal-ai/flux/dev", name: "FLUX.1 Dev" },
|
|
91
|
-
{ id: "fal-ai/flux/schnell", name: "FLUX.1 Schnell" },
|
|
92
|
-
{ id: "fal-ai/flux-pro/v1.1", name: "FLUX.1 Pro v1.1" },
|
|
93
|
-
{ id: "fal-ai/flux-pro/v1.1-ultra", name: "FLUX.1 Pro Ultra" },
|
|
94
|
-
{ id: "fal-ai/flux-pro/new", name: "FLUX.1 Pro (New)" },
|
|
95
|
-
{ id: "fal-ai/flux-lora", name: "FLUX.1 Dev with LoRA" },
|
|
96
|
-
{ id: "fal-ai/flux-subject", name: "FLUX.1 Subject" },
|
|
97
|
-
{ id: "fal-ai/flux-general", name: "FLUX.1 General" },
|
|
98
|
-
// Ideogram Models
|
|
99
|
-
{ id: "fal-ai/ideogram/v2", name: "Ideogram v2" },
|
|
100
|
-
{ id: "fal-ai/ideogram/v2/turbo", name: "Ideogram v2 Turbo" },
|
|
101
|
-
// Recraft Models
|
|
102
|
-
{ id: "fal-ai/recraft-v3", name: "Recraft v3" },
|
|
103
|
-
{ id: "fal-ai/recraft-20b", name: "Recraft 20B" },
|
|
104
|
-
// Stable Diffusion Models
|
|
105
|
-
{
|
|
106
|
-
id: "fal-ai/stable-diffusion-v3-medium",
|
|
107
|
-
name: "Stable Diffusion v3 Medium"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: "fal-ai/stable-diffusion-v35-large",
|
|
111
|
-
name: "Stable Diffusion v3.5 Large"
|
|
112
|
-
},
|
|
113
|
-
{ id: "fal-ai/fast-sdxl", name: "Fast SDXL" },
|
|
114
|
-
{ id: "fal-ai/stable-cascade", name: "Stable Cascade" },
|
|
115
|
-
{ id: "fal-ai/fast-lightning-sdxl", name: "Fast Lightning SDXL" },
|
|
116
|
-
{ id: "fal-ai/fast-turbo-diffusion", name: "Fast Turbo Diffusion" },
|
|
117
|
-
{ id: "fal-ai/fast-lcm-diffusion", name: "Fast LCM Diffusion" },
|
|
118
|
-
{ id: "fal-ai/lcm", name: "LCM Diffusion" },
|
|
119
|
-
// Bria Models (Licensed Data)
|
|
120
|
-
{ id: "fal-ai/bria/text-to-image/base", name: "Bria v1" },
|
|
121
|
-
{ id: "fal-ai/bria/text-to-image/fast", name: "Bria v1 Fast" },
|
|
122
|
-
{ id: "fal-ai/bria/text-to-image/hd", name: "Bria v1 HD" },
|
|
123
|
-
// Other Models
|
|
124
|
-
{ id: "fal-ai/aura-flow", name: "AuraFlow v0.3" },
|
|
125
|
-
{ id: "fal-ai/sana", name: "Sana v1" },
|
|
126
|
-
{ id: "fal-ai/omnigen-v1", name: "OmniGen v1" },
|
|
127
|
-
{ id: "fal-ai/luma-photon", name: "Luma Photon" },
|
|
128
|
-
{ id: "fal-ai/luma-photon/flash", name: "Luma Photon Flash" },
|
|
129
|
-
{ id: "fal-ai/playground-v25", name: "Playground v2.5" },
|
|
130
|
-
{ id: "fal-ai/fooocus", name: "Fooocus" },
|
|
131
|
-
{ id: "fal-ai/illusion-diffusion", name: "Illusion Diffusion" },
|
|
132
|
-
{ id: "fal-ai/lora", name: "LoRA Text-to-Image" }
|
|
133
|
-
];
|
|
134
|
-
// ---------------------------------------------------------------------------
|
|
135
|
-
// Validation error formatter (ported from Python _format_validation_error)
|
|
136
|
-
// ---------------------------------------------------------------------------
|
|
137
|
-
function formatValidationError(errorStr) {
|
|
138
|
-
try {
|
|
139
|
-
const match = /\[{.*}\]/s.exec(errorStr);
|
|
140
|
-
if (match) {
|
|
141
|
-
const errors = JSON.parse(match[0]);
|
|
142
|
-
if (Array.isArray(errors) && errors.length > 0) {
|
|
143
|
-
const formatted = [];
|
|
144
|
-
for (const error of errors) {
|
|
145
|
-
if (typeof error !== "object" || error === null)
|
|
146
|
-
continue;
|
|
147
|
-
const loc = error.loc;
|
|
148
|
-
const fieldName = loc ? loc[loc.length - 1] : "unknown field";
|
|
149
|
-
const msg = error.msg ?? "";
|
|
150
|
-
const inputValue = error.input;
|
|
151
|
-
const ctx = error.ctx ?? {};
|
|
152
|
-
const errorType = error.type ?? "";
|
|
153
|
-
if (errorType === "less_than_equal" && "le" in ctx) {
|
|
154
|
-
formatted.push(`Parameter '${fieldName}' must be ${ctx.le} or less (you provided ${inputValue})`);
|
|
155
|
-
}
|
|
156
|
-
else if (errorType === "greater_than_equal" && "ge" in ctx) {
|
|
157
|
-
formatted.push(`Parameter '${fieldName}' must be ${ctx.ge} or greater (you provided ${inputValue})`);
|
|
158
|
-
}
|
|
159
|
-
else if (errorType === "missing") {
|
|
160
|
-
formatted.push(`Required parameter '${fieldName}' is missing`);
|
|
161
|
-
}
|
|
162
|
-
else if (errorType === "value_error") {
|
|
163
|
-
formatted.push(`Parameter '${fieldName}': ${msg}`);
|
|
164
|
-
}
|
|
165
|
-
else if (inputValue !== undefined) {
|
|
166
|
-
formatted.push(`Parameter '${fieldName}': ${msg} (you provided ${inputValue})`);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
formatted.push(`Parameter '${fieldName}': ${msg}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (formatted.length > 0) {
|
|
173
|
-
return "Invalid parameters:\n - " + formatted.join("\n - ");
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
// Fall through to return original
|
|
180
|
-
}
|
|
181
|
-
return errorStr;
|
|
182
|
-
}
|
|
183
|
-
// ---------------------------------------------------------------------------
|
|
184
|
-
// FalProvider class
|
|
185
|
-
// ---------------------------------------------------------------------------
|
|
186
|
-
export class FalProvider {
|
|
187
|
-
apiKey;
|
|
188
|
-
totalRequests = 0;
|
|
189
|
-
totalImages = 0;
|
|
190
|
-
constructor(apiKeyOrSecrets) {
|
|
191
|
-
if (typeof apiKeyOrSecrets === "string") {
|
|
192
|
-
this.apiKey = apiKeyOrSecrets;
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
this.apiKey = getFalApiKey(apiKeyOrSecrets);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
// -------------------------------------------------------------------------
|
|
199
|
-
// Text-to-Image
|
|
200
|
-
// -------------------------------------------------------------------------
|
|
201
|
-
/**
|
|
202
|
-
* Generate an image from a text prompt.
|
|
203
|
-
* Returns the raw image bytes (PNG).
|
|
204
|
-
*/
|
|
205
|
-
async textToImage(params) {
|
|
206
|
-
const args = {
|
|
207
|
-
prompt: params.prompt,
|
|
208
|
-
output_format: "png"
|
|
209
|
-
};
|
|
210
|
-
if (params.negativePrompt)
|
|
211
|
-
args.negative_prompt = params.negativePrompt;
|
|
212
|
-
if (params.guidanceScale != null)
|
|
213
|
-
args.guidance_scale = params.guidanceScale;
|
|
214
|
-
if (params.numInferenceSteps != null)
|
|
215
|
-
args.num_inference_steps = params.numInferenceSteps;
|
|
216
|
-
if (params.width && params.height) {
|
|
217
|
-
const size = params.model.startsWith("openai/gpt-image-2.5/")
|
|
218
|
-
? snapToGptImage2Size(params.width, params.height)
|
|
219
|
-
: [params.width, params.height];
|
|
220
|
-
if (size)
|
|
221
|
-
args.image_size = { width: size[0], height: size[1] };
|
|
222
|
-
}
|
|
223
|
-
if (params.seed != null && params.seed !== -1)
|
|
224
|
-
args.seed = params.seed;
|
|
225
|
-
if (params.safetyCheck != null)
|
|
226
|
-
args.enable_safety_checker = params.safetyCheck;
|
|
227
|
-
if (params.quality)
|
|
228
|
-
args.quality = params.quality;
|
|
229
|
-
try {
|
|
230
|
-
this.totalRequests++;
|
|
231
|
-
const result = await falSubmit(this.apiKey, params.model, args);
|
|
232
|
-
this.totalImages++;
|
|
233
|
-
const imageUrl = extractImageUrl(result);
|
|
234
|
-
return downloadBytes(imageUrl);
|
|
235
|
-
}
|
|
236
|
-
catch (e) {
|
|
237
|
-
const msg = formatValidationError(String(e));
|
|
238
|
-
throw new Error(`FAL text-to-image generation failed: ${msg}`);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
// -------------------------------------------------------------------------
|
|
242
|
-
// Image-to-Image
|
|
243
|
-
// -------------------------------------------------------------------------
|
|
244
|
-
/**
|
|
245
|
-
* Transform an existing image based on a text prompt.
|
|
246
|
-
* Returns raw image bytes (PNG).
|
|
247
|
-
*/
|
|
248
|
-
async imageToImage(params) {
|
|
249
|
-
// FAL requires images as data URIs for image-to-image
|
|
250
|
-
const b64 = Buffer.from(params.imageBytes).toString("base64");
|
|
251
|
-
const imageDataUri = `data:image/png;base64,${b64}`;
|
|
252
|
-
const editEndpoint = GPT_IMAGE_25_EDIT_ENDPOINTS[params.model];
|
|
253
|
-
const args = {
|
|
254
|
-
prompt: params.prompt,
|
|
255
|
-
output_format: "png"
|
|
256
|
-
};
|
|
257
|
-
if (editEndpoint) {
|
|
258
|
-
args.image_urls = [imageDataUri];
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
args.image_url = imageDataUri;
|
|
262
|
-
}
|
|
263
|
-
if (params.negativePrompt)
|
|
264
|
-
args.negative_prompt = params.negativePrompt;
|
|
265
|
-
if (params.guidanceScale != null)
|
|
266
|
-
args.guidance_scale = params.guidanceScale;
|
|
267
|
-
if (params.numInferenceSteps != null)
|
|
268
|
-
args.num_inference_steps = params.numInferenceSteps;
|
|
269
|
-
if (params.strength != null)
|
|
270
|
-
args.strength = params.strength;
|
|
271
|
-
if (params.targetWidth && params.targetHeight) {
|
|
272
|
-
const size = editEndpoint
|
|
273
|
-
? snapToGptImage2Size(params.targetWidth, params.targetHeight)
|
|
274
|
-
: [params.targetWidth, params.targetHeight];
|
|
275
|
-
if (size)
|
|
276
|
-
args.image_size = { width: size[0], height: size[1] };
|
|
277
|
-
}
|
|
278
|
-
if (params.seed != null && params.seed !== -1)
|
|
279
|
-
args.seed = params.seed;
|
|
280
|
-
if (params.quality)
|
|
281
|
-
args.quality = params.quality;
|
|
282
|
-
try {
|
|
283
|
-
this.totalRequests++;
|
|
284
|
-
const result = await falSubmit(this.apiKey, editEndpoint ?? params.model, args);
|
|
285
|
-
this.totalImages++;
|
|
286
|
-
const imageUrl = extractImageUrl(result);
|
|
287
|
-
return downloadBytes(imageUrl);
|
|
288
|
-
}
|
|
289
|
-
catch (e) {
|
|
290
|
-
const msg = formatValidationError(String(e));
|
|
291
|
-
throw new Error(`FAL image-to-image generation failed: ${msg}`);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
// -------------------------------------------------------------------------
|
|
295
|
-
// Text-to-Speech
|
|
296
|
-
// -------------------------------------------------------------------------
|
|
297
|
-
/**
|
|
298
|
-
* Generate audio from text using a FAL TTS endpoint.
|
|
299
|
-
* Returns the raw audio bytes.
|
|
300
|
-
*/
|
|
301
|
-
async textToSpeech(params) {
|
|
302
|
-
if (!params.text)
|
|
303
|
-
throw new Error("text must not be empty");
|
|
304
|
-
const args = { prompt: params.text };
|
|
305
|
-
if (params.numSteps != null)
|
|
306
|
-
args.num_steps = params.numSteps;
|
|
307
|
-
if (params.duration != null)
|
|
308
|
-
args.duration = params.duration;
|
|
309
|
-
if (params.cfgStrength != null)
|
|
310
|
-
args.cfg_strength = params.cfgStrength;
|
|
311
|
-
if (params.negativePrompt)
|
|
312
|
-
args.negative_prompt = params.negativePrompt;
|
|
313
|
-
if (params.seed != null && params.seed !== -1)
|
|
314
|
-
args.seed = params.seed;
|
|
315
|
-
try {
|
|
316
|
-
this.totalRequests++;
|
|
317
|
-
const result = await falSubmit(this.apiKey, params.model, args);
|
|
318
|
-
const audioField = result.audio;
|
|
319
|
-
if (!audioField?.url) {
|
|
320
|
-
throw new Error(`Unexpected FAL response format: ${JSON.stringify(result)}`);
|
|
321
|
-
}
|
|
322
|
-
return downloadBytes(audioField.url);
|
|
323
|
-
}
|
|
324
|
-
catch (e) {
|
|
325
|
-
const msg = formatValidationError(String(e));
|
|
326
|
-
throw new Error(`FAL text-to-speech generation failed: ${msg}`);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
// -------------------------------------------------------------------------
|
|
330
|
-
// Model catalogue
|
|
331
|
-
// -------------------------------------------------------------------------
|
|
332
|
-
/** Return all available FAL AI image models. */
|
|
333
|
-
getAvailableImageModels() {
|
|
334
|
-
return FAL_IMAGE_MODELS;
|
|
335
|
-
}
|
|
336
|
-
// -------------------------------------------------------------------------
|
|
337
|
-
// Low-level helpers
|
|
338
|
-
// -------------------------------------------------------------------------
|
|
339
|
-
/**
|
|
340
|
-
* Upload bytes to FAL CDN and return the CDN URL.
|
|
341
|
-
* Thin wrapper around falUpload for callers that already have a FalProvider.
|
|
342
|
-
*/
|
|
343
|
-
async upload(data, contentType) {
|
|
344
|
-
return falUpload(this.apiKey, data, contentType);
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Convert an image ref ({data, uri}) to a data: URI or FAL CDN URL
|
|
348
|
-
* suitable for passing as image_url in API arguments.
|
|
349
|
-
*/
|
|
350
|
-
async imageRefToUrl(imageRef) {
|
|
351
|
-
return imageToDataUrl(imageRef);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
// ---------------------------------------------------------------------------
|
|
355
|
-
// Private helpers
|
|
356
|
-
// ---------------------------------------------------------------------------
|
|
357
|
-
function extractImageUrl(result) {
|
|
358
|
-
const images = result.images;
|
|
359
|
-
if (images && images.length > 0) {
|
|
360
|
-
const url = images[0].url;
|
|
361
|
-
if (url)
|
|
362
|
-
return url;
|
|
363
|
-
}
|
|
364
|
-
const image = result.image;
|
|
365
|
-
if (image?.url)
|
|
366
|
-
return image.url;
|
|
367
|
-
throw new Error(`Unexpected FAL response format: ${JSON.stringify(result)}`);
|
|
368
|
-
}
|
|
369
|
-
async function downloadBytes(url) {
|
|
370
|
-
const res = await fetch(url);
|
|
371
|
-
if (!res.ok)
|
|
372
|
-
throw new Error(`Failed to download FAL result: ${res.status}`);
|
|
373
|
-
const buf = await res.arrayBuffer();
|
|
374
|
-
return new Uint8Array(buf);
|
|
375
|
-
}
|
|
376
|
-
//# sourceMappingURL=fal-provider.js.map
|
package/dist/fal-provider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fal-provider.js","sourceRoot":"","sources":["../src/fal-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAmB3D,MAAM,2BAA2B,GAAqC;IACpE,0CAA0C,EAAE,iCAAiC;IAC7E,6CAA6C,EAC3C,oCAAoC;IACtC,iCAAiC,EAAE,iCAAiC;IACpE,oCAAoC,EAAE,oCAAoC;CAC3E,CAAC;AAEF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,gBAAgB;IAChB,EAAE,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,YAAY,EAAE;IAC/C,EAAE,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,YAAY,EAAE;IAC/C,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE;IACvC,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE;IACnD,EAAE,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE;IACnD,EAAE,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,aAAa,EAAE;IACjD,EAAE,E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