Skip to content

Backend fal v3#394

Draft
emranemran wants to merge 31 commits intomainfrom
backend-fal-v3
Draft

Backend fal v3#394
emranemran wants to merge 31 commits intomainfrom
backend-fal-v3

Conversation

@emranemran
Copy link

No description provided.

mjh1 and others added 30 commits January 27, 2026 16:35
Fal in and out streams flow through scope backend frame processor
When connected to fal backend, model status and download requests
are now proxied to fal instead of running locally. This prevents
unnecessary local downloads when GPU inference runs on fal cloud.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: emranemran <emran.mah@gmail.com>
Windows cp1252 console encoding cannot display Unicode emojis,
causing logging errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: emranemran <emran.mah@gmail.com>
The triggerLoad function was creating two parallel polling loops:
1. startPolling() - explicit polling loop
2. checkComplete() in loadPromise - another polling loop

This caused duplicate API requests every poll interval. Removed the
redundant startPolling call and function since loadPromise already
handles polling until the pipeline is loaded or errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: emranemran <emran.mah@gmail.com>
VP8/VP9 decoders need a keyframe (I-frame) before they can decode
P-frames. After WebRTC reconnection, the first frames may be P-frames,
causing decode errors until a keyframe naturally arrives.

This fix sends a PLI (Picture Loss Indication) immediately when a
video track is received from fal.ai, requesting the remote end to
send a keyframe proactively.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: emranemran <emran.mah@gmail.com>
Skip GPU dependencies on macOS by adding sys_platform != 'darwin'
markers to pyproject.toml. On Mac, the server starts in cloud-only
mode where all processing happens on fal.ai.

Simplified approach (4 files instead of 20):
- pyproject.toml: Platform markers to exclude GPU deps on macOS
- registry.py: Skip all pipeline registration on macOS
- pipeline_manager.py: Conditional torch import
- app.py: Skip CUDA check on macOS

The frontend gets pipeline list from fal.ai in cloud mode, so local
pipeline registration is not needed on macOS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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