|
1 | | -import type { ModelId } from "../types"; |
| 1 | +import { ModelId } from "../types"; |
| 2 | +import type { ProviderMapping } from "./types"; |
2 | 3 |
|
3 | 4 | export const FAL_AI_API_BASE_URL = "https://fal.run"; |
4 | 5 |
|
5 | 6 | type FalAiId = string; |
6 | 7 |
|
7 | | -/** |
8 | | - * Mapping from HF model ID -> fal.ai app id |
9 | | - */ |
10 | | -export const FAL_AI_MODEL_IDS: Record<ModelId, FalAiId> = { |
11 | | - /** text-to-image */ |
12 | | - "black-forest-labs/FLUX.1-schnell": "fal-ai/flux/schnell", |
13 | | - "black-forest-labs/FLUX.1-dev": "fal-ai/flux/dev", |
14 | | - "black-forest-labs/FLUX.1-Depth-dev": "fal-ai/flux-lora-depth", |
15 | | - "black-forest-labs/FLUX.1-Canny-dev": "fal-ai/flux-lora-canny", |
16 | | - "black-forest-labs/FLUX.1-Redux-dev": "fal-ai/flux/dev/redux", |
17 | | - "playgroundai/playground-v2.5-1024px-aesthetic": "fal-ai/playground-v25", |
18 | | - "ByteDance/SDXL-Lightning": "fal-ai/lightning-models", |
19 | | - "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS": "fal-ai/pixart-sigma", |
20 | | - "stabilityai/stable-diffusion-3-medium": "fal-ai/stable-diffusion-v3-medium", |
21 | | - "Warlord-K/Sana-1024": "fal-ai/sana", |
22 | | - "fal/AuraFlow-v0.2": "fal-ai/aura-flow", |
23 | | - "stabilityai/stable-diffusion-3.5-large": "fal-ai/stable-diffusion-v35-large", |
24 | | - "yresearch/Switti": "fal-ai/switti", |
25 | | - "guozinan/PuLID": "fal-ai/flux-pulid", |
26 | | - "lllyasviel/ic-light": "fal-ai/iclight-v2", |
27 | | - "stabilityai/stable-diffusion-xl-base-1.0": "fal-ai/lora", |
28 | | - "Kwai-Kolors/Kolors": "fal-ai/kolors", |
29 | | - |
30 | | - /** image-to-image */ |
31 | | - "Yuanshi/OminiControl": "fal-ai/flux-subject", |
32 | | - "fal/AuraSR-v2": "fal-ai/aura-sr", |
33 | | - "franciszzj/Leffa": "fal-ai/leffa", |
34 | | - "ai-forever/Real-ESRGAN": "fal-ai/esrgan", |
35 | | - |
36 | | - /** image-segmentation */ |
37 | | - "briaai/RMBG-2.0": "fal-ai/bria/background/remove", |
38 | | - "ZhengPeng7/BiRefNet": "fal-ai/birefnet/v2", |
39 | | - |
40 | | - /** text-to-video */ |
41 | | - "genmo/mochi-1-preview": "fal-ai/mochi-v1", |
42 | | - "THUDM/CogVideoX-5b": "fal-ai/cogvideox-5b", |
43 | | - "Lightricks/LTX-Video": "fal-ai/ltx-video", |
44 | | - "tencent/HunyuanVideo": "fal-ai/hunyuan-video", |
45 | | - "wileewang/TransPixar": "fal-ai/transpixar", |
46 | | - |
47 | | - /** image-to-video */ |
48 | | - "stabilityai/stable-video-1.0": "fal-ai/stable-video", |
49 | | - "KwaiVGI/LivePortrait": "fal-ai/live-portrait", |
50 | | - |
51 | | - /** text-to-audio */ |
52 | | - "hkchengrex/MMAudio": "fal-ai/mmaudio-v2", |
53 | | - "stabilityai/stable-audio-open-1.0": "fal-ai/stable-audio", |
54 | | - |
55 | | - /** text-to-speech */ |
56 | | - "SWivid/F5-TTS": "fal-ai/f5-tts", |
57 | | - |
58 | | - /** image-text-to-text */ |
59 | | - "vikhyatk/moondream-next": "fal-ai/moondream-next", |
60 | | - "microsoft/Florence-2-large": "fal-ai/florence-2-large/caption", |
61 | | - "ByteDance/Sa2VA-8B": "fal-ai/sa2va/8b/image/playground", |
62 | | - |
63 | | - /** mask-generation */ |
64 | | - "facebook/sam2-hiera-large": "fal-ai/sam2", |
65 | | - |
66 | | - /** image-to-3d */ |
67 | | - "JeffreyXiang/TRELLIS-image-large": "fal-ai/trellis", |
68 | | - |
69 | | - /** depth-estimation */ |
70 | | - "Intel/dpt-hybrid-midas": "fal-ai/imageutils/depth", |
71 | | - "prs-eth/marigold-depth-v1-0": "fal-ai/imageutils/marigold-depth", |
72 | | - "depth-anything/Depth-Anything-V2-Large": "fal-ai/image-preprocessors/depth-anything/v2", |
73 | | - |
74 | | - /** automatic-speech-recognition */ |
75 | | - "openai/whisper-large-v3": "fal-ai/whisper", |
| 8 | +export const FAL_AI_SUPPORTED_MODEL_IDS: ProviderMapping<FalAiId> = { |
| 9 | + "text-to-image": { |
| 10 | + "black-forest-labs/FLUX.1-schnell": "fal-ai/flux/schnell", |
| 11 | + "black-forest-labs/FLUX.1-dev": "fal-ai/flux/dev", |
| 12 | + "black-forest-labs/FLUX.1-Depth-dev": "fal-ai/flux-lora-depth", |
| 13 | + "black-forest-labs/FLUX.1-Canny-dev": "fal-ai/flux-lora-canny", |
| 14 | + "black-forest-labs/FLUX.1-Fill-dev": "fal-ai/flux-lora-fill", |
| 15 | + "black-forest-labs/FLUX.1-Redux-dev": "fal-ai/flux/dev/redux", |
| 16 | + "playgroundai/playground-v2.5-1024px-aesthetic": "fal-ai/playground-v25", |
| 17 | + "ByteDance/SDXL-Lightning": "fal-ai/lightning-models", |
| 18 | + "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS": "fal-ai/pixart-sigma", |
| 19 | + "stabilityai/stable-diffusion-3-medium": "fal-ai/stable-diffusion-v3-medium", |
| 20 | + "Warlord-K/Sana-1024": "fal-ai/sana", |
| 21 | + "fal/AuraFlow-v0.2": "fal-ai/aura-flow", |
| 22 | + "stabilityai/stable-diffusion-3.5-large": "fal-ai/stable-diffusion-v35-large", |
| 23 | + "yresearch/Switti": "fal-ai/switti", |
| 24 | + "guozinan/PuLID": "fal-ai/flux-pulid", |
| 25 | + "lllyasviel/ic-light": "fal-ai/iclight-v2", |
| 26 | + "stabilityai/stable-diffusion-xl-base-1.0": "fal-ai/lora", |
| 27 | + "Kwai-Kolors/Kolors": "fal-ai/kolors" |
| 28 | + }, |
| 29 | + "image-to-image": { |
| 30 | + "Yuanshi/OminiControl": "fal-ai/flux-subject", |
| 31 | + "fal/AuraSR-v2": "fal-ai/aura-sr", |
| 32 | + "franciszzj/Leffa": "fal-ai/leffa", |
| 33 | + "ai-forever/Real-ESRGAN": "fal-ai/esrgan" |
| 34 | + }, |
| 35 | + "image-segmentation": { |
| 36 | + "briaai/RMBG-2.0": "fal-ai/bria/background/remove", |
| 37 | + "ZhengPeng7/BiRefNet": "fal-ai/birefnet/v2" |
| 38 | + }, |
| 39 | + "text-to-video": { |
| 40 | + "genmo/mochi-1-preview": "fal-ai/mochi-v1", |
| 41 | + "THUDM/CogVideoX-5b": "fal-ai/cogvideox-5b", |
| 42 | + "Lightricks/LTX-Video": "fal-ai/ltx-video", |
| 43 | + "tencent/HunyuanVideo": "fal-ai/hunyuan-video", |
| 44 | + "wileewang/TransPixar": "fal-ai/transpixar" |
| 45 | + }, |
| 46 | + "image-to-video": { |
| 47 | + "stabilityai/stable-video-1.0": "fal-ai/stable-video", |
| 48 | + "KwaiVGI/LivePortrait": "fal-ai/live-portrait" |
| 49 | + }, |
| 50 | + "text-to-audio": { |
| 51 | + "hkchengrex/MMAudio": "fal-ai/mmaudio-v2", |
| 52 | + "stabilityai/stable-audio-open-1.0": "fal-ai/stable-audio" |
| 53 | + }, |
| 54 | + "text-to-speech": { |
| 55 | + "SWivid/F5-TTS": "fal-ai/f5-tts" |
| 56 | + }, |
| 57 | + "image-text-to-text": { |
| 58 | + "vikhyatk/moondream-next": "fal-ai/moondream-next", |
| 59 | + "microsoft/Florence-2-large": "fal-ai/florence-2-large/caption", |
| 60 | + "ByteDance/Sa2VA-8B": "fal-ai/sa2va/8b/image/playground" |
| 61 | + }, |
| 62 | + "mask-generation": { |
| 63 | + "facebook/sam2-hiera-large": "fal-ai/sam2" |
| 64 | + }, |
| 65 | + "image-to-3d": { |
| 66 | + "JeffreyXiang/TRELLIS-image-large": "fal-ai/trellis" |
| 67 | + }, |
| 68 | + "depth-estimation": { |
| 69 | + "Intel/dpt-hybrid-midas": "fal-ai/imageutils/depth", |
| 70 | + "prs-eth/marigold-depth-v1-0": "fal-ai/imageutils/marigold-depth", |
| 71 | + "depth-anything/Depth-Anything-V2-Large": "fal-ai/image-preprocessors/depth-anything/v2" |
| 72 | + }, |
| 73 | + "automatic-speech-recognition": { |
| 74 | + "openai/whisper-large-v3": "fal-ai/whisper" |
| 75 | + } |
76 | 76 | }; |
0 commit comments