diff --git a/packages/inference/src/providers/fal-ai.ts b/packages/inference/src/providers/fal-ai.ts index d1c1d2962..a4c550e22 100644 --- a/packages/inference/src/providers/fal-ai.ts +++ b/packages/inference/src/providers/fal-ai.ts @@ -15,6 +15,8 @@ export const FAL_AI_SUPPORTED_MODEL_IDS: ProviderMapping = { "Warlord-K/Sana-1024": "fal-ai/sana", "fal/AuraFlow-v0.2": "fal-ai/aura-flow", "stabilityai/stable-diffusion-3.5-large": "fal-ai/stable-diffusion-v35-large", + "stabilityai/stable-diffusion-3.5-large-turbo": "fal-ai/stable-diffusion-v35-large/turbo", + "stabilityai/stable-diffusion-3.5-medium": "fal-ai/stable-diffusion-v35-medium", "Kwai-Kolors/Kolors": "fal-ai/kolors", }, "automatic-speech-recognition": { @@ -23,5 +25,7 @@ export const FAL_AI_SUPPORTED_MODEL_IDS: ProviderMapping = { "text-to-video": { "genmo/mochi-1-preview": "fal-ai/mochi-v1", "tencent/HunyuanVideo": "fal-ai/hunyuan-video", + "THUDM/CogVideoX-5b": "fal-ai/cogvideox-5b", + "Lightricks/LTX-Video": "fal-ai/ltx-video", }, }; diff --git a/packages/inference/test/HfInference.spec.ts b/packages/inference/test/HfInference.spec.ts index 88b7c2489..56d7d1dc9 100644 --- a/packages/inference/test/HfInference.spec.ts +++ b/packages/inference/test/HfInference.spec.ts @@ -816,7 +816,7 @@ describe.concurrent("HfInference", () => { it("textToVideo - HunyuanVideo", async () => { const res = await textToVideo({ - model: "genmo/mochi-1-preview", + model: "tencent/HunyuanVideo", inputs: "A running dog", parameters: { seed: 176, @@ -829,6 +829,34 @@ describe.concurrent("HfInference", () => { }); expect(res).toBeInstanceOf(Blob); }); + + it("textToVideo - CogVideoX-5b", async () => { + const res = await textToVideo({ + model: "THUDM/CogVideoX-5b", + inputs: "A running dog", + parameters: { + seed: 176, + num_frames: 2, + }, + provider: "fal-ai", + accessToken: env.HF_FAL_KEY, + }); + expect(res).toBeInstanceOf(Blob); + }); + + it("textToVideo - LTX-Video", async () => { + const res = await textToVideo({ + model: "Lightricks/LTX-Video", + inputs: "A running dog", + parameters: { + seed: 176, + num_inference_steps: 2, + }, + provider: "fal-ai", + accessToken: env.HF_FAL_KEY, + }); + expect(res).toBeInstanceOf(Blob); + }); }, TIMEOUT ); diff --git a/packages/inference/test/tapes.json b/packages/inference/test/tapes.json index 208c7ba18..23fb3fd95 100644 --- a/packages/inference/test/tapes.json +++ b/packages/inference/test/tapes.json @@ -5573,5 +5573,208 @@ "server": "UploadServer" } } + }, + "4344ffbeb1704c351d762d39a62cd31bb54ab341ae6019362b31e48e43eef5b3": { + "url": "https://fal.run/fal-ai/stable-diffusion-v35-large/turbo", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "body": "{\"response_format\":\"base64\",\"prompt\":\"Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth.\"}" + }, + "response": { + "body": "{\"images\":[{\"url\":\"https://fal.media/files/rabbit/tmqo7tjWZYVJjeNwFyVHQ.jpeg\",\"width\":1024,\"height\":768,\"content_type\":\"image/jpeg\"}],\"timings\":{\"inference\":0.8987537469947711},\"seed\":2647244993343975400,\"has_nsfw_concepts\":[false],\"prompt\":\"Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth.\"}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } + }, + "3613cf546d2ea01fe1fb49de890985c07a1eccc387bc93d16e15943ba844ff33": { + "url": "https://fal.run/fal-ai/stable-diffusion-v35-medium", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "body": "{\"response_format\":\"base64\",\"prompt\":\"Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth.\"}" + }, + "response": { + "body": "{\"images\":[{\"url\":\"https://fal.media/files/panda/G9jh2Jr2AlDQouQsyQLgt.jpeg\",\"width\":1024,\"height\":768,\"content_type\":\"image/jpeg\"}],\"timings\":{\"inference\":1.5137374009937048},\"seed\":15169059293161724000,\"has_nsfw_concepts\":[false],\"prompt\":\"Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth.\"}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } + }, + "69404050795988722d8018d8868c73861e87c1a689d825af60d45e44500c38c6": { + "url": "https://fal.media/files/panda/G9jh2Jr2AlDQouQsyQLgt.jpeg", + "init": {}, + "response": { + "body": "", + "status": 200, + "statusText": "OK", + "headers": { + "access-control-allow-headers": "*", + "access-control-allow-methods": "*", + "access-control-allow-origin": "*", + "access-control-max-age": "86400", + "cf-ray": "908ff35448182a0e-CDG", + "connection": "keep-alive", + "content-type": "image/jpeg", + "server": "cloudflare", + "vary": "Accept-Encoding" + } + } + }, + "4ee8a4fd0cd802f24dcc484bcec15bf232e5d3cc88268b70c8e4969b452afe67": { + "url": "https://fal.media/files/rabbit/tmqo7tjWZYVJjeNwFyVHQ.jpeg", + "init": {}, + "response": { + "body": "", + "status": 200, + "statusText": "OK", + "headers": { + "access-control-allow-headers": "*", + "access-control-allow-methods": "*", + "access-control-allow-origin": "*", + "access-control-max-age": "86400", + "cf-ray": "908ff3512eaa3ccb-CDG", + "connection": "keep-alive", + "content-type": "image/jpeg", + "server": "cloudflare", + "vary": "Accept-Encoding" + } + } + }, + "8e5cd052a79581ad4c5002962c93746ffb9587cff4c55ae8b33f85e0bb6a2fdd": { + "url": "https://fal.run/fal-ai/ltx-video", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "body": "{\"seed\":176,\"num_inference_steps\":2,\"prompt\":\"A running dog\"}" + }, + "response": { + "body": "{\"video\":{\"url\":\"https://v3.fal.media/files/kangaroo/IZn0hEJxd5OoapfNX6rSq_tmpfperp_j6.mp4\",\"content_type\":\"application/octet-stream\",\"file_name\":\"tmpfperp_j6.mp4\",\"file_size\":9669497},\"seed\":176}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } + }, + "4788fdd7d1d4311ec83fa1208de829b16e6b044607ecb4a7838eebc72114a921": { + "url": "https://v3.fal.media/files/kangaroo/IZn0hEJxd5OoapfNX6rSq_tmpfperp_j6.mp4", + "init": {}, + "response": { + "body": "", + "status": 200, + "statusText": "OK", + "headers": { + "accept-ranges": "bytes", + "access-control-allow-headers": "*", + "access-control-allow-methods": "*", + "access-control-allow-origin": "*", + "access-control-max-age": "86400", + "cf-ray": "908ff376b8aff120-CDG", + "connection": "keep-alive", + "content-type": "application/octet-stream", + "server": "cloudflare", + "vary": "Accept-Encoding" + } + } + }, + "e4c01272acc7b4b098731e451e96b8d0b087d4c72543f1a8b97cdf1834aabe27": { + "url": "https://fal.run/fal-ai/cogvideox-5b", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "body": "{\"seed\":176,\"num_frames\":2,\"prompt\":\"A running dog\"}" + }, + "response": { + "body": "{\"video\":{\"url\":\"https://v3.fal.media/files/penguin/YvilKeP7JL45cNmlJW8hP_tmp.mp4\",\"content_type\":\"application/octet-stream\",\"file_name\":\"tmp.mp4\",\"file_size\":4156439},\"timings\":{\"inference\":58.29187552398071},\"seed\":176,\"prompt\":\"A running dog\"}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } + }, + "df62590fb03c7398302c98c0b5d5d1a7d75f77941a9b92be1682b94111e7344a": { + "url": "https://v3.fal.media/files/penguin/YvilKeP7JL45cNmlJW8hP_tmp.mp4", + "init": {}, + "response": { + "body": "", + "status": 200, + "statusText": "OK", + "headers": { + "accept-ranges": "bytes", + "access-control-allow-headers": "*", + "access-control-allow-methods": "*", + "access-control-allow-origin": "*", + "access-control-max-age": "86400", + "cf-ray": "908ff4b64b0cd156-CDG", + "connection": "keep-alive", + "content-type": "application/octet-stream", + "server": "cloudflare", + "vary": "Accept-Encoding" + } + } + }, + "0abfddc21aaed8b0b716c10a867e23fd10a779863512f2bcf10d2d97b47e8c31": { + "url": "https://fal.run/fal-ai/hunyuan-video", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST", + "body": "{\"seed\":176,\"num_inference_steps\":2,\"num_frames\":85,\"resolution\":\"480p\",\"prompt\":\"A running dog\"}" + }, + "response": { + "body": "{\"video\":{\"url\":\"https://v3.fal.media/files/rabbit/L6wJQvUds5HsTUGLZe9Bp_video-1738056610.mp4\",\"content_type\":\"application/octet-stream\",\"file_name\":\"video-1738056610.mp4\",\"file_size\":216048},\"seed\":176}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } + }, + "b1b02865c69c8ae30637b72442f9c8f21d15f6d2af0081e5de5d59fbfd3d2d41": { + "url": "https://v3.fal.media/files/rabbit/L6wJQvUds5HsTUGLZe9Bp_video-1738056610.mp4", + "init": {}, + "response": { + "body": "", + "status": 200, + "statusText": "OK", + "headers": { + "accept-ranges": "bytes", + "access-control-allow-headers": "*", + "access-control-allow-methods": "*", + "access-control-allow-origin": "*", + "access-control-max-age": "86400", + "cf-ray": "908ff665ca2d2a03-CDG", + "connection": "keep-alive", + "content-type": "application/octet-stream", + "server": "cloudflare", + "vary": "Accept-Encoding" + } + } } } \ No newline at end of file