Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The rest is written by hand.
| extensions.py | /api/extensions | 9 |
| focus_motion.py | /api/focus-motion | 1 |
| fonts.py | /api/assets | 1 |
| formbridge.py | /api/formbridge | 5 |
| generate.py | /api/generate | 6 |
| generative.py | /api/generative | 5 |
| instagram.py | /api/connect/instagram | 4 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The module list and the engine commands are generated from `frontend/src` by
- `ui/clip-visuals.ts`
- `ui/cloud.ts`
- `ui/color-section.ts`
- `ui/comfyui-page.ts`
- `ui/compact.ts`
- `ui/creator-panel.ts`
- `ui/device-inspector.ts`
Expand Down
35 changes: 35 additions & 0 deletions .docs/wiki/Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,41 @@ the official weights by a published, reproducible recipe and pinned to the
converter's stated SHA-256. The upscaler tiles the frame and runs through the
same provider ordering as everything else.

## 4a. Your own ComfyUI, through the FormBridge pack

Used by: **Studio, ComfyUI**. formcut downloads no model for this: it sends a
clip or picture from the media bin to a ComfyUI server you run (on this
computer or another one), where the Comfy-FormBridge-Suite pack runs one of its
workflows (erase, add, relight, upscale and caption for pictures; clean, carry
an edit, animate, matte and upscale for clips), and the result comes back into
the media bin. Each model a workflow needs is fetched by you into ComfyUI's
model folders; the page lists any that are missing and where each one goes.

1. Install the pack in ComfyUI's `custom_nodes` folder and its requirements
with ComfyUI's own Python, then restart ComfyUI (0.46.0 or newer).
2. In Studio, ComfyUI, give the address (default `http://127.0.0.1:8188`) and
press **Check**.
3. Pick a workflow, the clip or picture for each of its media fields, and
**Run in ComfyUI**. The job shows in the footer with Cancel.

- Frame results are joined into an H.264 movie at the result's frame rate. A
matte comes back as its own clip. The `layer` and `preview` outputs are left
on the server.
- A caption comes back as text on the page, not as a media item.
- The address is kept in `formbridge.json` in the data folder. formcut talks to
that address only, with no system proxy and no redirect, and deletes what it
uploaded once the job ends.
- Workflows whose required fields are points, keyframes or a size are listed
but cannot be run from formcut yet.

```
GET /api/formbridge the address
PUT /api/formbridge {"base"}
GET /api/formbridge/handshake what the pack at that address answers
GET /api/formbridge/workflows the pack's workflows, each with "ready" and "missing"
POST /api/formbridge/run {"workflow", "media": {slot: media id}, "slots", "reuse"}: a job whose result is {"media", "caption"}
```

---

## 5. Not yet wired, but the obvious next additions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</p>

<p align="center">
<img alt="version v2.22.0" src="https://img.shields.io/badge/version-v2.22.0-eef0f4?style=flat-square">
<img alt="version v2.23.0" src="https://img.shields.io/badge/version-v2.23.0-eef0f4?style=flat-square">
<img alt="TypeScript and Vite" src="https://img.shields.io/badge/TypeScript-Vite-3178c6?style=flat-square&logo=typescript&logoColor=white">
<img alt="Python FastAPI" src="https://img.shields.io/badge/Python-FastAPI-3776ab?style=flat-square">
<img alt="macOS, Windows, Linux" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-native-2f7bf5?style=flat-square">
Expand Down
12 changes: 12 additions & 0 deletions backend/HASHOUT_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Reasoning behind engine changes, newest first.

## 2.23.0 · ComfyUI through the FormBridge pack (`app/formbridge.py` new; `main.py` import and include)

- **Why.** The Comfy-FormBridge-Suite README named formcut as one of its apps, and formcut had no client. The pack runs in the person's own ComfyUI and answers contract 1 under `/formbridge/v1`; this module is written from that contract.
- **Any address.** Unlike the voice app, a ComfyUI server is often another machine with the graphics card, so `normalize_base` takes any `http` or `https` host and port, a path prefix, and refuses a user, password, query or fragment. The client still has `trust_env=False` and `follow_redirects=False`, and calls only the pack's routes.
- **Headers.** Every call carries `X-FormBridge-Contract: 1` and `X-FormBridge-Client: formcut/<APP_VERSION>`. `APP_VERSION` is read from `main` inside `_headers`, since `main` imports this module.
- **Errors.** A 404 or 405 with no pack error body is "the pack is not installed" with what to do. A pack error passes its own message on, with its status when it is 400, 404, 409, 413 or 422, else 502. Nothing answering is a 502 that names the address.
- **Workflows.** The list is the pack's, each entry with `ready` and `missing` (model files with the folder to put them in, then packs, then nodes), read through six readiness calls at once.
- **Run.** The route checks each media slot against the workflow's slot types before a job starts: a picture for `image` and `mask`, a clip for `movie` and `video`, either for `media`, and `frames` refused for a clip. The `comfyui` job uploads each item (`still` or `movie`), queues the job with this engine's client id, polls every 1.5 s, reports 0.1 to 0.85 from the pack's progress, and on Cancel asks the pack to cancel too. The uploaded inputs are deleted when it ends, whatever the outcome.
- **Landing.** `text` outputs become the caption. A single picture is ingested as it is. Frames, mattes and masks with more than one file are renamed in order and joined by ffmpeg into H.264 at the output's fps (else the item's, else 24), CRF 12, padded to even sizes. `layer` and `preview` outputs stay on the server, since formcut has no composite that rebuilds from a layer and the preview duplicates the frames.
- **Not done.** No MCP tool; points, keyframes and size slots are not sent (the page says so for a workflow that requires one); no sign-in for a ComfyUI behind a proxy.
- **Seen.** Against ComfyUI 0.46.0 on CPU with the pack: the handshake, 15 workflows with two ready, `still.erase`'s missing files with their folders, the self test on a picture (a 128 by 96 picture back), on a 9-frame clip (a 0.375 s, 24 fps clip back) and the matte self test on the clip (the frames and the matte as two clips). A slot name the workflow lacks and a clip in a picture slot answer 400 before any job.

## 2.22.0 · a voice app on this computer speaks for the Studio (`app/voice_app.py` new; `main.py` include)

- **Why.** Issue 43, second part. FormMorpheus #31 asked for narration in a voice cloned in a separate free app (qwentts.cpp, AudioCpp Desktop, VoiceStudio), each of which answers the OpenAI-compatible speech API on this computer, by default at `http://127.0.0.1:8080`. FormCut clones a voice itself with Pocket TTS and Chatterbox, but had no way to use an outside app. The pattern is FormMorpheus's `services/voice_remote.py` (Apache-2.0, same owner), written again in this engine's idiom: `httpx` as `tts.py` uses it, `durable.write_json` for the settings, and a job that ingests the sound as `local_speech.py`'s jobs do.
Expand Down
Loading
Loading