Skip to content

Add fal.ai Provider Support#75

Closed
rbur0425 wants to merge 2 commits intoAnil-matcha:mainfrom
rbur0425:feat/fal-ai-support
Closed

Add fal.ai Provider Support#75
rbur0425 wants to merge 2 commits intoAnil-matcha:mainfrom
rbur0425:feat/fal-ai-support

Conversation

@rbur0425
Copy link
Copy Markdown

Add fal.ai Provider Support with Expanded Model Catalog

This PR adds full fal.ai integration as a second generation provider alongside the existing
muapi.ai backend, with a shared model picker UI and a significantly expanded model catalog.


What's new

fal.ai API client (packages/studio/src/fal.js)

  • Submit/poll generation loop against queue.fal.run
  • File upload via fal storage
  • Balance fetching
  • Handles both image and video generation, lip sync, and image-to-image

Unified studio client (packages/studio/src/studioClient.js)

  • Single generate() entry point that routes to fal or muapi based on the model's provider field
  • Aspect ratio → fal image_size conversion
  • fal LoRA payload mapping

Shared ModelDropdown component (packages/studio/src/components/ModelDropdown.jsx)

  • Replaces per-studio inline dropdowns across Image, Video, Lip Sync, and Cinema studios
  • Grouped by provider (fal.ai / muapi.ai) with count badges
  • Live search across 150+ models by name or ID
  • Recently used models tracked in localStorage

Expanded model catalog (packages/studio/src/models.js)

  • 34 fal.ai text-to-image models added, including:
    • Nano Banana / Nano Banana Pro / Nano Banana 2 (Gemini 2.5 Flash / 3 Pro / 3.1 Flash)
    • Imagen 4 / Fast / Ultra
    • FLUX1.1 [pro] Ultra, FLUX.1 Kontext [pro/max]
    • Flux 2 [dev / Turbo / Flash / Max / Pro]
    • Ideogram V2 / V3, Recraft V4 / Pro
    • GPT-Image 1.5, Qwen Image 2, Seedream v4 / v4.5
    • Kling Image v3, MiniMax Image, Luma Photon, SD 3.5 Large, HiDream I1, Z-Image Turbo / Base
  • 9 fal.ai image-to-image models (schema-verified to accept image input)
  • fal LoRA represented as a single real fal-ai/flux-lora entry with runtime loras payload, not
    fabricated catalog variants

API key management

  • ApiKeyModal and StandaloneShell updated to accept and store a separate fal_key alongside
    muapi_key

Bug fixes

  • LipSync Studio: missing dropdownRef declaration caused a runtime crash when opening the model
    picker — fixed
  • Cinema Studio: history card click now opens fullscreen preview; restore-settings is a
    separate explicit action

New components

  • GeneratingState — shared loading state UI used across studios
  • ProviderBalance — displays live balance for the active provider

- Add fal.js client with submit/poll pattern for fal.ai API
- Add unified studioClient routing requests to fal or muapi by provider
- Add shared ModelDropdown with search, grouping, and recently-used tracking
- Add GeneratingState and ProviderBalance components
- Expand model catalog: 34 fal.ai t2i models, 9 fal.ai i2i models
  - Nano Banana family (Gemini 2.5 Flash, 3 Pro, 3.1 Flash)
  - Imagen 4 / Fast / Ultra, FLUX1.1 [pro] Ultra, Kontext [pro/max]
  - Flux 2 [dev/turbo/flash/max/pro], Ideogram V2/V3, Recraft V4/Pro
  - GPT-Image 1.5, Qwen Image 2, Seedream v4/v4.5, Kling Image v3
  - MiniMax Image, Luma Photon, SD 3.5 Large, HiDream I1, Z-Image
- Update all four studios (Image, Video, Lip Sync, Cinema) to use
  shared model picker and support dual-provider generation
- Add fal.ai API key field to ApiKeyModal and StandaloneShell
- Fix Cinema Studio: fullscreen preview + separate restore-settings action
- Fix LipSync Studio: dropdown ref lifecycle crash
@rbur0425
Copy link
Copy Markdown
Author

@Anil-matcha why did you close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants