diff --git a/.agents/skills/formmorpheus/SKILL.md b/.agents/skills/formmorpheus/SKILL.md index a9870fd..d3e1aa9 100644 --- a/.agents/skills/formmorpheus/SKILL.md +++ b/.agents/skills/formmorpheus/SKILL.md @@ -1,6 +1,6 @@ --- name: formmorpheus -description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, list_commands, run_command), the window key, the dock, or ios/project.yml." +description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, comfy_status, comfy_workflows, comfy_job, comfy_generate, list_commands, run_command), the window key, the dock, or ios/project.yml." license: Apache-2.0 metadata: author: nodemode-ai diff --git a/.agents/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md b/.agents/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md index a4d2113..a877863 100644 --- a/.agents/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md +++ b/.agents/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md @@ -18,9 +18,9 @@ Each tool's description starts with its class, and its annotations say it too (` | Class | Tools | What happens | | --- | --- | --- | -| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands` | runs at once; refused only when the person blocked agents | +| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands` | runs at once; refused only when the person blocked agents | | Changes the library | `manage_movie`, and `run_command` for a command of that class | runs when the person allowed outside agents; otherwise asks in the window (deny, once, always), and with no window open it is refused | -| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" | +| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" | The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing choice (ask, allowed, blocked) is `backend/app/services/agent_access.py`. An agent tab the person opened in the app's own dock carries an in-app token and is not asked for library changes; it is still asked before an export or an import. @@ -34,7 +34,8 @@ The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing 6. `list_characters {query?}` reads the Characters library (one `.fmo` per character in the data folder's `Characters` folder). `add_character {character, movie?, at?}` asks first, then the window opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead, and saves the movie; the answer gives `content`, `movie` and `saved`. 7. `list_voices {engine?}` reads which voice engines are ready (`builtin`, `local`, `online`) and their voices. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` asks first, then the window speaks the text, places the sound on the Timeline at `at` or the Playhead, and saves the movie. See `sub-skills/ai-voice`. 8. `list_subtitles {movie}` reads the movie's subtitles: whether the video shows them, the look, and each line in seconds and frames. `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` asks first, then the window changes the subtitles of the open movie (or `movie`, which it opens) and saves. See `sub-skills/subtitles`. -9. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one. +9. `comfy_status` reads the person's Comfy server (address, reachable, generation pack installed and recent enough, memory profile, device, whether a key is stored; never the key). `comfy_workflows` lists the workflows with their slots and whether each is ready. `comfy_generate {mode, prompt?, seed?, slots?, movie?}` asks first, then the window sends the blocks selected on its Timeline to Comfy (modes `fluid`, `animate`, `erase`, `add`, `relight`, `matte`, `upscale`), waits for the job, places the results on new tracks at the source's start and saves; the answer gives `blocks`, `movie` and `saved`. `comfy_job {job}` reads one job's state and result files. Check `comfy_status` and `comfy_workflows` first: the pack may be missing, and a workflow may lack models. +10. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one. ## Refusals @@ -42,7 +43,7 @@ Every refusal is one plain sentence. Pass it to the person as it is. - Outside agents are off: ask the person to open FormMorpheus and allow outside agents. - Blocked: the person turned agents off in Preferences; do not retry. -- Open FormMorpheus first: export, import, add_character, add_voice and set_subtitles need the window. +- Open FormMorpheus first: export, import, add_character, add_voice, set_subtitles and comfy_generate need the window. - The person said no: do not ask again at once; a repeat within `DECLINE_PAUSE` seconds is refused without asking. - Nobody answered within the wait: the question expired; ask the person to answer in the window. diff --git a/.claude/skills/formmorpheus/SKILL.md b/.claude/skills/formmorpheus/SKILL.md index a9870fd..d3e1aa9 100644 --- a/.claude/skills/formmorpheus/SKILL.md +++ b/.claude/skills/formmorpheus/SKILL.md @@ -1,6 +1,6 @@ --- name: formmorpheus -description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, list_commands, run_command), the window key, the dock, or ios/project.yml." +description: "Works with FormMorpheus, the Form family's animation studio (Vite interface in frontend/, FastAPI engine in backend/, Tauri 2 shell in src-tauri/, iPad build in ios/). Use when driving FormMorpheus through its MCP server (list, read, create, rename, duplicate, delete, restore, export, import), when reading or writing .fmo movie files or calling the engine's routes, when a question is about which exports the browser encodes or need the person's ffmpeg, when adding an AI voice (voice-over, text to speech, narration), when adding subtitles or captions, when building the iPad app, or when cutting a release (version sites, changelog, release commit). Trigger on FormMorpheus, formmorpheus, .fmo, ./formmorpheus, port 9494 or 5194, the formmorpheus MCP tools (get_context, list_movies, get_movie, get_movie_picture, manage_movie, export_movie, import_file, list_characters, add_character, list_voices, add_voice, list_subtitles, set_subtitles, comfy_status, comfy_workflows, comfy_job, comfy_generate, list_commands, run_command), the window key, the dock, or ios/project.yml." license: Apache-2.0 metadata: author: nodemode-ai diff --git a/.claude/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md b/.claude/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md index a4d2113..a877863 100644 --- a/.claude/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md +++ b/.claude/skills/formmorpheus/sub-skills/mcp-tools/SUB-SKILL.md @@ -18,9 +18,9 @@ Each tool's description starts with its class, and its annotations say it too (` | Class | Tools | What happens | | --- | --- | --- | -| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands` | runs at once; refused only when the person blocked agents | +| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands` | runs at once; refused only when the person blocked agents | | Changes the library | `manage_movie`, and `run_command` for a command of that class | runs when the person allowed outside agents; otherwise asks in the window (deny, once, always), and with no window open it is refused | -| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" | +| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | always asks the person in the window (deny, once), then the window carries it out; with no window open it is refused at once with "Open FormMorpheus first" | The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing choice (ask, allowed, blocked) is `backend/app/services/agent_access.py`. An agent tab the person opened in the app's own dock carries an in-app token and is not asked for library changes; it is still asked before an export or an import. @@ -34,7 +34,8 @@ The rules live in `_gate` in `backend/app/routers/mcp.py`. The person's standing 6. `list_characters {query?}` reads the Characters library (one `.fmo` per character in the data folder's `Characters` folder). `add_character {character, movie?, at?}` asks first, then the window opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead, and saves the movie; the answer gives `content`, `movie` and `saved`. 7. `list_voices {engine?}` reads which voice engines are ready (`builtin`, `local`, `online`) and their voices. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` asks first, then the window speaks the text, places the sound on the Timeline at `at` or the Playhead, and saves the movie. See `sub-skills/ai-voice`. 8. `list_subtitles {movie}` reads the movie's subtitles: whether the video shows them, the look, and each line in seconds and frames. `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` asks first, then the window changes the subtitles of the open movie (or `movie`, which it opens) and saves. See `sub-skills/subtitles`. -9. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one. +9. `comfy_status` reads the person's Comfy server (address, reachable, generation pack installed and recent enough, memory profile, device, whether a key is stored; never the key). `comfy_workflows` lists the workflows with their slots and whether each is ready. `comfy_generate {mode, prompt?, seed?, slots?, movie?}` asks first, then the window sends the blocks selected on its Timeline to Comfy (modes `fluid`, `animate`, `erase`, `add`, `relight`, `matte`, `upscale`), waits for the job, places the results on new tracks at the source's start and saves; the answer gives `blocks`, `movie` and `saved`. `comfy_job {job}` reads one job's state and result files. Check `comfy_status` and `comfy_workflows` first: the pack may be missing, and a workflow may lack models. +10. `list_commands` shows the commands that are not tools (Recently Deleted, Exports, stacks, tags, fonts, ffmpeg's encoders); `run_command {id, params}` runs one. ## Refusals @@ -42,7 +43,7 @@ Every refusal is one plain sentence. Pass it to the person as it is. - Outside agents are off: ask the person to open FormMorpheus and allow outside agents. - Blocked: the person turned agents off in Preferences; do not retry. -- Open FormMorpheus first: export, import, add_character, add_voice and set_subtitles need the window. +- Open FormMorpheus first: export, import, add_character, add_voice, set_subtitles and comfy_generate need the window. - The person said no: do not ask again at once; a repeat within `DECLINE_PAUSE` seconds is refused without asking. - Nobody answered within the wait: the question expired; ask the person to answer in the window. diff --git a/.docs/wiki/Agents.md b/.docs/wiki/Agents.md index 2fb5592..2ebd5c9 100644 --- a/.docs/wiki/Agents.md +++ b/.docs/wiki/Agents.md @@ -8,9 +8,9 @@ The server is `POST /mcp` on the engine: Streamable HTTP in stateless JSON, prot | Class | Tools | What happens | |---|---|---| -| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `list_commands`, and through `run_command` the commands `list_deleted`, `list_exports`, `list_stacks`, `export_capabilities`, `list_fonts` | run at once; refused only when agents are blocked | +| Reads | `get_context`, `list_movies`, `get_movie`, `get_movie_picture`, `list_characters`, `list_voices`, `list_subtitles`, `comfy_status`, `comfy_workflows`, `comfy_job`, `list_commands`, and through `run_command` the commands `list_deleted`, `list_exports`, `list_stacks`, `export_capabilities`, `list_fonts` | run at once; refused only when agents are blocked | | Changes the library | `manage_movie` (create, rename, duplicate, delete, restore) and, through `run_command`, `set_tags` and `set_stack` | ask in the window under Ask; go ahead under Allowed | -| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles` | ask every time, then the open window carries them out | +| Asks first | `export_movie`, `import_file`, `add_character`, `add_voice`, `set_subtitles`, `comfy_generate` | ask every time, then the open window carries them out | - A movie is found by name inside the library folder only. Delete moves a movie to Recently Deleted; nothing is erased. - `import_file` takes an absolute path inside the library folder, a picture, video, sound, font or layered image file, up to 2 GB. The window opens the movie, imports the file and saves the movie. @@ -18,7 +18,9 @@ The server is `POST /mcp` on the engine: Streamable HTTP in stateless JSON, prot - `list_characters` reads the Characters library (one `.fmo` per character in `Characters/` of the data folder). `add_character {character, movie?, at?}` is carried out by the window: it opens `movie` (or uses the open one), places a copy of the character with fresh ids at `at` or the Playhead through the Characters panel's Add to Movie, and saves the movie. - `list_voices {engine?}` reads, for `builtin`, `local` and `online`, whether each is ready, why not when it is not, and its voices when it is. `add_voice {text, engine?, voice?, language?, speed?, model?, movie?, at?}` is carried out by the window: it speaks the text (at most 10000 characters, 2000 online, and online sends the text to that service), places the sound on the Timeline of `movie` (or the open movie) at `at` or the Playhead, and saves the movie. - `list_subtitles {movie}` reads the movie's subtitles from its file, without the window: whether the video shows them, the look, and each line with its id, start and end in seconds and frames (at most 500 lines, with a count of the rest). `set_subtitles {movie?, lines?, srt?, mode?, show?, from_voices?, style?}` is carried out by the window: `lines` (seconds) or `srt` (the text of a .srt or .vtt file) give the lines, `mode` is `replace` (default) or `add`, `from_voices` makes lines from every AI-voice sound, `show` turns them on or off and `style` sets font, size, position, color and band. It changes `movie` (or the open movie) and saves it. At most 2000 lines. -- The server waits 2 minutes for an answer to a question, 10 minutes for an export or a spoken line and 2 minutes for an import or an added character. +- `comfy_status` reads, in the engine and without the window, the Comfy server's address, whether it can be reached, whether Comfy-FormBridge-Suite is installed and recent enough, its memory profile and device, and only whether a sign-in key is saved. `comfy_workflows` reads the workflows the server offers, their slots and what each lacks. `comfy_job {job}` reads one job's state, progress, result files and failure reason. All three call `services/comfy_bridge.py` and turn its errors into plain tool errors. +- `comfy_generate {mode, prompt?, seed?, slots?, movie?}` is carried out by the window. `mode` is fluid, animate, erase, add, relight, matte or upscale; the window's own mode-to-workflow map picks the workflow, and the sources are the blocks selected in the window, so the agent does not name files. The tool checks the handshake first, so a person is not asked when the pack is missing. After the yes the window sends the job, waits, places the results on new tracks at the source's start as one undo step, and saves the movie, as `add_voice` does (`runComfyFromAgent` in `app/features/comfy-generate.ts`, called from `app/agent-bridge.ts`). +- The server waits 2 minutes for an answer to a question, 10 minutes for an export or a spoken line, 2 minutes for an import or an added character and 30 minutes for a Comfy job, which can be slow on a computer without a graphics card. - No tool reads another file or folder on the computer, and none returns the window key, a socket ticket or a tab's token. ## The Outside agents choice @@ -71,6 +73,7 @@ The engine queues the question, the window polls `/api/mcp/bridge/next` with its | `FORMMORPHEUS_AGENT_DIR` | the working folder of the Claude Code, Codex and Cursor tabs (default `Agent` in the data folder) | | `FORMMORPHEUS_MCP_URL` | for `./formmorpheus mcp`: the engine's `/mcp` address; no engine is started then | | `FORMMORPHEUS_MCP_AUTOSTART` | for `./formmorpheus mcp`: `0` never starts an engine | +| `FORMMORPHEUS_COMFY_URL` | the address of the Comfy server that `comfy_*` tools and Generate use; wins over the saved address (default `http://127.0.0.1:8188`) | The engine sets `FORMMORPHEUS_TERMINAL`, `FORMMORPHEUS_URL` and `FORMMORPHEUS_MCP_URL` in every tab, and `FORMMORPHEUS_INAPP_TOKEN` in the Codex, Cursor and Antigravity tabs. The launcher sets `FORMMORPHEUS_CALLER_DIR`. None of these is set by hand. diff --git a/.docs/wiki/Media-and-Export.md b/.docs/wiki/Media-and-Export.md index f5d4e54..93c1a35 100644 --- a/.docs/wiki/Media-and-Export.md +++ b/.docs/wiki/Media-and-Export.md @@ -37,6 +37,26 @@ Files live in `voice/` of the data folder: `runtime/` and `models/` for the buil - **Sources.** An AI voice's sound carries `spoken` (see AI Voice), and `cuesForSound` turns it into cues, estimating the timing by sentence length when the sound has none. A recording or a sound file is listened to by `media/speech-pcm.ts`, which makes a 16 kHz mono WAV of the whole asset, and the engine's `POST /api/voice/transcribe` (Whisper base in the built-in voice's runtime). - **Files.** `io/subtitle-files.ts` reads `.srt` and `.vtt` (told apart by content, tags stripped) and writes either. +## Generate with Comfy + +Desktop only. A person's Comfy server makes video from pictures of the movie, through the Comfy-FormBridge-Suite pack installed there. The engine is the only part that talks to the server; the window never does. + +| Part | Role | +|---|---| +| `backend/app/services/comfy_bridge.py` | the client of the pack's `/formbridge/v1` routes: handshake, workflows and their readiness, uploads, jobs, one websocket follower for progress and previews, result files | +| `backend/app/routers/comfy.py` | `/api/comfy`: `GET /status`, `PUT /server`, `PUT` and `DELETE /key`, `GET /workflows`, `GET /workflows/{id}/readiness`, `POST /run`, `GET /jobs/{id}`, `GET /jobs/{id}/files/{n}`, `POST /jobs/{id}/cancel` | +| `frontend/src/io/comfy-api.ts` | the window's calls to those routes, and the readiness sentences | +| `frontend/src/ui/generate-panel.ts` | the card: mode, selection check, progress bar and preview, Retry with another seed, Cancel | +| `frontend/src/ui/comfy-settings.ts` | the Comfy section of Preferences: address, Test, sign-in key | +| `frontend/src/app/features/comfy-generate.ts` | collects the frames and keyframes, runs the job, places the results (`runComfyFromAgent` for agents) | + +- **Address and key.** The address is `comfy_url` in `settings.json`, default `http://127.0.0.1:8188`, and `FORMMORPHEUS_COMFY_URL` wins. An optional sign-in key is in the system keyring (account `comfy-key`), sent as a Bearer header to that one server, never stored in the settings and never returned by a route. +- **Modes.** One map in the window turns a mode into a workflow: Fluid shot, `video.fluid`; Animate a drawing, `video.animate`; Erase, `video.clean`; Add and Relight, `video.shot`; Matte, `video.matte`; Upscale, `video.upscale`. Sources are the selected blocks. The paint-over is the selected Drawing or Flipbook, or the first one on a higher track that covers the video's start. Its alpha becomes the mask, white on black. Keyframes of a Flipbook snap to multiples of 8 within the block. +- **Sending.** The window uploads the frames it drew in a multipart `POST /run`; for a movie slot the engine extracts the frames of a library asset with the app's ffmpeg. The engine reads the multipart body itself, one field at a time (1 MB per field, 8 GB in all). +- **Jobs.** One client id per engine start and one websocket follower that keeps the latest progress, preview and state per job (up to 64), reconnects after 2 seconds and stops after 5 idle minutes; polling every 1.5 seconds is the fallback. Status calls time out after 3 seconds, transfers after 10 minutes. Results are in `Jobs/comfy-/` of the data folder and go with the engine's orphan sweep after 30 minutes idle. +- **Landing.** The results are placed directly through the import path (`importMedia`, `importSequence`), so the video, its mask track and the provenance are one engine run named `Comfy: `, one undo step. The new asset carries an optional `generated` field (workflow and its version, mode, seed, job, and the prompt and source when there are any) that is saved in the `.fmo` and dropped by `normalize.ts` when malformed. +- **Not on iPad.** The command, the card and the Preferences section are not registered there, and `/api/comfy/*` is desktop-only in the API contract check. + ## Sync The AudioContext is the clock while sound plays. Loop turns restart the sound from the new frame without a clock jump. Output latency leaves sound a constant frame or two behind the Playhead readout. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a2f3b4..db68df0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ Versions are `v*.*.*` with dots. Dates are US Eastern. Each section is written for the person using FormMorpheus; the reasons behind a change are in the `HASHOUT_LOG.md` beside the code. +## 0.39.0 · 2026-11-29 + +A Comfy server can now make video for your movie. Create · Generate with Comfy... sends pictures from the Timeline to it and brings the result back on new tracks. It is for the desktop; the iPad app does not have it. + +### New +- Generate with Comfy... in the Create menu has seven modes: a fluid shot from the keyframes of a Flipbook, Animate a drawing, Erase on a video, Add to a video, Relight a video, Matte and Upscale. Erase, Add and Relight use a drawing painted over the video's first frame to say where to work. The card says in a sentence what to select until it fits. +- The card shows the place in the queue, then a progress bar with a preview picture, with Cancel and Retry with another seed. The result lands on new tracks at the start of the source block, with a mask track when the mode makes one, in one undo step. A video made this way keeps a note of its workflow and seed in the movie file. +- Preferences has a Comfy page: the server's address (a Comfy server on this computer by default, or `FORMMORPHEUS_COMFY_URL`), Test, and an optional sign-in key kept in this computer's keychain and sent only to that server. +- When the server is not ready, the card lists what it lacks in plain words: the pack to install, the nodes, or each model with its size and the folder to put it in. Comfy-FormBridge-Suite must be installed in the server's `custom_nodes` folder. +- Outside agents can check the server and follow its jobs, and `comfy_generate` makes video with your approval in the window, using the blocks you have selected. See Agents in the manual. +- A long menu shows a soft fade and a small arrow at its bottom while more items are below, and they go once you reach the last item. + +### Improved +- A movie file whose note of where a video came from is damaged still opens; the note is dropped and the video stays. + +### Fixed +- Windows and Linux: menus from the menu bar, their submenus and right-click menus such as the Stage menu no longer cover the menu bar. They stay at most three quarters of the window tall and scroll; right-click menus still open at the pointer. + ## 0.38.1 · 2026-11-29 A fix release: saving, importing, settings and outside agents are more careful, and outside agents keep asking on a computer with no system keyring. diff --git a/CLAUDE.md b/CLAUDE.md index 1ba8541..388ffba 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ The form family's animation studio: a Stage over a Timeline, drawn frame by fram - `./formmorpheus desktop dev` and `./formmorpheus desktop build` (or `./build_app`) run and build the Tauri app. - `cd frontend && npx tsc --noEmit` is the typecheck; `npm run build` typechecks and builds. - Ports: interface http://localhost:5194 (Vite, `server.host` false, proxies `/api` to the engine), engine http://127.0.0.1:9494. -- Configuration is environment variables only; no `.env` is read. For a person: `FORMMORPHEUS_DATA_DIR` (the data folder), `FORMMORPHEUS_LIBRARY_DIR` (the library), `FORMMORPHEUS_FFMPEG` (the ffmpeg to use), `FORMMORPHEUS_PORT` (the engine's port; 0 or unset picks one), `FORMMORPHEUS_PORTABLE` (1: data beside the app), `FORMMORPHEUS_SAFE_GRAPHICS` (Linux desktop: 1 or 2), `FORMMORPHEUS_CLAUDE_BIN`, `FORMMORPHEUS_CODEX_BIN`, `FORMMORPHEUS_CURSOR_BIN` and `FORMMORPHEUS_ANTIGRAVITY_BIN` (the path of that agent program for the terminal panel, tried before the search of PATH and the usual install folders), `FORMMORPHEUS_AGENT_DIR` (the folder the Claude Code, Codex and Cursor tabs work in; `Agent` in the data folder when unset), `FORMMORPHEUS_MCP_URL` and `FORMMORPHEUS_MCP_AUTOSTART` (for `./formmorpheus mcp`: the engine's `/mcp` address to forward to, in which case no engine is started; 0 stops it starting this source copy's engine when none answers). For development and builds: `FORMMORPHEUS_DEV_URL` (a debug desktop build loads this page), `FORMMORPHEUS_BACKEND_PORT` (the engine port Vite proxies to), `FORMMORPHEUS_DIST` (the built interface the engine serves), `FORMMORPHEUS_NO_SHELL` (1: a frozen engine serves without its app), `FORMMORPHEUS_TARGET` and `FORMMORPHEUS_PYI_ARCH` (the freeze's target), `FORMMORPHEUS_ENGINE_WINDOWED` (0: a Windows engine with a console). Set by the app for its own engine, never by hand: `FORMMORPHEUS_DESKTOP`, `FORMMORPHEUS_PORT_PREFER`, `FORMMORPHEUS_SHELL_PID`, `FORMMORPHEUS_WINDOW_KEY_STDOUT`. Set by the launcher, never by hand: `FORMMORPHEUS_CALLER_DIR` (the folder `./formmorpheus` was run from; `./formmorpheus agents install` sets up that folder too). Set by the engine in the terminal panel's tabs, never by hand: `FORMMORPHEUS_TERMINAL` (1), `FORMMORPHEUS_URL` (the engine's address), `FORMMORPHEUS_MCP_URL` (its `/mcp` address) and, in the Codex, Cursor and Antigravity tabs only, `FORMMORPHEUS_INAPP_TOKEN` (the tab's own token). The engine listens on 127.0.0.1 only; there is no variable to change that. +- Configuration is environment variables only; no `.env` is read. For a person: `FORMMORPHEUS_DATA_DIR` (the data folder), `FORMMORPHEUS_LIBRARY_DIR` (the library), `FORMMORPHEUS_FFMPEG` (the ffmpeg to use), `FORMMORPHEUS_PORT` (the engine's port; 0 or unset picks one), `FORMMORPHEUS_PORTABLE` (1: data beside the app), `FORMMORPHEUS_SAFE_GRAPHICS` (Linux desktop: 1 or 2), `FORMMORPHEUS_CLAUDE_BIN`, `FORMMORPHEUS_CODEX_BIN`, `FORMMORPHEUS_CURSOR_BIN` and `FORMMORPHEUS_ANTIGRAVITY_BIN` (the path of that agent program for the terminal panel, tried before the search of PATH and the usual install folders), `FORMMORPHEUS_AGENT_DIR` (the folder the Claude Code, Codex and Cursor tabs work in; `Agent` in the data folder when unset), `FORMMORPHEUS_MCP_URL` and `FORMMORPHEUS_MCP_AUTOSTART` (for `./formmorpheus mcp`: the engine's `/mcp` address to forward to, in which case no engine is started; 0 stops it starting this source copy's engine when none answers), `FORMMORPHEUS_COMFY_URL` (the address of the Comfy server that Generate and the `comfy_*` agent tools use; it wins over the address saved in Preferences; `http://127.0.0.1:8188` when neither is set). For development and builds: `FORMMORPHEUS_DEV_URL` (a debug desktop build loads this page), `FORMMORPHEUS_BACKEND_PORT` (the engine port Vite proxies to), `FORMMORPHEUS_DIST` (the built interface the engine serves), `FORMMORPHEUS_NO_SHELL` (1: a frozen engine serves without its app), `FORMMORPHEUS_TARGET` and `FORMMORPHEUS_PYI_ARCH` (the freeze's target), `FORMMORPHEUS_ENGINE_WINDOWED` (0: a Windows engine with a console). Set by the app for its own engine, never by hand: `FORMMORPHEUS_DESKTOP`, `FORMMORPHEUS_PORT_PREFER`, `FORMMORPHEUS_SHELL_PID`, `FORMMORPHEUS_WINDOW_KEY_STDOUT`. Set by the launcher, never by hand: `FORMMORPHEUS_CALLER_DIR` (the folder `./formmorpheus` was run from; `./formmorpheus agents install` sets up that folder too). Set by the engine in the terminal panel's tabs, never by hand: `FORMMORPHEUS_TERMINAL` (1), `FORMMORPHEUS_URL` (the engine's address), `FORMMORPHEUS_MCP_URL` (its `/mcp` address) and, in the Codex, Cursor and Antigravity tabs only, `FORMMORPHEUS_INAPP_TOKEN` (the tab's own token). The engine listens on 127.0.0.1 only; there is no variable to change that. ## Where things live diff --git a/README.md b/README.md index 2e0227f..3e4e6a2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ </p> <p align="center"> - <img alt="version 0.38.1" src="https://img.shields.io/badge/version-v0.38.1-eef0f4?style=flat-square"> + <img alt="version 0.39.0" src="https://img.shields.io/badge/version-v0.39.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 and FastAPI" src="https://img.shields.io/badge/Python-FastAPI-3776ab?style=flat-square"> <img alt="macOS, Linux and Windows" src="https://img.shields.io/badge/macOS%20%C2%B7%20Linux%20%C2%B7%20Windows-native-2f7bf5?style=flat-square"> @@ -122,6 +122,7 @@ - **Agents:** an MCP server at `/mcp` with a small core tool list, and a terminal panel for Claude Code, Codex, Cursor and Antigravity. A change waits for your yes in the window unless you allow agents; see [`.docs/wiki/Agents.md`](.docs/wiki/Agents.md). - **AI Voice:** type what to say and the spoken sound lands on the Timeline like any sound, ready for fades, pan, lip-sync and export. A built-in offline voice (Kokoro, 54 voices, set up once from the card), a voice app on this computer for a cloned voice, or an online voice with your own key. On iPad: the online voice, or a speech server on a computer on the same network; the built-in voice needs a computer. Each spoken sound keeps its words and sentence timing, and adds its subtitles by itself. See `docs/MANUAL.md`. - **Subtitles:** tick one box and the lines are drawn on the Stage and in every export, in one look for all of them: font, size, position, color and a dark band. AI voices add theirs when they speak; for a recording or a sound file, listening runs on this computer with its own model, a one-time download of about 80 MB, and sends nothing anywhere (on iPad it uses the iPad's own speech recognition instead, with no download). Edit the lines in the card, and import or export `.srt` and `.vtt`. See `docs/MANUAL.md`. +- **Generate with Comfy:** on the desktop, send the selected blocks to your own Comfy server with the Comfy-FormBridge-Suite pack: a fluid shot from flipbook keyframes, an animated drawing, or erase, add, relight, matte or upscale on a video block from a drawing over its first frame. Results come back as new tracks in one undo step, and the card says which models the server still lacks. See `docs/MANUAL.md`. - **In your language:** the interface ships in 30 languages, right to left included, with a manual on F1. - **iPad:** the iPad app in `ios/` wraps the same interface in a Swift shell with Apple Pencil, Files and AVFoundation export. It is built and runs on an iPad Pro 13-inch (M5) with Apple Pencil Pro on iPadOS 26.3, where drawing, squeeze, barrel roll and hover were checked. Version 0.38.0 adds AI Voice, listening for subtitles and My scenes to the iPad app; these are new there and wait for their check on the device (the list is in the build guide). The iPad app has no built-in voice, no Save to a chosen folder in Export, no outside agents or terminal panel and no Pen Link. It is a beta that you build yourself on a Mac with Xcode: see [`docs/ios/BUILD.md`](docs/ios/BUILD.md). An App Store version is planned only if the iPad app gets real adoption. diff --git a/agents/manifest.json b/agents/manifest.json index 5be1dd6..231ab5f 100644 --- a/agents/manifest.json +++ b/agents/manifest.json @@ -17,6 +17,10 @@ "add_voice", "list_subtitles", "set_subtitles", + "comfy_status", + "comfy_workflows", + "comfy_job", + "comfy_generate", "list_commands", "run_command" ], @@ -28,6 +32,9 @@ "list_characters", "list_voices", "list_subtitles", + "comfy_status", + "comfy_workflows", + "comfy_job", "list_commands" ], "approval_gated": [ @@ -37,6 +44,7 @@ "add_character", "add_voice", "set_subtitles", + "comfy_generate", "run_command" ], "asks_first": [ @@ -44,7 +52,8 @@ "import_file", "add_character", "add_voice", - "set_subtitles" + "set_subtitles", + "comfy_generate" ], "commands": [ { diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md index c0d63ca..9b35880 100644 --- a/backend/HASHOUT_LOG.md +++ b/backend/HASHOUT_LOG.md @@ -43,6 +43,22 @@ Last updated: 2026-11-29 · the fixes of 0.38.1 - `_ring()` is the one place keyring is imported, so the tests swap in an in-memory keyring (tests/conftest.py, autouse) and never reach the system one. - A keyring that answers but refuses the key or does not keep it counts as none: `_load(True)` then marks the seal unavailable. `set_choice("allowed")` first makes the key (`seal.ready()`) and raises `NeedsKeyring` when it cannot, so an unsealed yes is never written, and an Always answer in that case counts as Allow once. +## unreleased · the engine reaches a Comfy server, and agents use it + +- refers-to: services/comfy_bridge.py; routers/comfy.py; routers/mcp.py :: COMFY_WAIT, COMFY_MODES, _comfy, t_comfy_status, t_comfy_workflows, t_comfy_job, t_comfy_generate; main.py; setup/api_contract_check +- kind: decision +- logged: 2026-11-29 + +- The client uses stdlib `urllib` inside `asyncio.to_thread` and the pinned `websockets` client. Status calls time out after 3 seconds, transfers after 600. Redirects are followed only on the same host, and a loopback address never goes through a proxy. +- `POST /api/comfy/run` is parsed by the engine's own streaming multipart reader because no multipart library is allowed: 1 MB per field, 8 GB in all, and it refuses a missing boundary, a truncated body, an unsafe slot name and more than 20000 parts. +- One client id per engine start and one websocket follower keep the latest progress, preview and state for up to 64 jobs. It reconnects after 2 seconds and stops after 5 idle minutes; polling every 1.5 seconds is the fallback. +- The address is `comfy_url` in the settings and `FORMMORPHEUS_COMFY_URL` wins. The optional sign-in key is in the keyring (account `comfy-key`) and goes out as a Bearer header to that one server; `PUT /key` answers 503 when there is no keyring, and no route or tool returns the key, only whether one is saved. +- Results are kept in `Jobs/comfy-<job>/` and go with the existing orphan sweep after 30 minutes idle. +- "comfyui" appears only as a wire key and error code of the pack's contract. Our own code for a too-old server is `too_old`. +- The `/api/comfy/*` routes are desktop-only in `setup/api_contract_check`, and `docs/api-contract.json` was regenerated. +- The MCP reads call `comfy_bridge` in the engine and need no window. `comfy_generate` checks the handshake before asking, so a person is not asked when the pack is missing. The wait is 30 minutes for the work (a CPU Comfy is slow) and the consent wait stays 2 minutes. `services/bridge.py` is unchanged: its generic queue carries the new kind. +- Review fixes: slot names cannot be `.` or `..`; keyframes must sit on multiples of 8; non-numeric start, frames or rate answer 400; the keyring key and the can-store probe are cached in memory and dropped on set or clear; a new host clears the saved key (`keyCleared` in the answer); uploads to Comfy stream from the slot files with no second copy; a run upload touches its folder every minute so the 30 minute sweep leaves it alone. + ## v0.38.1 · a save never replaces a different movie - refers-to: routers/library.py :: _all_movies, _lands_on_other_movie, write_project diff --git a/backend/app/__init__.py b/backend/app/__init__.py index 53b39ad..e72781a 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -1 +1 @@ -__version__ = "0.38.1" +__version__ = "0.39.0" diff --git a/backend/app/main.py b/backend/app/main.py index ced7776..624a1c5 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -14,6 +14,8 @@ from app.routers import agents, mcp, terminal from app.routers import video_tools from app.routers import voice +from app.routers import comfy +from app.services import comfy_bridge from app.routers import scenes from app.services import claude_code from app.services import terminal as terminals @@ -50,6 +52,8 @@ app.include_router(video_tools.router, prefix="/api/video-tools") app.include_router(voice.router, prefix="/api/voice") app.on_event("startup")(jobs.sweep) +app.include_router(comfy.router, prefix="/api/comfy") +app.on_event("shutdown")(comfy_bridge.stop_follow) app.include_router(files.router, prefix="/api/files") app.include_router(trash.router, prefix="/api/trash") app.include_router(recovery.router, prefix="/api/recovery") diff --git a/backend/app/routers/comfy.py b/backend/app/routers/comfy.py new file mode 100644 index 0000000..ae3731d --- /dev/null +++ b/backend/app/routers/comfy.py @@ -0,0 +1,232 @@ +"""Generation through the person's own Comfy server at /api/comfy; desktop only.""" +import asyncio +import json +import os +import re +import time +import shutil +from pathlib import Path + +from fastapi import APIRouter, HTTPException, Request +from fastapi.responses import FileResponse +from pydantic import BaseModel, Field + +from app.services import comfy_bridge as cb + +router = APIRouter(tags=["comfy"]) + +MAX_FIELD = 1024 * 1024 +MAX_UPLOAD = 8 * 1024 * 1024 * 1024 +MAX_PARTS = 20000 +_SLOT = re.compile(r"^[A-Za-z0-9_][A-Za-z0-9_.-]{0,63}$") +_DISPO = re.compile(r'(\w+)="([^"]*)"') + + +class ServerBody(BaseModel): + url: str = Field(default="", max_length=300) + + +class KeyBody(BaseModel): + key: str = Field(min_length=1, max_length=2000) + + +def _fail(exc: cb.ComfyError) -> HTTPException: + detail: dict = {"message": str(exc)} + if exc.code: + detail["code"] = exc.code + if exc.detail is not None: + detail["detail"] = exc.detail + return HTTPException(exc.status, detail) + + +async def _run(fn, *args): + try: + return await asyncio.to_thread(fn, *args) + except cb.ComfyError as exc: + raise _fail(exc) + + +def _status() -> dict: + url = cb.current_url() + return {"url": url, "source": cb.url_source(), "default": cb.DEFAULT_URL, "hasKey": cb._key() is not None, + "canStore": cb.can_store(), "client": cb.CLIENT, "handshake": cb.handshake(url)} + + +@router.get("/status") +async def status() -> dict: + return await _run(_status) + + +@router.put("/server") +async def server(body: ServerBody) -> dict: + cleared = await _run(cb.save_url, body.url) + return {**await _run(_status), "keyCleared": cleared} + + +@router.put("/key") +async def put_key(body: KeyBody) -> dict: + await _run(cb.set_key, body.key) + return {"hasKey": True} + + +@router.delete("/key") +async def delete_key() -> dict: + await _run(cb.clear_key) + return {"hasKey": False} + + +@router.get("/workflows") +async def workflows() -> dict: + return await _run(cb.workflows) + + +@router.get("/workflows/{wid}/readiness") +async def readiness(wid: str) -> dict: + return await _run(cb.readiness, wid) + + +async def _read_multipart(request: Request, folder: Path) -> tuple[dict[str, str], dict[str, list[Path]]]: + ctype = request.headers.get("content-type", "") + m = re.search(r'boundary="?([^";]+)"?', ctype) + if not ctype.lower().startswith("multipart/form-data") or not m: + raise HTTPException(400, {"message": "Send the run as a multipart form."}) + sep = b"\r\n--" + m.group(1).encode("latin-1") + fields: dict[str, str] = {} + media: dict[str, list[Path]] = {} + buf = b"\r\n" + total = 0 + state = "preamble" + name = "" + sink = None + value = bytearray() + parts = 0 + touched = time.monotonic() + + def finish() -> None: + nonlocal sink, value + if sink is not None: + sink.close() + sink = None + elif state == "body": + fields[name] = value.decode("utf-8", "replace") + value = bytearray() + + def start(head: bytes) -> None: + nonlocal name, sink, parts + parts += 1 + if parts > MAX_PARTS: + raise HTTPException(413, {"message": "Too many files in one run."}) + dispo = "" + for line in head.decode("utf-8", "replace").split("\r\n"): + if line.lower().startswith("content-disposition:"): + dispo = line + attrs = dict(_DISPO.findall(dispo)) + name = attrs.get("name", "") + if "filename" in attrs: + if not _SLOT.match(name): + raise HTTPException(400, {"message": "A file is named for a slot that cannot exist."}) + files = media.setdefault(name, []) + slot_dir = folder / name + slot_dir.mkdir(exist_ok=True) + path = slot_dir / f"{len(files):05d}-{cb.safe_name(attrs['filename'], 'file')}" + files.append(path) + sink = open(path, "wb") + + try: + async for chunk in request.stream(): + total += len(chunk) + if total > MAX_UPLOAD: + raise HTTPException(413, {"message": "The run is larger than 8 GB."}) + buf += chunk + if time.monotonic() - touched > 60: + touched = time.monotonic() + os.utime(folder) + while True: + if state in ("preamble", "body"): + at = buf.find(sep) + if at < 0: + keep = len(sep) + 4 + if state == "body" and len(buf) > keep: + data, buf = buf[:-keep], buf[-keep:] + if sink is not None: + sink.write(data) + else: + value.extend(data) + if len(value) > MAX_FIELD: + raise HTTPException(413, {"message": "A form field is too large."}) + break + if state == "body": + if sink is not None: + sink.write(buf[:at]) + else: + value.extend(buf[:at]) + finish() + buf = buf[at + len(sep):] + state = "after" + if state == "after": + if len(buf) < 2: + break + if buf[:2] == b"--": + state = "end" + break + buf = buf[2:] + state = "head" + if state == "head": + at = buf.find(b"\r\n\r\n") + if at < 0: + if len(buf) > 16384: + raise HTTPException(400, {"message": "The form could not be read."}) + break + start(buf[:at]) + buf = buf[at + 4:] + state = "body" + if state == "end": + break + if state == "end": + break + finally: + if sink is not None: + sink.close() + if state != "end": + raise HTTPException(400, {"message": "The form ended early."}) + return fields, media + + +@router.post("/run", status_code=201) +async def run(request: Request) -> dict: + folder = cb.new_upload_folder() + try: + fields, media = await _read_multipart(request, folder) + wid = fields.get("workflow", "").strip() + try: + slots = json.loads(fields.get("slots") or "{}") + sources = json.loads(fields.get("sources") or "{}") + except ValueError: + raise HTTPException(400, {"message": "The slot values are not valid JSON."}) + if not isinstance(slots, dict) or not isinstance(sources, dict): + raise HTTPException(400, {"message": "The slot values must be an object."}) + reuse = fields.get("reuse", "true").strip().lower() != "false" + job = await _run(cb.start_job, wid, slots, media, sources, folder, reuse) + finally: + shutil.rmtree(folder, ignore_errors=True) + cb.follow(cb.current_url()) + return {"job": job} + + +@router.get("/jobs/{job_id}") +async def job(job_id: str) -> dict: + out = await _run(cb.job_status, job_id) + if out["job"].get("state") in ("queued", "running"): + cb.follow(cb.current_url()) + return out + + +@router.get("/jobs/{job_id}/files/{n}") +async def job_file(job_id: str, n: int) -> FileResponse: + path, ctype = await _run(cb.fetch_file, job_id, n) + return FileResponse(path, media_type=ctype, filename=path.name.split("-", 1)[-1]) + + +@router.post("/jobs/{job_id}/cancel") +async def cancel(job_id: str) -> dict: + return await _run(cb.cancel_job, job_id) diff --git a/backend/app/routers/mcp.py b/backend/app/routers/mcp.py index fe7cae5..9d4cb4d 100644 --- a/backend/app/routers/mcp.py +++ b/backend/app/routers/mcp.py @@ -13,7 +13,7 @@ from app.core import config, window_key from app.routers import characters, exports, fonts, jobs, library, trash, voice -from app.services import agent_access, bridge, claude_code, movies, voice_remote, voice_runtime +from app.services import agent_access, bridge, claude_code, comfy_bridge, movies, voice_remote, voice_runtime from app.services import ffmpeg as ff router = APIRouter() @@ -29,6 +29,8 @@ IMPORT_WAIT = 120.0 VOICE_WAIT = 600.0 SUBTITLE_WAIT = 120.0 +COMFY_WAIT = 1800.0 +COMFY_MODES = ["fluid", "animate", "erase", "add", "relight", "matte", "upscale"] MAX_SUBTITLE_LINES = 2000 MAX_SUBTITLE_TEXT = 500 MAX_SRT = 400_000 @@ -42,7 +44,8 @@ INSTRUCTIONS = ("FormMorpheus is an animation studio on this computer; its movies are .fmo files in the person's library folder. " "Start with get_context. list_movies, get_movie and get_movie_picture read; manage_movie creates, renames, duplicates, " "deletes (to Recently Deleted) and restores movies; list_characters reads the saved characters; list_voices reads the AI voices and " - "whether each is ready; list_subtitles reads a movie's subtitles; export_movie, import_file, add_character, add_voice and set_subtitles are carried out by the open " + "whether each is ready; list_subtitles reads a movie's subtitles; comfy_status, comfy_workflows and comfy_job read the person's Comfy server, " + "and comfy_generate makes video with it; export_movie, import_file, add_character, add_voice, set_subtitles and comfy_generate are carried out by the open " "FormMorpheus window after the person agrees there. list_commands lists the other commands and run_command runs one. Changes need the " "person's yes: outside agents are off until they allow them in the window.") NO_WINDOW = "Open FormMorpheus first: the FormMorpheus window does this ({what}), and none is open. Ask the person to open FormMorpheus, then retry." @@ -152,6 +155,22 @@ def _command(name: str, kind: str, description: str, props: dict, required: list "size": {"type": "number", "minimum": 2, "maximum": 15, "description": "Percent of the movie's height"}, "position": {"type": "string", "enum": ["top", "middle", "bottom"]}, "color": {"type": "string", "description": "#rrggbb"}, "band": {"type": "boolean", "description": "A dark band behind the words"}}}}), + _tool("comfy_status", "reads", "Reads the person's Comfy server without the window: its address, whether FormMorpheus can reach it, whether the " + "generation pack is installed and recent enough, its memory profile and device, and whether a sign-in key is stored. Nothing is changed.", {}), + _tool("comfy_workflows", "reads", "Reads the generation workflows the Comfy server offers: each one's id, title, what it makes, its slots (name, type, " + "default, limits) and whether everything it needs is installed there, with what is missing when not. Needs the pack installed.", {}), + _tool("comfy_job", "reads", "Reads one Comfy job by its id: its state (queued, running, done, failed, cancelled), progress, the result files when it is done, " + "and the reason when it failed. Nothing is changed.", + {"job": {"type": "string", "description": "A job id such as job_ followed by 24 hex digits"}}, ["job"]), + _tool("comfy_generate", "asks", "Asks first: the person approves in the FormMorpheus window, which then sends the blocks selected on its Timeline (and their " + "drawings or keyframes) to the Comfy server, waits for the job, and places the results on new tracks at the source's start, in the movie open there " + "(or in movie, which it opens), then saves the movie. mode: fluid (a shot from flipbook keyframes), animate (a drawing), erase, add or relight " + "(on a video block, from a drawing at its first frame), matte or upscale. prompt and seed are optional; slots sets other plain values of the workflow, " + "as comfy_workflows lists them. The Comfy server must be ready for that mode. Waits up to 2 minutes for the answer and 30 minutes for the work.", + {"mode": {"type": "string", "enum": COMFY_MODES}, "prompt": {"type": "string", "maxLength": 4000, "description": "What to make"}, + "seed": {"type": "integer", "minimum": 0, "maximum": 2147483647}, "slots": {"type": "object", "description": "Other plain slot values by slot name"}, + "movie": {"type": "string", "description": "A movie's name, as list_movies gives it (default the movie open in the window)"}}, + ["mode"]), _tool("list_commands", "reads", "Reads the commands that are not tools: id, class (reads, changes the library) and what each does; id returns one with its parameters.", {"id": _S}), _tool("run_command", "changes", "Changes the library or reads, as the command's class says: runs one command from list_commands with its params. " @@ -729,6 +748,120 @@ async def t_set_subtitles(a: Agent, args: dict) -> dict: {"movie": into or None, "lines": count, "show": shown, "saved": bool(out.get("saved"))}) +async def _comfy(fn, *a): + try: + return await asyncio.to_thread(fn, *a) + except comfy_bridge.ComfyError as exc: + raise ToolError(str(exc)) + + +def _device_name(raw) -> str: + if isinstance(raw, dict): + return str(raw.get("name") or "").strip() + return str(raw or "").strip() + + +def _missing(ready: dict) -> list[str]: + out = [] + for p in ready.get("packs") or []: + if isinstance(p, dict) and not p.get("present"): + out.append(f"node pack {p.get('name')}") + for n in ready.get("nodes") or []: + if isinstance(n, dict) and not n.get("present"): + out.append(f"node {n.get('class')}") + for m in ready.get("models") or []: + if isinstance(m, dict) and not m.get("present"): + out.append(f"model {m.get('file')}" + (f" (put it in {m['place']})" if m.get("place") else f" (folder {m.get('folder')})" if m.get("folder") else "")) + return out[:12] + + +async def t_comfy_status(a: Agent, args: dict) -> dict: + url = comfy_bridge.current_url() + hs = await _comfy(comfy_bridge.handshake, url) + has_key = comfy_bridge._key() is not None + if not hs.get("installed"): + words = f"Comfy at {url}: " + str(hs.get("message") or "not available.") + elif not hs.get("supported"): + words = f"Comfy at {url}: " + str(hs.get("message") or "too old for this pack.") + else: + words = f"Comfy at {url} is ready: the generation pack is installed" + (f", memory profile {hs.get('memory_profile')}" if hs.get("memory_profile") else "") + (f", device {_device_name(hs.get('device'))}" if _device_name(hs.get("device")) else "") + "." + return _ok(words, {"url": url, "reachable": bool(hs.get("reachable")), "installed": bool(hs.get("installed")), "supported": bool(hs.get("supported")), + "memoryProfile": hs.get("memory_profile"), "device": _device_name(hs.get("device")) or None, "hasKey": has_key, "message": hs.get("message")}) + + +async def t_comfy_workflows(a: Agent, args: dict) -> dict: + found = await _comfy(comfy_bridge.workflows) + rows = [] + lines = [] + for w in found.get("workflows") or []: + slots = [{k: s.get(k) for k in ("name", "type", "required", "default", "min", "max", "choices") if s.get(k) is not None} for s in w.get("slots") or [] if isinstance(s, dict)] + lacks = [] if w.get("ready") else _missing(w.get("readiness") if isinstance(w.get("readiness"), dict) else {}) + rows.append({"id": w.get("id"), "title": w.get("title"), "description": w.get("description"), "ready": bool(w.get("ready")), "missing": lacks, "slots": slots}) + lines.append(f"{w.get('id')} · {w.get('title') or ''} · {'ready' if w.get('ready') else 'not ready' + (' (missing: ' + '; '.join(lacks) + ')' if lacks else '')} · slots: " + (", ".join(f"{s['name']} ({s['type']})" for s in slots) or "none")) + if not rows: + return _ok("The Comfy server offers no workflows.", {"workflows": []}) + return _ok(f"{len(rows)} workflow{'s' if len(rows) != 1 else ''}:\n" + "\n".join(lines), {"workflows": rows, "memoryProfile": found.get("memory_profile")}) + + +async def t_comfy_job(a: Agent, args: dict) -> dict: + jid = str(args.get("job") or "").strip() + if not jid: + raise ToolError("Give job, a job id.") + out = await _comfy(comfy_bridge.job_status, jid) + job = out["job"] + files = comfy_bridge.result_files(job) if job.get("state") == "done" else [] + state = str(job.get("state") or "unknown") + words = f"Job {jid} is {state}." + prog = job.get("progress") + if state == "running" and isinstance(prog, dict) and prog.get("max"): + words += f" Step {prog.get('value')} of {prog.get('max')}." + if state == "done": + words += f" {len(files)} result file{'s' if len(files) != 1 else ''}." + if state == "failed" and job.get("error"): + words += f" {job['error'] if isinstance(job['error'], str) else (job['error'].get('message') or '')}".rstrip() + return _ok(words, {"job": {"id": jid, "state": state, "progress": prog if isinstance(prog, dict) else None}, + "files": [{"name": f.get("name"), "kind": f.get("kind"), "bytes": f.get("bytes")} for f in files]}) + + +async def t_comfy_generate(a: Agent, args: dict) -> dict: + mode = str(args.get("mode") or "").strip() + if mode not in COMFY_MODES: + raise ToolError("mode is one of " + ", ".join(COMFY_MODES) + ".") + payload: dict = {"mode": mode} + if args.get("prompt") is not None: + if not isinstance(args["prompt"], str): + raise ToolError("prompt is text.") + payload["prompt"] = args["prompt"].strip()[:4000] + if args.get("seed") is not None: + try: + seed = int(args["seed"]) + except (TypeError, ValueError): + seed = -1 + if not 0 <= seed <= 2147483647: + raise ToolError("seed is a whole number from 0 to 2147483647.") + payload["seed"] = seed + if args.get("slots") is not None: + if not isinstance(args["slots"], dict) or len(args["slots"]) > 64 or any(not isinstance(k, str) or len(k) > 64 for k in args["slots"]): + raise ToolError("slots is an object of plain values by slot name, as comfy_workflows lists them.") + payload["slots"] = args["slots"] + movie = str(args.get("movie") or "").strip() + if movie: + payload["movie"] = _movie(movie).stem + hs = await _comfy(comfy_bridge.handshake) + if not hs.get("installed") or not hs.get("supported"): + raise ToolError("Nothing was generated. " + str(hs.get("message") or "The Comfy server is not ready.")) + where = f"the movie {payload['movie']}" if movie else "the movie open in the window" + out = await _window(a, "comfy_generate", payload, f"send the selected blocks to the Comfy server ({mode}) and add the results to {where}", COMFY_WAIT) + try: + blocks = int(out.get("blocks") or 0) + except (TypeError, ValueError): + blocks = 0 + into = str(out.get("movie") or payload.get("movie") or "") + note = str(out.get("text") or "") + return _ok(f"Made {blocks} block{'s' if blocks != 1 else ''} with Comfy ({mode})" + (f" in {into}" if into else "") + (", and the movie was saved." if out.get("saved") else "; the movie is not saved yet.") + (f" {note}" if note else ""), + {"mode": mode, "blocks": blocks, "movie": into or None, "saved": bool(out.get("saved")), "text": note or None}) + + async def t_list_commands(a: Agent, args: dict) -> dict: cid = str(args.get("id") or "").strip() if cid: diff --git a/backend/app/services/comfy_bridge.py b/backend/app/services/comfy_bridge.py new file mode 100644 index 0000000..45ec5db --- /dev/null +++ b/backend/app/services/comfy_bridge.py @@ -0,0 +1,627 @@ +"""Client for the person's own Comfy server through the FormBridge pack, contract 1.""" +import asyncio +import json +import logging +import os +import re +import shutil +import subprocess +import sys +import time +import urllib.error +import urllib.parse +import urllib.request +import uuid +import zipfile +from pathlib import Path + +from app.core import config + +log = logging.getLogger("formmorpheus") + +SERVICE = "FormMorpheus" +KEY_ACCOUNT = "comfy-key" +URL_ENV = "FORMMORPHEUS_COMFY_URL" +SETTING = "comfy_url" +DEFAULT_URL = "http://127.0.0.1:8188" +PREFIX = "/formbridge/v1" +CONTRACT = "1" +CLIENT = f"{config.APP_NAME}/{config.VERSION}" +CLIENT_ID = "fm-" + uuid.uuid4().hex +STATUS_TIMEOUT = 3 +LONG_TIMEOUT = 600 +MAX_JSON = 16 * 1024 * 1024 +MAX_FILE = 4 * 1024 * 1024 * 1024 +KEEP_EVENTS = 64 +FOLDER_PREFIX = "comfy-" +_LOOPBACK = ("127.0.0.1", "localhost", "::1") +_JOB_ID = re.compile(r"^job_[0-9a-f]{24}$") +_FILE_ID = re.compile(r"^f_[0-9a-f]{32}$") +_WORKFLOW_ID = re.compile(r"^[a-z0-9][a-z0-9_.-]{0,79}$") +_ASSET_ID = re.compile(r"^[A-Za-z0-9_-]{1,80}$") +_SAFE = re.compile(r"[^A-Za-z0-9_.-]+") +MOVIE_EXT = (".mp4", ".mov", ".mkv", ".webm", ".m4v") +STILL_KINDS = ("image", "mask") + + +class ComfyError(Exception): + def __init__(self, message: str, status: int = 502, code: str = "", detail=None) -> None: + super().__init__(message) + self.status = status + self.code = code + self.detail = detail + + +def _keyring(): + if sys.platform.startswith("linux"): + import ctypes.util + + if hasattr(ctypes.util, "_findLib_ld"): + ctypes.util._findLib_ld = lambda name: None + import keyring + + return keyring + + +_cache: dict = {} + + +def _key() -> str | None: + if "key" not in _cache: + try: + _cache["key"] = _keyring().get_password(SERVICE, KEY_ACCOUNT) or None + except Exception: + _cache["key"] = None + return _cache["key"] + + +def can_store() -> bool: + if "store" not in _cache: + try: + _keyring().get_password(SERVICE, "comfy-probe") + _cache["store"] = True + except Exception: + _cache["store"] = False + return _cache["store"] + + +def set_key(key: str) -> None: + clean = (key or "").strip() + if not clean: + raise ComfyError("There is no key to save.", 422) + _cache.pop("key", None) + try: + _keyring().set_password(SERVICE, KEY_ACCOUNT, clean) + except Exception: + raise ComfyError("This computer has no safe place to keep a key, so it was not saved.", 503) + + +def clear_key() -> None: + _cache.pop("key", None) + try: + _keyring().delete_password(SERVICE, KEY_ACCOUNT) + except Exception: + pass + + +def normalize_url(url: str) -> str: + sorry = ComfyError("That is not a Comfy address. Use one such as http://127.0.0.1:8188.", 422) + text = (url or "").strip().rstrip("/") + try: + parts = urllib.parse.urlsplit(text) + host = (parts.hostname or "").lower() + port = parts.port + except ValueError: + raise sorry + if parts.scheme not in ("http", "https") or not host or parts.username or parts.password: + raise sorry + if parts.query or parts.fragment or parts.path not in ("", "/"): + raise sorry + shown = f"[{host}]" if ":" in host else host + return f"{parts.scheme}://{shown}" + (f":{port}" if port is not None else "") + + +def url_source() -> str: + if os.environ.get(URL_ENV, "").strip(): + return "env" + return "settings" if str(config.read_settings().get(SETTING) or "").strip() else "default" + + +def current_url() -> str: + raw = os.environ.get(URL_ENV, "").strip() or str(config.read_settings().get(SETTING) or "").strip() + if not raw: + return DEFAULT_URL + try: + return normalize_url(raw) + except ComfyError: + return DEFAULT_URL + + +def save_url(url: str) -> bool: + clean = normalize_url(url) if (url or "").strip() else DEFAULT_URL + before = urllib.parse.urlsplit(current_url()).netloc + config.update_settings(lambda s: {**s, SETTING: clean}) + moved = urllib.parse.urlsplit(clean).netloc != before + if moved and _key() is not None: + clear_key() + return True + return False + + +class _SameHost(urllib.request.HTTPRedirectHandler): + def redirect_request(self, req, fp, code, msg, headers, newurl): + old, new = urllib.parse.urlsplit(req.full_url), urllib.parse.urlsplit(newurl) + if (old.scheme, old.netloc) != (new.scheme, new.netloc): + return None + return super().redirect_request(req, fp, code, msg, headers, newurl) + + +def _opener(base: str) -> urllib.request.OpenerDirector: + host = (urllib.parse.urlsplit(base).hostname or "").lower() + handlers: list = [_SameHost()] + if host in _LOOPBACK: + handlers.insert(0, urllib.request.ProxyHandler({})) + return urllib.request.build_opener(*handlers) + + +def _headers(extra: dict | None = None) -> dict: + out = {"X-FormBridge-Contract": CONTRACT, "X-FormBridge-Client": CLIENT, "Accept": "application/json"} + key = _key() + if key: + out["Authorization"] = "Bearer " + key + out.update(extra or {}) + return out + + +def _error_of(exc: urllib.error.HTTPError) -> ComfyError: + try: + body = json.loads(exc.read(MAX_JSON).decode("utf-8", "replace")) + except Exception: + body = None + err = body.get("error") if isinstance(body, dict) else None + if isinstance(err, dict) and err.get("code"): + code = str(err.get("code")) + message = str(err.get("message") or "Comfy refused the request.") + if code == "comfyui_too_old": + message = "This Comfy is too old for the FormBridge pack. Update Comfy and try again." + status = exc.code if exc.code in (400, 403, 404, 409, 413, 422, 503) else 502 + return ComfyError(message, status, code, err.get("detail")) + if exc.code in (401, 403): + return ComfyError("Comfy asked for a sign-in that was not accepted. Check the key in Settings, Comfy.", 502, "sign_in") + if exc.code in (404, 405): + return ComfyError(missing_pack_message(), 404, "not_installed") + return ComfyError(f"Comfy answered with error {exc.code}.", 502) + + +def missing_pack_message() -> str: + return ("Comfy answered, but the FormBridge pack is not installed there. Install Comfy-FormBridge-Suite " + "into Comfy's custom_nodes folder and restart Comfy.") + + +def _unreachable(base: str) -> ComfyError: + return ComfyError(f"Comfy did not answer at {base}. Check that it is running and that the address is right.", 502, "unreachable") + + +def _call(method: str, path: str, body=None, timeout: float = STATUS_TIMEOUT, headers: dict | None = None, + base: str | None = None) -> dict: + base = base or current_url() + data = None + extra = dict(headers or {}) + if isinstance(body, (dict, list)): + data = json.dumps(body).encode("utf-8") + extra["Content-Type"] = "application/json" + elif body is not None: + data = body + req = urllib.request.Request(base + PREFIX + path, data=data, headers=_headers(extra), method=method) + try: + with _opener(base).open(req, timeout=timeout) as resp: + raw = resp.read(MAX_JSON + 1) + except urllib.error.HTTPError as exc: + raise _error_of(exc) + except (urllib.error.URLError, OSError): + raise _unreachable(base) + if len(raw) > MAX_JSON: + raise ComfyError("Comfy sent back an answer too large to read.", 502) + try: + out = json.loads(raw.decode("utf-8", "replace")) + except ValueError: + raise ComfyError("Comfy answered with something that is not FormBridge's reply. Check the address.", 502) + if not isinstance(out, dict): + raise ComfyError("Comfy answered with something unreadable.", 502) + return out + + +def handshake(base: str | None = None) -> dict: + base = base or current_url() + try: + hs = _call("GET", "/handshake", base=base) + except ComfyError as exc: + if exc.code == "not_installed" or exc.status == 404: + return {"installed": False, "reachable": True, "message": missing_pack_message()} + return {"installed": False, "reachable": False, "message": str(exc)} + comfy = hs.get("comfyui") if isinstance(hs.get("comfyui"), dict) else {} + served = hs.get("contract") if isinstance(hs.get("contract"), list) else [] + out = {"installed": True, "reachable": True, "pack": hs.get("pack"), "contract": served, "comfy": comfy, + "supported": bool(comfy.get("supported")), "memory_profile": hs.get("memory_profile"), + "device": hs.get("device"), "limits": hs.get("limits"), "nodes": hs.get("nodes")} + if 1 not in served: + out["supported"] = False + out["message"] = "This FormBridge pack does not speak contract 1. Update Comfy-FormBridge-Suite." + elif not out["supported"]: + out["message"] = (f"This Comfy is version {comfy.get('version') or 'unknown'}; the FormBridge pack needs " + f"{comfy.get('minimum') or 'a newer one'} or newer. Update Comfy.") + return out + + +def _need_ready(base: str) -> dict: + hs = handshake(base) + if not hs["installed"]: + raise ComfyError(hs["message"], 503 if not hs.get("reachable") else 404, "not_installed") + if not hs["supported"]: + raise ComfyError(hs["message"], 409, "too_old") + return hs + + +def _check_workflow(wid: str) -> str: + if not _WORKFLOW_ID.match(wid or ""): + raise ComfyError("That workflow name is not valid.", 400, "bad_request") + return wid + + +def readiness(wid: str, base: str | None = None) -> dict: + return _call("GET", f"/workflows/{_check_workflow(wid)}/readiness", base=base) + + +def workflow(wid: str, base: str | None = None) -> dict: + return _call("GET", f"/workflows/{_check_workflow(wid)}", base=base) + + +def workflows() -> dict: + base = current_url() + hs = _need_ready(base) + listed = _call("GET", "/workflows", base=base).get("workflows") + items = [w for w in listed if isinstance(w, dict)] if isinstance(listed, list) else [] + for item in items: + try: + ready = readiness(str(item.get("id") or ""), base) + item["ready"] = bool(ready.get("ready")) + item["readiness"] = ready + except ComfyError: + item["ready"] = False + return {"workflows": items, "memory_profile": hs.get("memory_profile")} + + +_events: dict[str, dict] = {} +_follow: dict = {"task": None, "base": None, "last": 0.0} + + +def _remember(job: str, kind: str, data: dict) -> None: + entry = _events.setdefault(job, {}) + entry[kind] = data + entry["at"] = time.time() + if len(_events) > KEEP_EVENTS: + for old in sorted(_events, key=lambda k: _events[k].get("at", 0))[: len(_events) - KEEP_EVENTS]: + _events.pop(old, None) + + +def _ws_url(base: str) -> str: + parts = urllib.parse.urlsplit(base) + scheme = "wss" if parts.scheme == "https" else "ws" + return f"{scheme}://{parts.netloc}/ws?clientId={CLIENT_ID}" + + +async def _follower(base: str) -> None: + from websockets.asyncio.client import connect + + key = _key() + headers = {"X-FormBridge-Client": CLIENT} + if key: + headers["Authorization"] = "Bearer " + key + loopback = (urllib.parse.urlsplit(base).hostname or "").lower() in _LOOPBACK + while time.time() - _follow["last"] < 300: + try: + async with connect(_ws_url(base), additional_headers=headers, max_size=8 * 1024 * 1024, + open_timeout=STATUS_TIMEOUT, proxy=None if loopback else True) as ws: + async for message in ws: + if not isinstance(message, str): + continue + try: + msg = json.loads(message) + except ValueError: + continue + kind = msg.get("type") if isinstance(msg, dict) else None + data = msg.get("data") if isinstance(msg, dict) else None + if kind in ("formbridge.progress", "formbridge.preview", "formbridge.state") and isinstance(data, dict): + job = str(data.get("job") or "") + if _JOB_ID.match(job): + _remember(job, kind.split(".", 1)[1], data) + if time.time() - _follow["last"] > 300: + return + except asyncio.CancelledError: + raise + except Exception: + pass + await asyncio.sleep(2) + + +def follow(base: str) -> None: + _follow["last"] = time.time() + task = _follow["task"] + if task is not None and not task.done() and _follow["base"] == base: + return + if task is not None and not task.done(): + task.cancel() + _follow["base"] = base + _follow["task"] = asyncio.get_running_loop().create_task(_follower(base)) + + +def stop_follow() -> None: + task = _follow["task"] + if task is not None and not task.done(): + task.cancel() + + +def job_folder(name: str) -> Path: + path = config.jobs_dir() / (FOLDER_PREFIX + name) + path.mkdir(parents=True, exist_ok=True) + return path + + +def new_upload_folder() -> Path: + return job_folder("up-" + uuid.uuid4().hex) + + +def safe_name(name: str, fallback: str) -> str: + base = _SAFE.sub("-", Path(name or "").name).strip(".-")[:100] + return base or fallback + + +def _sniff_ext(path: Path) -> str: + with open(path, "rb") as f: + head = f.read(16) + if head[:8] == b"\x89PNG\r\n\x1a\n": + return ".png" + if head[:3] == b"\xff\xd8\xff": + return ".jpg" + if head[:4] == b"RIFF" and head[8:12] == b"WEBP": + return ".webp" + if head[:4] in (b"II*\x00", b"MM\x00*"): + return ".tif" + if head[:4] == b"\x76\x2f\x31\x01": + return ".exr" + if head[4:8] == b"ftyp": + return ".mov" if head[8:10] == b"qt" else ".mp4" + if head[:4] == b"\x1a\x45\xdf\xa3": + return ".webm" + return "" + + +def upload_input(kind: str, files: list[Path], base: str, fps: float | None = None) -> dict: + boundary = "fmcomfy" + uuid.uuid4().hex + pieces: list = [f'--{boundary}\r\nContent-Disposition: form-data; name="kind"\r\n\r\n{kind}\r\n'.encode("utf-8")] + if fps: + pieces.append(f'--{boundary}\r\nContent-Disposition: form-data; name="fps"\r\n\r\n{float(fps)!r}\r\n'.encode("utf-8")) + for path in files: + pieces.append(f'--{boundary}\r\nContent-Disposition: form-data; name="files"; filename="{path.name}"\r\n' + f"Content-Type: application/octet-stream\r\n\r\n".encode("utf-8")) + pieces.append(path) + pieces.append(b"\r\n") + pieces.append(f"--{boundary}--\r\n".encode("utf-8")) + size = sum(p.stat().st_size if isinstance(p, Path) else len(p) for p in pieces) + + def stream(): + for p in pieces: + if isinstance(p, Path): + with open(p, "rb") as src: + while chunk := src.read(1024 * 1024): + yield chunk + else: + yield p + + answer = _call("POST", "/inputs", body=stream(), timeout=LONG_TIMEOUT, base=base, + headers={"Content-Type": f"multipart/form-data; boundary={boundary}", "Content-Length": str(size)}) + found = answer.get("input") + if not isinstance(found, dict) or not found.get("id"): + raise ComfyError("Comfy did not take the uploaded picture.", 502) + return found + + +def _kind_for(slot_type: str, files: list[Path]) -> str: + if slot_type in STILL_KINDS: + return "still" + if slot_type == "frames": + return "sequence" + if slot_type == "movie": + return "movie" + if len(files) == 1 and files[0].suffix.lower() in MOVIE_EXT: + return "movie" + return "sequence" + + +def _named(files: list[Path]) -> list[Path]: + out = [] + for path in files: + if not path.suffix: + ext = _sniff_ext(path) + if ext: + renamed = path.with_name(path.name + ext) + path.rename(renamed) + path = renamed + out.append(path) + return out + + +def extract_source(slot: str, slot_type: str, spec: dict, folder: Path) -> list[Path]: + from app.routers.library import project_path + from app.services import ffmpeg as ff + + movie = str(spec.get("movie") or "") + asset = str(spec.get("asset") or "") + if not movie or not _ASSET_ID.match(asset): + raise ComfyError(f"The source for {slot} names no movie and asset.", 400, "bad_request") + try: + path = project_path(movie) + except Exception: + raise ComfyError("That movie name cannot be used.", 400, "bad_request") + if not path.is_file(): + raise ComfyError("That movie is not in the library.", 404, "not_found") + dest = folder / f"src-{safe_name(slot, 'slot')}" + dest.mkdir(exist_ok=True) + raw = dest / "source" + try: + with zipfile.ZipFile(path) as zin, zin.open(f"assets/{asset}") as src, open(raw, "wb") as out: + shutil.copyfileobj(src, out, 1024 * 1024) + except KeyError: + raise ComfyError("That picture or video is not in the movie.", 404, "not_found") + except (OSError, zipfile.BadZipFile): + raise ComfyError("The movie could not be read.", 409) + raw = _named([raw])[0] + if slot_type == "movie" or (slot_type == "video" and raw.suffix in MOVIE_EXT and not spec.get("frames")): + return [raw] + info = ff.probe() + if info is None: + raise ComfyError("Taking frames from a video needs ffmpeg. Add it in Preferences, Video Tools.", 409) + try: + start = max(0.0, float(spec.get("start") or 0)) + count = 1 if slot_type in STILL_KINDS else max(1, min(int(spec.get("frames") or 0) or 2000, 10000)) + fps = float(spec["fps"]) if spec.get("fps") else None + except (TypeError, ValueError, OverflowError): + raise ComfyError(f"The source for {slot} has a start, frame count or rate that is not a number.", 400, "bad_request") + frames = dest / "frames" + frames.mkdir(exist_ok=True) + args = [info.path, "-hide_banner", "-nostdin", "-loglevel", "error", "-protocol_whitelist", "file", + "-ss", f"{start:.6f}", "-i", str(raw), "-frames:v", str(count)] + if fps and slot_type not in STILL_KINDS: + args += ["-vf", f"fps={max(1.0, min(fps, 240.0)):.6f}"] + args += ["-y", str(frames / "frame_%05d.png")] + try: + done = subprocess.run(args, capture_output=True, timeout=LONG_TIMEOUT, check=False) + except (OSError, subprocess.SubprocessError): + raise ComfyError("ffmpeg could not take the frames.", 500) + out = sorted(frames.glob("frame_*.png")) + if done.returncode != 0 or not out: + raise ComfyError("ffmpeg could not take frames from that video.", 409) + return out + + +def start_job(wid: str, slots: dict, media: dict[str, list[Path]], sources: dict, folder: Path, reuse: bool) -> dict: + base = current_url() + _need_ready(base) + entry = workflow(wid, base) + types = {str(s.get("name")): str(s.get("type")) for s in entry.get("slots", []) if isinstance(s, dict)} + values = dict(slots) + for slot, spec in sources.items(): + if slot not in types or not isinstance(spec, dict): + raise ComfyError(f"The workflow has no picture slot named {slot}.", 400, "bad_slot") + media[slot] = extract_source(slot, types[slot], spec, folder) + for slot, files in media.items(): + kind = types.get(slot) + if kind is None: + raise ComfyError(f"The workflow has no picture slot named {slot}.", 400, "bad_slot") + files = _named(files) + if kind == "keyframes": + at = values.get(slot) + frames = at if isinstance(at, list) and len(at) == len(files) else list(range(0, 8 * len(files), 8)) + try: + numbers = [int(f if not isinstance(f, dict) else f.get("frame", 0)) for f in frames] + except (TypeError, ValueError, OverflowError): + raise ComfyError(f"The keyframes of {slot} must be frame numbers.", 400, "bad_slot") + if any(n < 0 or n % 8 for n in numbers): + raise ComfyError(f"The keyframes of {slot} must sit on frames 0, 8, 16 and so on.", 400, "bad_slot") + values[slot] = [{"frame": n, "input": upload_input("still", [p], base)["id"]} for n, p in zip(numbers, files)] + continue + upload_kind = _kind_for(kind, files) + if upload_kind == "still" and len(files) != 1: + raise ComfyError(f"The slot {slot} takes one picture.", 400, "bad_slot") + values[slot] = upload_input(upload_kind, files, base)["id"] + body = {"workflow": wid, "slots": values, "client_id": CLIENT_ID, "reuse": bool(reuse)} + answer = _call("POST", "/jobs", body=body, timeout=60, base=base) + job = answer.get("job") + if not isinstance(job, dict): + raise ComfyError("Comfy did not start the job.", 502) + return job + + +def _check_job(job_id: str) -> str: + if not _JOB_ID.match(job_id or ""): + raise ComfyError("That job id is not valid.", 400, "bad_request") + return job_id + + +def job_status(job_id: str) -> dict: + job = _call("GET", f"/jobs/{_check_job(job_id)}").get("job") + if not isinstance(job, dict): + raise ComfyError("Comfy answered without the job.", 502) + seen = _events.get(job_id, {}) + out: dict = {"job": job} + if job.get("state") == "running" and isinstance(seen.get("progress"), dict): + p = seen["progress"] + job["progress"] = {"value": p.get("value"), "max": p.get("max"), "node": p.get("node")} + preview = seen.get("preview") + if job.get("state") in ("queued", "running") and isinstance(preview, dict) and preview.get("image"): + mime = str(preview.get("mime") or "image/jpeg") + out["preview"] = {"step": preview.get("step"), "steps": preview.get("steps"), + "image": f"data:{mime};base64,{preview['image']}"} + if job.get("state") in ("done", "failed", "cancelled"): + _events.pop(job_id, None) + return out + + +def cancel_job(job_id: str) -> dict: + job = _call("POST", f"/jobs/{_check_job(job_id)}/cancel", body={}).get("job") + _events.pop(job_id, None) + return {"job": job} + + +def result_files(job: dict) -> list[dict]: + out = [] + for output in job.get("outputs") or []: + if not isinstance(output, dict): + continue + for f in output.get("files") or []: + if isinstance(f, dict) and _FILE_ID.match(str(f.get("file_id") or "")): + out.append({**f, "output": output.get("name"), "kind": output.get("kind")}) + return out + + +def fetch_file(job_id: str, n: int) -> tuple[Path, str]: + job = _call("GET", f"/jobs/{_check_job(job_id)}").get("job") or {} + if job.get("state") != "done": + raise ComfyError("That job has not finished yet.", 409, "not_ready") + files = result_files(job) + if n < 0 or n >= len(files): + raise ComfyError("That job has no such result file.", 404, "not_found") + item = files[n] + folder = job_folder(job_id) + dest = folder / f"{n:05d}-{safe_name(str(item.get('name') or ''), 'result')}" + meta = folder / (dest.name + ".type") + if dest.is_file() and meta.is_file(): + os.utime(folder) + return dest, meta.read_text("utf-8") or "application/octet-stream" + base = current_url() + req = urllib.request.Request(f"{base}{PREFIX}/files/{item['file_id']}", headers=_headers({"Accept": "*/*"})) + part = dest.with_name(dest.name + ".part") + try: + with _opener(base).open(req, timeout=LONG_TIMEOUT) as resp, open(part, "wb") as out: + ctype = resp.headers.get("Content-Type", "") or "application/octet-stream" + size = 0 + while True: + chunk = resp.read(1024 * 1024) + if not chunk: + break + size += len(chunk) + if size > MAX_FILE: + raise ComfyError("The result file is larger than 4 GB, so it was dropped.", 502) + out.write(chunk) + except urllib.error.HTTPError as exc: + part.unlink(missing_ok=True) + raise _error_of(exc) + except (urllib.error.URLError, OSError): + part.unlink(missing_ok=True) + raise _unreachable(base) + except ComfyError: + part.unlink(missing_ok=True) + raise + os.replace(part, dest) + meta.write_text(ctype.split(";")[0].strip(), "utf-8") + return dest, ctype.split(";")[0].strip() diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 77ce90a..f345599 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -729,6 +729,40 @@ Each line is a row with its **start** and **end** in seconds (type `12.5` or `1: Add Text from Create. Type the words, and the Text card opens: **font** (the bundled fonts and any you imported), **size**, **weight**, **color** and **alignment**. Double-click the block to edit again. Each change is one undo step. +## Generate with Comfy + +Generate sends pictures from your movie to a Comfy server and brings the result back as video blocks on the Timeline. It is for the desktop only: on iPad the command and the Preferences section are not there. FormMorpheus does not run the generation itself. The Comfy server does the work, so it needs Comfy-FormBridge-Suite installed in the server's `custom_nodes` folder, the models its workflows use, and some patience on a computer without a graphics card. + +### Connect to a server + +1. Open Preferences (Ctrl+,) and choose **Comfy**. Type the server's address in **Comfy server address**. The default is `http://127.0.0.1:8188`, a Comfy server on this computer. The `FORMMORPHEUS_COMFY_URL` variable, when you set it, wins over the saved address. +2. Press **Test**. The card says **Connected** with the address, or says in a sentence what is wrong: the server could not be reached, Comfy-FormBridge-Suite is not installed, or the server is too old and needs a newer version. +3. A server that asks for a sign-in key takes it in **Sign-in key**. **Save key** keeps it in this computer's keychain, never in the settings file, and it is sent only to that server. **Forget key** removes it. A computer with no keychain FormMorpheus can use says so and keeps no key. + +### Make something + +Open the card from Create · **Generate with Comfy...**. Pick a **Mode**, select what it needs on the Timeline, and press **Generate**. The card tells you in a sentence what to select until the selection fits, and says when the Comfy server has no workflow for the mode or is not ready for it. + +| Mode | Select | What you get | +|---|---|---| +| **Fluid shot from flipbook keyframes** | a Flipbook whose frames are the painted keyframes | a video that moves through your keyframes | +| **Animate a drawing** | a Drawing, a Flipbook or a picture | a video that brings it to life | +| **Erase on a video** | a video block, and a Drawing above it painted over the first frame | the video with the painted area taken out | +| **Add to a video** | a video block, and a Drawing above it painted over the first frame | the video with what you painted added | +| **Relight a video** | a video block, and a Drawing above it painted over the first frame | the video lit the way you painted | +| **Matte** | a video block | a matte of the subject | +| **Upscale** | a video block | the video at a larger size | + +The painted area of the Drawing above the video is what the server is told to change. Keyframes of a Flipbook snap to every eighth frame within the block. + +While it works, **Progress** shows the place in the queue, then a bar with Step of steps and a preview picture, and **Cancel** stops the job. When it is done the results are placed as one undo step: a new video block on a new track at the start of the source block, a mask on its own track when the mode makes one, and a note of where it came from kept with the video. The seed used is shown, and **Retry with another seed** runs the same job again for a different result. A caption or prompt result adds its words to the prompt box instead. + +**Not ready.** When the server lacks something, the card lists it in plain words: a missing node pack, missing nodes, or a missing model with its size and the folder to put it in, and a reminder to accept a model's terms at its source first when it needs that. Generate stays off until the server has everything. + +### Where it keeps things + +Results received wait in `comfy-` folders inside the **Jobs** folder of the data folder until the window has placed them, and the engine removes them after they have been idle for 30 minutes. The results you placed are part of the movie and are saved in the `.fmo` like any video, with their origin. + ## Export ![The Export card on its Quick share tab, with the Save to row under the tabs and the tiles for video, animated GIF, frames, sprite sheet and movie file.](img/export-card.webp) @@ -791,6 +825,7 @@ Open with Ctrl+, (File or Edit menu). The pages: - **Timeline**: undo steps, scrub speed (Precise, Medium or Fast, which also sets how fast scrubbing the frame strip moves), two and three-finger tap for undo and redo, and ask before deleting. - **Pen and Tablet**: the test pad, the pressure curve and what the pen's eraser end and buttons do (see Pen tablets). - **Video Tools** (desktop only): which ffmpeg FormMorpheus uses and what it can encode, and Download ffmpeg and Remove for the family's build (see Engine formats). +- **Comfy** (desktop only): the Comfy server's address, Test, and the sign-in key (see Generate with Comfy). - **Agents** (desktop only): whether outside agents may work on your movies, the address and command that connect a client, and a button that opens the terminal panel (see Agents). - **Interface** (GPU): **GPU compositing** draws the Stage and exports on the graphics card. It is on when the card is faster and gives the same picture as the processor, and otherwise the processor does the work. Open the app with `?gpu=force` at the end of the address to skip the speed test. @@ -837,6 +872,7 @@ An outside agent is a program on your computer, such as Claude Code, Codex, Curs - **Reads** run at once: the version, the library folder and what your ffmpeg can encode (`get_context`), the movie list (`list_movies`), one movie's size, frame rate, length, tracks and content (`get_movie`), a movie's poster and preview (`get_movie_picture`), the saved characters in your Characters library (`list_characters`), which voices are ready on this computer and what each can speak with (`list_voices`), a movie's subtitles with their look and each line's start and end in seconds and frames (`list_subtitles`), and the other commands (`list_commands`). `run_command` also reads Recently Deleted, the Exports folder, stacks, fonts and the encoders your ffmpeg has. - **Changes to the library** are made by `manage_movie`: create an empty movie, rename, duplicate, delete and restore. Delete moves a movie to Recently Deleted and never erases it. `run_command` also sets a movie's tags and its stack. - **Five always ask first**: `export_movie` makes a file in the Exports folder, `import_file` brings a picture, video, sound or font file into a movie and saves it, `add_character` puts a copy of a saved character into a movie at the Playhead (or a frame the agent names), as Add to Movie in the Characters panel does, and saves the movie, and `add_voice` speaks a line with the built-in voice, a voice app on this computer or an online voice and puts the sound on the movie's Timeline at the Playhead (or a frame the agent names), as AI Voice does, and saves the movie, and `set_subtitles` changes a movie's subtitles (lines in seconds or the text of a .srt or .vtt file, replacing or adding to the lines, making lines from AI voices, showing or hiding them and their look), as the Subtitles card does, and saves the movie. All five need the FormMorpheus window open. You approve each one in it, and the window opens that movie to carry it out (`add_character`, `add_voice` and `set_subtitles` use the movie already open when the agent names none). +- **Comfy**: `comfy_status` reads whether your Comfy server can be reached and is ready (it shows only whether a sign-in key is saved, never the key), `comfy_workflows` lists what the server can make and what it is missing, and `comfy_job` follows one job. `comfy_generate` always asks first: with your yes, the window sends the blocks selected on its Timeline to the Comfy server for a mode (fluid, animate, erase, add, relight, matte or upscale), waits for the job, places the results on new tracks and saves the movie. It waits up to 2 minutes for your answer and 30 minutes for the work, and it does not ask when the server cannot do the job anyway. Agents work only on FormMorpheus's own data: your movie library, your Characters library (the Characters folder in the data folder), Recently Deleted, the Exports folder and the added fonts. None of these tools reads another file or folder on your computer, and an import takes only a file that is already inside the library folder. A program you run in the terminal panel can still do whatever it can do on its own, as in any terminal. @@ -889,6 +925,12 @@ The terminal panel runs a shell and the agent programs beside the Stage and the Closing FormMorpheus ends every tab. +## New in 0.39.0 + +**Generate with Comfy.** Create · Generate with Comfy... sends the selected blocks to a Comfy server and brings the result back on new tracks, in one undo step. It makes a fluid shot from the keyframes of a Flipbook, animates a drawing, erases, adds or relights something in a video from a drawing painted over its first frame, makes a matte, or upscales a video. It needs Comfy-FormBridge-Suite on the server. Preferences · Comfy holds the server's address, Test and the sign-in key. Desktop only. See Generate with Comfy. + +**Agents and Comfy.** `comfy_status`, `comfy_workflows` and `comfy_job` read, and `comfy_generate` asks first. See Agents. + ## New in 0.38.0 **On iPad, AI Voice.** The Online tab works with your own key, kept in the iPad's Keychain. The built-in voice needs a computer; use Voice app with the address of a speech server on a computer on the same network, by number or by a `.local` name. Only an address on your own network is accepted, and the iPad asks once for local network access. See AI Voice. diff --git a/docs/api-contract.json b/docs/api-contract.json index c93c20f..f89b54b 100644 --- a/docs/api-contract.json +++ b/docs/api-contract.json @@ -1,5 +1,5 @@ { -"info":{"title":"formmorpheus","version":"0.38.1"}, +"info":{"title":"formmorpheus","version":"0.39.0"}, "openapi":"3.1.0", "paths":{ "/api/agent/claude/open":{"post":{"operationId":"claude_open_api_agent_claude_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaudeBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Claude Open Api Agent Claude Open Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Claude Open","tags":["terminal"]}}, @@ -27,6 +27,15 @@ "/api/characters/{name}":{"delete":{"operationId":"delete_character_api_characters__name__delete","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Delete Character Api Characters Name Delete","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Character"},"get":{"operationId":"read_character_api_characters__name__get","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Read Character"},"put":{"operationId":"write_character_api_characters__name__put","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Write Character Api Characters Name Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Write Character"}}, "/api/characters/{name}/poster":{"get":{"operationId":"read_poster_api_characters__name__poster_get","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}},{"in":"query","name":"v","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"V"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Read Poster"}}, "/api/characters/{name}/rename":{"post":{"operationId":"rename_character_api_characters__name__rename_post","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Rename Character Api Characters Name Rename Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Rename Character"}}, +"/api/comfy/jobs/{job_id}":{"get":{"operationId":"job_api_comfy_jobs__job_id__get","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Job Api Comfy Jobs Job Id Get","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Job","tags":["comfy"]}}, +"/api/comfy/jobs/{job_id}/cancel":{"post":{"operationId":"cancel_api_comfy_jobs__job_id__cancel_post","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Cancel Api Comfy Jobs Job Id Cancel Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Cancel","tags":["comfy"]}}, +"/api/comfy/jobs/{job_id}/files/{n}":{"get":{"operationId":"job_file_api_comfy_jobs__job_id__files__n__get","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"string"}},{"in":"path","name":"n","required":true,"schema":{"title":"N","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Job File","tags":["comfy"]}}, +"/api/comfy/key":{"delete":{"operationId":"delete_key_api_comfy_key_delete","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Delete Key Api Comfy Key Delete","type":"object"}}},"description":"Successful Response"}},"summary":"Delete Key","tags":["comfy"]},"put":{"operationId":"put_key_api_comfy_key_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__comfy__KeyBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Put Key Api Comfy Key Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Put Key","tags":["comfy"]}}, +"/api/comfy/run":{"post":{"operationId":"run_api_comfy_run_post","responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Run Api Comfy Run Post","type":"object"}}},"description":"Successful Response"}},"summary":"Run","tags":["comfy"]}}, +"/api/comfy/server":{"put":{"operationId":"server_api_comfy_server_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Server Api Comfy Server Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Server","tags":["comfy"]}}, +"/api/comfy/status":{"get":{"operationId":"status_api_comfy_status_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Status Api Comfy Status Get","type":"object"}}},"description":"Successful Response"}},"summary":"Status","tags":["comfy"]}}, +"/api/comfy/workflows":{"get":{"operationId":"workflows_api_comfy_workflows_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Workflows Api Comfy Workflows Get","type":"object"}}},"description":"Successful Response"}},"summary":"Workflows","tags":["comfy"]}}, +"/api/comfy/workflows/{wid}/readiness":{"get":{"operationId":"readiness_api_comfy_workflows__wid__readiness_get","parameters":[{"in":"path","name":"wid","required":true,"schema":{"title":"Wid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Readiness Api Comfy Workflows Wid Readiness Get","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Readiness","tags":["comfy"]}}, "/api/exports":{"get":{"operationId":"list_exports_api_exports_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response List Exports Api Exports Get","type":"object"}}},"description":"Successful Response"}},"summary":"List Exports"}}, "/api/exports/{name}":{"delete":{"operationId":"delete_export_api_exports__name__delete","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Delete Export Api Exports Name Delete","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Export"},"get":{"operationId":"read_export_api_exports__name__get","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Read Export"},"put":{"operationId":"write_export_api_exports__name__put","parameters":[{"in":"path","name":"name","required":true,"schema":{"title":"Name","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Write Export Api Exports Name Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Write Export"}}, "/api/files/read":{"get":{"description":"Streams a movie file from an absolute path the operating system handed the app (a double-click, Open With).","operationId":"read_file_api_files_read_get","parameters":[{"in":"query","name":"path","required":true,"schema":{"title":"Path","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Read File"}}, @@ -94,7 +103,7 @@ "/api/voice/builtin/voices":{"get":{"operationId":"builtin_voices_api_voice_builtin_voices_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Builtin Voices Api Voice Builtin Voices Get","type":"object"}}},"description":"Successful Response"}},"summary":"Builtin Voices","tags":["voice"]}}, "/api/voice/local":{"put":{"operationId":"local_save_api_voice_local_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Local Save Api Voice Local Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Local Save","tags":["voice"]}}, "/api/voice/local/probe":{"post":{"operationId":"local_probe_api_voice_local_probe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Local Probe Api Voice Local Probe Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Local Probe","tags":["voice"]}}, -"/api/voice/online/key":{"delete":{"operationId":"online_key_clear_api_voice_online_key_delete","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Online Key Clear Api Voice Online Key Delete","type":"object"}}},"description":"Successful Response"}},"summary":"Online Key Clear","tags":["voice"]},"put":{"operationId":"online_key_api_voice_online_key_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Online Key Api Voice Online Key Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Online Key","tags":["voice"]}}, +"/api/voice/online/key":{"delete":{"operationId":"online_key_clear_api_voice_online_key_delete","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Online Key Clear Api Voice Online Key Delete","type":"object"}}},"description":"Successful Response"}},"summary":"Online Key Clear","tags":["voice"]},"put":{"operationId":"online_key_api_voice_online_key_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__voice__KeyBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Online Key Api Voice Online Key Put","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Online Key","tags":["voice"]}}, "/api/voice/online/voices":{"get":{"operationId":"online_voices_api_voice_online_voices_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Online Voices Api Voice Online Voices Get","type":"object"}}},"description":"Successful Response"}},"summary":"Online Voices","tags":["voice"]}}, "/api/voice/speak":{"post":{"operationId":"speak_api_voice_speak_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Speak Api Voice Speak Post","type":"object"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Speak","tags":["voice"]}}, "/api/voice/status":{"get":{"operationId":"status_api_voice_status_get","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"title":"Response Status Api Voice Status Get","type":"object"}}},"description":"Successful Response"}},"summary":"Status","tags":["voice"]}}, @@ -115,7 +124,6 @@ "CopyToBody":{"properties":{"dir":{"title":"Dir","type":"string"}},"required":["dir"],"title":"CopyToBody","type":"object"}, "Entry":{"properties":{"dir":{"title":"Dir","type":"string"},"id":{"title":"Id","type":"string"}},"required":["id","dir"],"title":"Entry","type":"object"}, "HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}, -"KeyBody":{"properties":{"key":{"maxLength":400,"minLength":1,"title":"Key","type":"string"}},"required":["key"],"title":"KeyBody","type":"object"}, "LibraryBody":{"properties":{"copyMovies":{"default":false,"title":"Copymovies","type":"boolean"},"dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dir"}},"title":"LibraryBody","type":"object"}, "LocalBody":{"properties":{"base":{"default":"","maxLength":200,"title":"Base","type":"string"},"key":{"anyOf":[{"maxLength":400,"type":"string"},{"type":"null"}],"title":"Key"},"model":{"default":"","maxLength":120,"title":"Model","type":"string"},"voice":{"default":"","maxLength":120,"title":"Voice","type":"string"}},"title":"LocalBody","type":"object"}, "MakeBody":{"properties":{"lib":{"title":"Lib","type":"string"},"set":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set"}},"required":["lib"],"title":"MakeBody","type":"object"}, @@ -124,6 +132,7 @@ "OpenBody":{"properties":{"cols":{"default":100,"maximum":500.0,"minimum":10.0,"title":"Cols","type":"integer"},"cwd":{"anyOf":[{"maxLength":4096,"type":"string"},{"type":"null"}],"title":"Cwd"},"rows":{"default":30,"maximum":200.0,"minimum":4.0,"title":"Rows","type":"integer"},"title":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"title":"Title"}},"title":"OpenBody","type":"object"}, "ProbeBody":{"properties":{"base":{"maxLength":200,"minLength":1,"title":"Base","type":"string"}},"required":["base"],"title":"ProbeBody","type":"object"}, "RenameBody":{"properties":{"to":{"title":"To","type":"string"}},"required":["to"],"title":"RenameBody","type":"object"}, +"ServerBody":{"properties":{"url":{"default":"","maxLength":300,"title":"Url","type":"string"}},"title":"ServerBody","type":"object"}, "SizeBody":{"properties":{"cols":{"maximum":500.0,"minimum":10.0,"title":"Cols","type":"integer"},"rows":{"maximum":200.0,"minimum":4.0,"title":"Rows","type":"integer"}},"required":["cols","rows"],"title":"SizeBody","type":"object"}, "SpeakBody":{"properties":{"engine":{"default":"builtin","title":"Engine","type":"string"},"language":{"default":"","title":"Language","type":"string"},"model":{"default":"","title":"Model","type":"string"},"speed":{"default":1.0,"maximum":2.0,"minimum":0.5,"title":"Speed","type":"number"},"text":{"maxLength":10000,"minLength":1,"title":"Text","type":"string"},"voice":{"default":"","title":"Voice","type":"string"}},"required":["text"],"title":"SpeakBody","type":"object"}, "StackBody":{"properties":{"items":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Items"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"title":"StackBody","type":"object"}, @@ -131,7 +140,9 @@ "TagsBody":{"properties":{"tags":{"items":{"type":"string"},"title":"Tags","type":"array"}},"required":["tags"],"title":"TagsBody","type":"object"}, "ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}, "app__routers__brushes__OrderBody":{"properties":{"active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active"},"deleted":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Deleted"},"ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ids"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/Entry"},"type":"array"},{"type":"null"}],"title":"Items"},"level":{"enum":["root","lib","set"],"title":"Level","type":"string"},"lib":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lib"},"set":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set"}},"required":["level"],"title":"OrderBody","type":"object"}, -"app__routers__library__OrderBody":{"properties":{"order":{"items":{"type":"string"},"title":"Order","type":"array"},"stack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack"}},"required":["order"],"title":"OrderBody","type":"object"} +"app__routers__comfy__KeyBody":{"properties":{"key":{"maxLength":2000,"minLength":1,"title":"Key","type":"string"}},"required":["key"],"title":"KeyBody","type":"object"}, +"app__routers__library__OrderBody":{"properties":{"order":{"items":{"type":"string"},"title":"Order","type":"array"},"stack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack"}},"required":["order"],"title":"OrderBody","type":"object"}, +"app__routers__voice__KeyBody":{"properties":{"key":{"maxLength":400,"minLength":1,"title":"Key","type":"string"}},"required":["key"],"title":"KeyBody","type":"object"} }}, "x-websockets":["/api/penlink/desk","/api/recovery/{session}/live","/api/terminal/{sid}/stream"] } diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md index 0924877..024daa2 100644 --- a/frontend/HASHOUT_LOG.md +++ b/frontend/HASHOUT_LOG.md @@ -15,6 +15,26 @@ Last updated: 2026-11-29 · free library names compared the way the engine store - Under Licenses, a Third-party notices button opens the full licence texts the engine serves from `/api/notices` (THIRD-PARTY-NOTICES.txt, over a megabyte). They are asked for the first time the button opens them and set once as the text of a `pre` built with the dialog; a failed load says the same file is installed with the app and asks again next time. +## unreleased · Generate with Comfy + +- refers-to: ui/generate-panel.ts; ui/comfy-settings.ts; io/comfy-api.ts; app/features/comfy-generate.ts; app/app.ts (the `comfy-generate` command, `CREATE_MORE`); ui/settings-dialog.ts; engine/types.ts :: Asset.generated; engine/normalize.ts; app/agent-bridge.ts; styles/comfy-generate.css +- kind: decision +- logged: 2026-11-29 + +- The card is made the first time it opens and nothing is fetched before. Its forms are built once and toggled with `hidden`; the progress bar and the preview keep their space so a result arriving moves nothing. +- One mode-to-workflow map lives in the window (Fluid `video.fluid`, Animate `video.animate`, Erase `video.clean`, Add and Relight `video.shot`, Matte `video.matte`, Upscale `video.upscale`), so the card and the agent tool read one source of truth. Sources are the selected blocks. The paint-over is the selected Drawing or Flipbook, or the first one on a higher track that covers the video's start. +- Keyframes snap to multiples of 8 within the block, as the workflows expect. The mask is the paint-over's alpha, white on black. +- Results are placed directly (`importMedia`, `importSequence`, preload, `firstPictures`) inside one `engine.run` named `Comfy: <title>`, so the shot, the mask and the provenance are one undo step. The agent path (`runComfyFromAgent`) uses the same code and saves the movie afterwards, as `add_voice` does. +- `Asset.generated` is optional and passes through `.fmo` untouched; `normalize.ts` drops it when it has no workflow string, so a damaged note never blocks a movie from opening. +- The command, the Create entry and the Preferences section are skipped when `platform.kind === 'ipad'`. +- The mask track uses luminance mode, checked on a real run of `formbridge.selftest.matte` against a CPU Comfy: white keeps the result and black shows the source underneath. The shot and the matte land at the source's start, and one Undo removes both. +- The error box, the readiness list and the slot-form area keep a reserved minimum height and switch with `visibility` (class `is-empty`), not `display: none`, so the card, which is anchored at the bottom, never jumps after a fetch. +- The readiness that `GET /api/comfy/workflows` attaches to each workflow is used as is; `/readiness` is called only when it is missing. +- Slot type `media` (a still, a sequence or a movie) is filled the same way as `video`, `movie` and `frames`: the source block's file. +- The agent runs need the renderer and the video pool, which `BridgeDeps` does not carry, so the app registers them once through `setComfyDeps`. +- The close button uses the repo's `icon('close')`. +- The card stays anchored at the bottom like the other cards, but `place()` caps its height at the room below the menu bar (`innerHeight - barFloor() - 4`). When it would still reach above the bar, it raises its own `bottom`. It runs on show (before the first paint), on window resize and from a ResizeObserver, and changes only inline styles. The body scrolls inside the card; the header, error box, action row and status line stay outside the scroll. + ## unreleased · free library names compared the way the engine stores them ## v0.38.1 · free library names compared the way the engine stores them @@ -2359,3 +2379,22 @@ Found by painting through the real app (new movie, brush library, Color panel, C Review fixes. A folder drop stops reading further batches once the 2000 file cap is reached (it only stopped adding before, so a huge tree was still enumerated). The zip sniffer keeps at most 20000 entry names (the name list had no bound). The unsupported message uses `--space-3` for its gap. Law 7: the curve preset label "iPad" is now "Linked tablet" (id unchanged), and the Pen Link and Pen and Tablet sentences no longer name a handwriting feature or a tablet product ("Turn off handwriting-to-text on the tablet ...", "Link a tablet or another browser ..."). The three changed sentences have no translations yet and show in English until added. - Noted, not changed: the tracker now sees plain mouse strokes on the canvas, so Pen and Tablet shows the "looks like a mouse" line to a mouse-only person who painted before opening it; harmless. The pen settings page and the paste, GPU and engine encode paths were read and found sound. + +## menus under the bar · more-below hint + +### ui/menu.ts, ui/popover.ts, ui/content-menu.ts, styles/panels.css +- refers-to: menu.ts :: menuCap, barFloor, PopupMenu.openUnder, PopupMenu.openAt, PopupMenu.openBeside, PopupMenu.showMore, MenuBar.open; popover.ts :: Popover.showAt, Popover.openSub, Popover.place, Popover.showMore; content-menu.ts :: constructor +- kind: fix +- logged: 2026-11-29 + +Port of the FormVis 2.8.3 and 2.8.4 menu fix (FORM-MENU-OVERLAP-FIX 1.2.0). The bar called the right-click routine, which flips a long menu above its point and clamps it to 4 px from the window top, over the bar; submenus clamped to the window top too, and the CSS cap (`100vh - 48px`) was larger than the room under the bar. Removed: +- `b.menu.openAt(r.left, r.bottom + 4);` (MenuBar.open), now `openUnder`: top fixed under the button, inline `max-height` = `menuCap(top)` (75 percent of the window, never past the bottom) set before measuring. +- `const top = Math.max(4, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4));` (openAt, the Stage's right-click menu), now floored at `barFloor()` (`.cv-menubar` bottom + 4, or 4 when the bar is hidden for the system menu) with the same cap. +- `const y = Math.max(pad, Math.min(row.top - pad, window.innerHeight - h - pad));` (openBeside), now floored at the root menu's floor and capped. +- `this.panel.addEventListener('scroll', () => { if (this.panel.scrollTop !== this.subTop) this.closeSub(); }, { passive: true });` and every `this.panel` row read (insertBefore, children, scrollTop): the rows now live in `.cv-menu-list`, which scrolls; the card keeps its glass and holds the `.cv-menu-more` pill. Nothing outside menu.ts read the panel's children. +- panels.css `.cv-menu { ... scroll-padding-block: var(--space-1); }` moved to the list, and `.cv-menu:has(> .cv-menu-item:nth-child(n + 16))` (both rules) now reads `> .cv-menu-list > .cv-menu-item`, so long menus keep the compact rows. +- popover.ts `place`: `Math.max(MARGIN, ...)` for the top, and `openSub`'s `const y = Math.max(MARGIN, ...)`: a card opened at a point (`showAt`: every right-click card) now has `barFloor()` as its floor and `menuCap` as an inline cap; its submenus keep under the same floor and cap. `showFor` (anchored to a button) clears the inline cap and keeps the old 8 px margin, so cards opened from a button are as before. +- Hint: the FormVis rules verbatim (fade by a mask on the list, 56 x 12 pill, 160 ms out, 490 ms back, `no-fade` on opening, reduced motion has no fade). The `.has-more` and `.no-fade` rules are written without the `.cv-menu` prefix so a list card uses them too. Popover takes an opt-in third argument `list`: the rows go in a `.cv-menu-list` inside the card (`body` points at it) with the pill beside; only the Stage content menu (`fm-cm`, 36 rows, the longest right-click menu) opts in. Other popovers were not converted because several append to `pop.el` directly or lay out the card themselves (paint-feel, paint-tools, paint-clip, Movie Settings, the keyframe card); they get the floor and cap only. +- Behaviour kept: Popover cards clamp into the window instead of flipping at the pointer (as before); the menu-bar grow origin (`--fm-ox`, `--fm-oy`) is set in `openUnder`. No colours, glass, spacing or z-index changed; the system menu code (native-menu.ts) is untouched. +- Seen, not changed: the Generate with Comfy card (Create menu > More) opens with its top at -212 px in a 1280 x 800 window, over the bar, in the unchanged build as well; it is a fixed card, not a menu. +- Verified: `npx tsc --noEmit`; `npm run build`; `npx vitest run` (3419 passed, includes tests/unit/ui/menu.test.ts); headless Chrome over the production build served by the engine as setup/window_check does (uvicorn with FORMMORPHEUS_DIST), CPU 4x: every bar menu and Content > Add at 1871x1080, 1280x720, 1000x480, 800x320 (top 38 under a bar bottom of 33.5 in every frame, height at most 75 percent, last row by scroll and End); right-click Stage menu and content menu at 1280x800, 1871x1080, 1000x480 against a build of HEAD; hint timings at 1871x1080 unthrottled. diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 7dd6f4e..c01f047 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "formmorpheus", - "version": "0.38.1", + "version": "0.39.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "formmorpheus", - "version": "0.38.1", + "version": "0.39.0", "license": "Apache-2.0", "dependencies": { "@fontsource/anton": "5.3.0", diff --git a/frontend/package.json b/frontend/package.json index 95d8a86..3f47a32 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "formmorpheus", "private": true, - "version": "0.38.1", + "version": "0.39.0", "description": "FormMorpheus · animation studio in the Form family", "license": "Apache-2.0", "type": "module", diff --git a/frontend/src/app/agent-bridge.ts b/frontend/src/app/agent-bridge.ts index db358c2..415f57e 100644 --- a/frontend/src/app/agent-bridge.ts +++ b/frontend/src/app/agent-bridge.ts @@ -15,6 +15,7 @@ import type { Movie, SubtitleStyle, Track } from '../engine/types'; import { placeCharacter, unpackCharacter } from '../ui/characters-panel'; import { t } from '../ui/i18n'; import type { SpokenOnTimeline } from './voice-commands'; +import { runComfyFromAgent } from './features/comfy-generate'; export interface BridgeDeps { engine: Engine; @@ -174,6 +175,27 @@ export function startAgentBridge(d: BridgeDeps): void { return { ok: true, content: done.name, seconds: done.seconds, movie: d.engine.libraryName ?? d.engine.movie?.name ?? '', saved }; }; + const generate = async (a: Args): Promise<Result> => { + const name = text(a.movie); + if (name) { + const blocked = await front(name); + if (blocked) return { ok: false, error: blocked }; + } + if (!d.engine.movie) return { ok: false, error: t('FormMorpheus could not open that movie.') }; + const seed = whole(a.seed); + const slots = a.slots && typeof a.slots === 'object' && !Array.isArray(a.slots) ? (a.slots as Record<string, unknown>) : undefined; + let done: { blocks: number; text: string }; + try { + done = await runComfyFromAgent({ mode: text(a.mode), ...(text(a.prompt) ? { prompt: text(a.prompt) } : {}), ...(seed === undefined ? {} : { seed }), ...(slots ? { slots } : {}) }); + } catch (e) { + if (e instanceof ApiError) return { ok: false, error: e.message }; + throw e; + } + if (!done.blocks) return { ok: false, error: done.text || t('Comfy made nothing to add.') }; + const saved = await d.save(); + return { ok: true, blocks: done.blocks, text: done.text, movie: d.engine.libraryName ?? d.engine.movie?.name ?? '', saved }; + }; + const setSubtitles = async (a: Args): Promise<Result> => { const name = text(a.movie); if (name) { @@ -235,7 +257,7 @@ export function startAgentBridge(d: BridgeDeps): void { else { working = true; try { - result = item.kind === 'export_movie' ? await exportMovie(a) : item.kind === 'import_file' ? await importFile(item.id, a) : item.kind === 'add_character' ? await addCharacter(a) : item.kind === 'add_voice' ? await addVoice(a) : item.kind === 'set_subtitles' ? await setSubtitles(a) : { ok: false, error: t('This FormMorpheus window does not know that request.') }; + result = item.kind === 'export_movie' ? await exportMovie(a) : item.kind === 'import_file' ? await importFile(item.id, a) : item.kind === 'add_character' ? await addCharacter(a) : item.kind === 'add_voice' ? await addVoice(a) : item.kind === 'set_subtitles' ? await setSubtitles(a) : item.kind === 'comfy_generate' ? await generate(a) : { ok: false, error: t('This FormMorpheus window does not know that request.') }; } catch (e) { result = { ok: false, error: said(e, t('FormMorpheus could not do that.')) }; } diff --git a/frontend/src/app/app.ts b/frontend/src/app/app.ts index 62b680f..10d9072 100644 --- a/frontend/src/app/app.ts +++ b/frontend/src/app/app.ts @@ -37,6 +37,9 @@ import { ContentMenu } from '../ui/content-menu'; import { LipsyncDialog } from '../ui/lipsync-dialog'; import { VoicePanel } from '../ui/voice-panel'; import { AiVoicePanel } from '../ui/ai-voice-panel'; +import { GeneratePanel } from '../ui/generate-panel'; +import { COMFY_CHANGED, COMFY_SECTION } from '../ui/comfy-settings'; +import { setComfyDeps } from './features/comfy-generate'; import { SubtitlesPanel } from '../ui/subtitles-panel'; import type { SpeakRequest } from '../io/voice-api'; import { speakToTimeline } from './voice-commands'; @@ -142,7 +145,7 @@ const FLIP_RATES = [6, 8, 12, 15, 24, 30]; const FLIP_FPS_MENU = { label: 'Flipbook at frame rate', items: FLIP_RATES.map((n) => `add-flipbook-${n}`) }; /** The Create menu: what to make, then what to bring in. */ /** Under the card's More row: what the four tiles and three rows leave out. */ -const CREATE_MORE: CreateItem[] = [FLIP_FPS_MENU, ...SHAPE_CREATE_ITEMS, '-', 'import-audio', 'record-audio', 'ai-voice', 'subtitles', '-', 'create-opens-paint']; +const CREATE_MORE: CreateItem[] = [FLIP_FPS_MENU, ...SHAPE_CREATE_ITEMS, '-', 'import-audio', 'record-audio', 'ai-voice', 'subtitles', ...(platform.kind === 'ipad' ? [] : ['-', 'comfy-generate']), '-', 'create-opens-paint']; const CUSTOM_TITLE_KEY ='formmorpheus.customTitleBar'; const stored = (k: string): string | null => { try { return localStorage.getItem(k); } catch { return null; } }; const store = (k: string, v: string): void => { try { localStorage.setItem(k, v); } catch { /* this session only */ } }; @@ -728,6 +731,16 @@ export function startApp(): void { { id: 'record-audio', label: 'Record sound...', icon: 'audio', enabled: has, run: () => { aiVoice.close(); subtitlesPanel.close(); voicePanel.show(); } }, { id: 'ai-voice', label: 'AI Voice...', icon: 'audio', enabled: () => has(), run: () => { voicePanel.close(); subtitlesPanel.close(); aiVoice.show(); } }, { id: 'subtitles', label: 'Subtitles...', icon: 'text', enabled: has, run: () => { voicePanel.close(); aiVoice.close(); subtitlesPanel.show(); } }, + ...(platform.kind === 'ipad' ? [] : [(() => { + let gen: GeneratePanel | null = null; + setComfyDeps({ engine, renderer, video }); + document.addEventListener(COMFY_CHANGED, () => { if (gen?.isOpen) void gen.refresh(); }); + return { id: 'comfy-generate', label: 'Generate with Comfy...', icon: 'genPlug', enabled: () => has(), run: () => { + voicePanel.close(); aiVoice.close(); subtitlesPanel.close(); + gen ??= new GeneratePanel({ engine, renderer, video }, () => settings.show(COMFY_SECTION)); + gen.show(); + } }; + })()]), { id: 'sound-card', label: 'Sound options...', enabled: () => engine.selected.some((c) => c.kind === 'audio'), run: () => soundCard.show() }, { id: 'import-file', label: 'File...', icon: 'upload', enabled: has, run: () => pickFor(MEDIA_ACCEPT) }, { id: 'import-font', label: 'Import font...', enabled: has, run: () => pickFor('.otf,.ttf,.ttc,.woff,.woff2') }, diff --git a/frontend/src/app/features/comfy-generate.ts b/frontend/src/app/features/comfy-generate.ts new file mode 100644 index 0000000..acc2adc --- /dev/null +++ b/frontend/src/app/features/comfy-generate.ts @@ -0,0 +1,250 @@ +import type { Engine } from '../../engine/engine'; +import * as ops from '../../engine/ops'; +import type { Renderer } from '../../engine/render'; +import type { Asset, Content, Movie, Track } from '../../engine/types'; +import { importMedia, importSequence, type ImportResult } from '../../media/import'; +import { firstPictures } from '../../media/plan'; +import type { VideoPool } from '../../media/video'; +import { comfyApi, type ComfyJob, type ComfyJobState, type ComfyWorkflow } from '../../io/comfy-api'; + +export type ComfyMode = 'fluid' | 'animate' | 'erase' | 'add' | 'relight' | 'matte' | 'upscale'; +export const MODE_WORKFLOW: Record<ComfyMode, string> = { + fluid: 'video.fluid', animate: 'video.animate', erase: 'video.clean', add: 'video.shot', relight: 'video.shot', matte: 'video.matte', upscale: 'video.upscale', +}; +export const MODE_LABEL: Record<ComfyMode, string> = { + fluid: 'Fluid shot from flipbook keyframes', animate: 'Animate a drawing', erase: 'Erase on a video', add: 'Add to a video', relight: 'Relight a video', matte: 'Matte', upscale: 'Upscale', +}; +export const MODES = Object.keys(MODE_WORKFLOW) as ComfyMode[]; + +export interface ComfyDeps { engine: Engine; renderer: Renderer; video: VideoPool } +export interface Sources { video: Content | null; paint: Content | null; flip: Content | null; still: Content | null } +export interface Placed { blocks: number; text: string } + +const PAINTED: ReadonlyArray<Content['kind']> = ['drawing', 'flipbook', 'image']; +const isMedia = (type: string): boolean => ['image', 'mask', 'frames', 'movie', 'video', 'media', 'keyframes'].includes(type); +export const plainSlot = (type: string): boolean => !isMedia(type) && type !== 'points'; + +function find(tracks: Track[], id: string): { c: Content; row: number } | null { + for (let i = 0; i < tracks.length; i++) for (const c of tracks[i].content) if (c.id === id) return { c, row: i }; + return null; +} + +export function sources(engine: Engine): Sources { + const m = engine.movie; + const out: Sources = { video: null, paint: null, flip: null, still: null }; + if (!m) return out; + const picked = engine.selection.content.map((id) => find(m.tracks, id)).filter((x): x is { c: Content; row: number } => !!x); + const vid = picked.find((x) => x.c.kind === 'video'); + out.video = vid?.c ?? null; + out.flip = picked.find((x) => x.c.kind === 'flipbook')?.c ?? null; + const painted = picked.find((x) => PAINTED.includes(x.c.kind)); + out.still = painted?.c ?? null; + if (vid) { + const over = picked.find((x) => x.c.kind === 'drawing' || x.c.kind === 'flipbook'); + if (over) out.paint = over.c; + else for (let r = vid.row - 1; r >= 0 && !out.paint; r--) { + const hit = m.tracks[r].content.find((c) => (c.kind === 'drawing' || c.kind === 'flipbook') && c.start <= vid.c.start && c.start + c.duration > vid.c.start); + if (hit) out.paint = hit; + } + } + return out; +} + +export function missing(mode: ComfyMode, s: Sources): string { + if (mode === 'fluid') return s.flip ? '' : 'Select a Flipbook with the painted keyframes.'; + if (mode === 'animate') return s.still ? '' : 'Select a Drawing, Flipbook or picture to animate.'; + if (!s.video) return 'Select a video block.'; + if ((mode === 'erase' || mode === 'add' || mode === 'relight') && !s.paint) return 'Paint over the video\'s first frame on a Drawing above it.'; + return ''; +} + +function canvas(m: Movie): HTMLCanvasElement { + const c = document.createElement('canvas'); + c.width = m.width; + c.height = m.height; + return c; +} + +const png = (c: HTMLCanvasElement, name: string): Promise<File> => new Promise((res, rej) => c.toBlob((b) => (b ? res(new File([b], name, { type: 'image/png' })) : rej(new Error('The picture could not be made.'))), 'image/png')); + +function draw(d: ComfyDeps, m: Movie, c: Content, local: number, into: HTMLCanvasElement): void { + d.renderer.thumb(into.getContext('2d') as CanvasRenderingContext2D, m, c, local, m.width, m.height); +} + +async function still(d: ComfyDeps, m: Movie, blocks: Array<{ c: Content; local: number }>, name: string): Promise<File> { + await firstPictures(d.video, m, blocks.map((b) => b.c)); + const cv = canvas(m); + for (const b of blocks) draw(d, m, b.c, b.local, cv); + return png(cv, name); +} + +async function paintMask(d: ComfyDeps, m: Movie, paint: Content, local: number): Promise<File> { + const cv = canvas(m); + draw(d, m, paint, local, cv); + const ctx = cv.getContext('2d') as CanvasRenderingContext2D; + const img = ctx.getImageData(0, 0, cv.width, cv.height); + const p = img.data; + for (let i = 0; i < p.length; i += 4) { const v = p[i + 3] > 8 ? 255 : 0; p[i] = v; p[i + 1] = v; p[i + 2] = v; p[i + 3] = 255; } + ctx.putImageData(img, 0, 0); + return png(cv, 'mask.png'); +} + +// the video workflows step on an 8k+1 grid +function keyFrames(c: Content): number[] { + const row = c.flip.find((f) => !f.hidden) ?? c.flip[0]; + if (!row) return [0]; + const out = new Set<number>(); + let at = 0; + for (const f of row.frames) { + if (at >= c.duration) break; + out.add(Math.min(Math.round(at / 8) * 8, Math.floor((c.duration - 1) / 8) * 8)); + at += Math.max(1, f.hold); + } + return [...out].sort((a, b) => a - b); +} + +function videoFile(d: ComfyDeps, m: Movie, c: Content): File { + const a = c.asset ? m.assets[c.asset] : undefined; + const blob = c.asset ? d.engine.assets.get(c.asset) : undefined; + if (!a || !blob) throw new Error('The video block\'s file is not loaded.'); + return new File([blob], a.name || 'source.mp4', { type: a.mime || blob.type }); +} + +export function anchor(mode: ComfyMode, s: Sources): Content | null { + return mode === 'fluid' ? s.flip : mode === 'animate' ? s.still : s.video; +} + +export async function collect(d: ComfyDeps, mode: ComfyMode, wf: ComfyWorkflow, s: Sources): Promise<{ files: Array<{ slot: string; file: File }>; slots: Record<string, unknown> }> { + const m = d.engine.movie; + if (!m) throw new Error('Open a movie first.'); + const files: Array<{ slot: string; file: File }> = []; + const slots: Record<string, unknown> = {}; + for (const slot of wf.slots) { + const t = slot.type; + if (t === 'video' || t === 'movie' || t === 'frames' || t === 'media') { + if (s.video && mode !== 'fluid' && mode !== 'animate') files.push({ slot: slot.name, file: videoFile(d, m, s.video) }); + } else if (t === 'mask') { + if (s.paint) files.push({ slot: slot.name, file: await paintMask(d, m, s.paint, Math.max(0, (s.video?.start ?? s.paint.start) - s.paint.start)) }); + } else if (t === 'image') { + let blocks: Array<{ c: Content; local: number }> = []; + if (mode === 'fluid' && s.flip) blocks = [{ c: s.flip, local: 0 }]; + else if (mode === 'animate' && s.still) blocks = [{ c: s.still, local: 0 }]; + else if (s.video) { + blocks = [{ c: s.video, local: 0 }]; + if (s.paint && (mode === 'add' || mode === 'relight')) blocks.push({ c: s.paint, local: Math.max(0, s.video.start - s.paint.start) }); + } + if (blocks.length) files.push({ slot: slot.name, file: await still(d, m, blocks, 'first.png') }); + } else if (t === 'keyframes' && s.flip) { + const list: number[] = []; + for (const f of keyFrames(s.flip)) { + const name = `key-${String(f).padStart(5, '0')}.png`; + files.push({ slot: slot.name, file: await still(d, m, [{ c: s.flip, local: f }], name) }); + list.push(f); + } + slots[slot.name] = list; + } + } + return { files, slots }; +} + +const SLEEP = (ms: number, signal: AbortSignal): Promise<void> => new Promise((res) => { + const id = window.setTimeout(res, ms); + signal.addEventListener('abort', () => { window.clearTimeout(id); res(); }, { once: true }); +}); + +export async function follow(job: ComfyJob, tick: (s: ComfyJobState) => void, signal: AbortSignal): Promise<ComfyJob> { + let cur = job; + while (cur.state === 'queued' || cur.state === 'running') { + await SLEEP(600, signal); + if (signal.aborted) return cur; + try { + const s = await comfyApi.job(cur.id); + cur = s.job; + tick(s); + } catch (e) { + if (signal.aborted) return cur; + throw e; + } + } + return cur; +} + +const EXT: Record<string, string> = { 'video/mp4': 'mp4', 'video/webm': 'webm', 'video/quicktime': 'mov', 'image/png': 'png', 'image/webp': 'webp', 'image/jpeg': 'jpg' }; + +export async function land(d: ComfyDeps, mode: ComfyMode, wf: ComfyWorkflow, job: ComfyJob, s: Sources, prompt: string, signal: AbortSignal): Promise<Placed> { + const m = d.engine.movie; + const at = anchor(mode, s); + if (!m || !at) return { blocks: 0, text: '' }; + const fps = m.fps; + let n = 0; + let text = ''; + const got: Array<{ r: ImportResult; mask: boolean }> = []; + for (const out of job.outputs ?? []) { + const blobs: File[] = []; + for (const f of out.files) { + const b = await comfyApi.file(job.id, n++, signal); + blobs.push(new File([b], f.name || `result.${EXT[b.type] ?? 'bin'}`, { type: b.type })); + } + if (out.kind === 'text') { text = out.text ?? (blobs[0] ? await blobs[0].text() : ''); continue; } + if (!blobs.length) continue; + const mask = out.kind === 'mask' || out.kind === 'matte'; + const r = blobs.length > 1 || out.kind === 'frames' + ? await importSequence(blobs, m, at.start, out.fps || fps) + : await importMedia(blobs[0], m, at.start); + got.push({ r, mask }); + } + if (!got.length) return { blocks: 0, text }; + const all = got.flatMap((g) => g.r.assets); + const pics = new Map<string, Blob>(); + for (const { asset, blob } of all) { d.engine.assets.set(asset.id, blob); if (asset.kind === 'image' || asset.kind === 'pixels') pics.set(asset.id, blob); } + await d.renderer.preload(pics); + await firstPictures(d.video, m, got.flatMap((g) => g.r.contents)); + const note: NonNullable<Asset['generated']> = { workflow: wf.id, version: wf.version, mode, seed: job.seed_used ?? -1, job: job.id, ...(prompt ? { prompt } : {}), source: at.id }; + const table = Object.fromEntries(all.map((a) => [a.asset.id, { ...a.asset, generated: note }])); + let blocks = 0; + d.engine.run(`Comfy: ${wf.title}`, (mv: Movie) => { + let next: Movie = { ...mv, assets: { ...mv.assets, ...table } }; + const row = Math.max(0, next.tracks.findIndex((tr) => tr.content.some((c) => c.id === at.id))); + const ids: string[] = []; + // masks last so each sits directly over what it cuts + for (const g of [...got.filter((x) => !x.mask), ...got.filter((x) => x.mask)]) { + for (const c0 of g.r.contents) { + const c: Content = { ...c0, start: at.start, ...(g.mask ? { mask: 'luminance' as const } : {}) }; + const added = ops.addTrack(next, row, c.name); + next = ops.placeContent(added.movie, added.track.id, c, row).movie; + ids.push(c.id); + } + } + blocks = ids.length; + return { movie: next, select: ids }; + }); + return { blocks, text }; +} + +export const randomSeed = (): number => Math.floor(Math.random() * 2 ** 31); + +let shared: ComfyDeps | null = null; +// BridgeDeps carries no renderer or video pool +export function setComfyDeps(d: ComfyDeps): void { shared = d; } + +export async function runComfyFromAgent(req: { mode: string; prompt?: string; seed?: number; slots?: Record<string, unknown> }): Promise<Placed> { + const d = shared; + if (!d || !d.engine.movie) return { blocks: 0, text: 'Open a movie first.' }; + if (!(MODES as string[]).includes(req.mode)) return { blocks: 0, text: `Unknown mode. Use one of: ${MODES.join(', ')}.` }; + const mode = req.mode as ComfyMode; + const wf = (await comfyApi.workflows()).find((w) => w.id === MODE_WORKFLOW[mode]); + if (!wf) return { blocks: 0, text: 'This Comfy server has no workflow for this mode.' }; + const s = sources(d.engine); + const need = missing(mode, s); + if (need) return { blocks: 0, text: need }; + const media = await collect(d, mode, wf, s); + const values: Record<string, unknown> = { ...(req.slots ?? {}), ...media.slots }; + for (const slot of wf.slots) { + if (req.prompt !== undefined && slot.type === 'text' && /prompt/i.test(slot.name) && !/neg/i.test(slot.name)) values[slot.name] = req.prompt; + if (req.seed !== undefined && slot.type === 'seed') values[slot.name] = req.seed; + } + const ctrl = new AbortController(); + const job = await follow(await comfyApi.run(wf.id, values, media.files, true, ctrl.signal), () => undefined, ctrl.signal); + if (job.state !== 'done') return { blocks: 0, text: job.error?.message || 'The job did not finish.' }; + return land(d, mode, wf, job, s, req.prompt ?? '', ctrl.signal); +} diff --git a/frontend/src/engine/normalize.ts b/frontend/src/engine/normalize.ts index 75f86a8..b0accf2 100644 --- a/frontend/src/engine/normalize.ts +++ b/frontend/src/engine/normalize.ts @@ -231,6 +231,7 @@ export function normalizeMovie(raw: unknown): Movie { m.onion = onion(isObj(m.onion) ? m.onion : {}); m.tracks = trackList(m.tracks); m.assets = isObj(m.assets) ? m.assets : {}; + for (const a of Object.values(m.assets as Obj)) if (isObj(a) && 'generated' in a && !(isObj(a.generated) && typeof a.generated.workflow === 'string')) delete a.generated; if (isObj(m.camera)) { const cam: Obj = { ...m.camera }; laneSplit(cam); m.camera = cam; } else delete m.camera; // a guide line's role comes from the file: only the floor is known diff --git a/frontend/src/engine/types.ts b/frontend/src/engine/types.ts index 06980ad..77e77c2 100644 --- a/frontend/src/engine/types.ts +++ b/frontend/src/engine/types.ts @@ -426,6 +426,8 @@ export interface Asset { spoken?: { text: string; engine: 'builtin' | 'local' | 'online'; voice: string; cues: Array<{ start: number; end: number; text: string }> }; /** Fonts: the family name registered for Text content. */ family?: string; + /** Made on a Comfy server: the workflow, the mode, the seed it used, the job, the prompt and the block it was made from. */ + generated?: { workflow: string; version: number; mode: string; seed: number; job: string; prompt?: string; source?: string }; } /** One subtitle line: shown from movie frame `start` up to, not including, `end`. `from` is the sound block it was made from, so making them again replaces only those. */ diff --git a/frontend/src/io/comfy-api.ts b/frontend/src/io/comfy-api.ts new file mode 100644 index 0000000..dd0af25 --- /dev/null +++ b/frontend/src/io/comfy-api.ts @@ -0,0 +1,103 @@ +// the page never talks to Comfy directly: the CSP allows only the engine +import { ApiError, serviceReady } from './api'; + +export type SlotType = 'text' | 'int' | 'float' | 'bool' | 'seed' | 'choice' | 'image' | 'mask' | 'frames' | 'movie' | 'video' | 'points' | 'keyframes' | 'size' | 'media'; +export interface ComfySlot { name: string; type: SlotType; required: boolean; default?: unknown; min?: number; max?: number; step?: number; choices?: string[]; description?: string } +export interface ComfyOutputDef { name: string; kind: 'image' | 'frames' | 'movie' | 'mask' | 'matte' | 'text'; description?: string } +export interface ComfyWorkflow { id: string; version: number; title: string; task?: string; description?: string; media: 'still' | 'video' | 'text'; slots: ComfySlot[]; outputs: ComfyOutputDef[]; ready?: boolean; readiness?: ComfyReadiness } +export interface ComfyModel { folder: string; file: string; role?: string; present: boolean; size_mb?: number; gated?: boolean; source?: string; place?: string } +export interface ComfyReadiness { ready: boolean; nodes: Array<{ class: string; present: boolean }>; packs: Array<{ name: string; present: boolean }>; models: ComfyModel[] } +export interface ComfyStatus { + url: string; + hasKey?: boolean; + canStore?: boolean; + reachable?: boolean; + installed: boolean; + supported?: boolean; + message?: string; + pack?: { name: string; version: string }; + comfy?: { version: string; minimum: string; supported: boolean }; + device?: { name: string; vram_mb: number; ram_mb: number }; + memory_profile?: string; +} +export interface ComfyFile { file_id: string; name: string; bytes: number; frame?: number } +export interface ComfyOutput { name?: string; kind: ComfyOutputDef['kind']; width: number; height: number; frames: number; fps: number; files: ComfyFile[]; text?: string } +export interface ComfyJob { + id: string; + workflow: string; + state: 'queued' | 'running' | 'done' | 'failed' | 'cancelled'; + queue_position?: number; + progress?: { value: number; max: number; node?: string }; + seed_used?: number; + cached?: boolean; + retried?: boolean; + outputs?: ComfyOutput[]; + error?: { code: string; message: string }; +} +export interface ComfyPreview { step: number; steps: number; image: string } +export interface ComfyJobState { job: ComfyJob; preview?: ComfyPreview } + +const NOT_RUNNING = 'The FormMorpheus engine service is not running. Start it with ./formmorpheus.'; +const json = { 'Content-Type': 'application/json' }; + +async function call(path: string, init?: RequestInit): Promise<Response> { + if (!(await serviceReady())) throw new ApiError(NOT_RUNNING, 0); + let res: Response; + try { res = await fetch(`/api/comfy${path}`, init); } catch (e) { + if (e instanceof DOMException && e.name === 'AbortError') throw e; + throw new ApiError(NOT_RUNNING, 0); + } + if (!res.ok) { + let detail = ''; + try { + const body = (await res.json()) as { detail?: unknown }; + const d = body?.detail as { message?: unknown } | string | undefined; + if (typeof d === 'string') detail = d; + else if (d && typeof d.message === 'string') detail = d.message; + } catch { /* not JSON */ } + throw new ApiError(detail || res.statusText || `Request failed (${res.status})`, res.status); + } + return res; +} + +const send = (method: string, body?: unknown, signal?: AbortSignal): RequestInit => ({ method, ...(body === undefined ? {} : { headers: json, body: JSON.stringify(body) }), ...(signal ? { signal } : {}) }); +const enc = encodeURIComponent; +const flat = (raw: unknown): ComfyStatus => { + const r = raw as Omit<ComfyStatus, 'installed'> & { handshake?: Partial<ComfyStatus> }; + return { ...r, ...(r.handshake ?? {}), url: r.url, installed: !!r.handshake?.installed } as ComfyStatus; +}; + +export const comfyApi = { + async status(): Promise<ComfyStatus> { return flat(await (await call('/status')).json()); }, + async setServer(url: string): Promise<ComfyStatus> { return flat(await (await call('/server', send('PUT', { url }))).json()); }, + async setKey(key: string): Promise<ComfyStatus> { await call('/key', send('PUT', { key })); return comfyApi.status(); }, + async clearKey(): Promise<ComfyStatus> { await call('/key', send('DELETE')); return comfyApi.status(); }, + async workflows(): Promise<ComfyWorkflow[]> { return ((await (await call('/workflows')).json()) as { workflows: ComfyWorkflow[] }).workflows ?? []; }, + async readiness(id: string): Promise<ComfyReadiness> { return (await (await call(`/workflows/${enc(id)}/readiness`)).json()) as ComfyReadiness; }, + async run(workflow: string, slots: Record<string, unknown>, files: Array<{ slot: string; file: File }>, reuse = true, signal?: AbortSignal): Promise<ComfyJob> { + const form = new FormData(); + form.append('workflow', workflow); + form.append('slots', JSON.stringify(slots)); + form.append('reuse', reuse ? 'true' : 'false'); + for (const f of files) form.append(f.slot, f.file, f.file.name); + return ((await (await call('/run', { method: 'POST', body: form, ...(signal ? { signal } : {}) })).json()) as { job: ComfyJob }).job; + }, + async job(id: string): Promise<ComfyJobState> { return (await (await call(`/jobs/${enc(id)}`)).json()) as ComfyJobState; }, + async file(id: string, n: number, signal?: AbortSignal): Promise<Blob> { return (await call(`/jobs/${enc(id)}/files/${n}`, signal ? { signal } : undefined)).blob(); }, + async cancel(id: string): Promise<ComfyJob> { return ((await (await call(`/jobs/${enc(id)}/cancel`, send('POST'))).json()) as { job: ComfyJob }).job; }, +}; + +export function readinessWords(r: ComfyReadiness, tr: (s: string) => string): string[] { + if (r.ready) return []; + const out: string[] = []; + for (const p of r.packs ?? []) if (!p.present) out.push(tr('Missing node pack: {name}').replace('{name}', p.name)); + const nodes = (r.nodes ?? []).filter((n) => !n.present).map((n) => n.class); + if (nodes.length) out.push(tr('Missing nodes: {names}').replace('{names}', nodes.join(', '))); + for (const m of r.models ?? []) { + if (m.present) continue; + const size = m.size_mb ? ` (${Math.round(m.size_mb)} MB)` : ''; + out.push(tr('Missing model {file}{size}: put it in {place}').replace('{file}', m.file).replace('{size}', size).replace('{place}', m.place || m.folder) + (m.gated ? ` · ${tr('accept its terms at the source first')}` : '')); + } + if (!out.length) out.push(tr('This workflow is not ready on the Comfy server.')); + return out; +} diff --git a/frontend/src/styles/comfy-generate.css b/frontend/src/styles/comfy-generate.css new file mode 100644 index 0000000..c26f9ea --- /dev/null +++ b/frontend/src/styles/comfy-generate.css @@ -0,0 +1,79 @@ +/* The Generate card (ui/generate-panel.ts) and the Comfy part of Preferences (ui/comfy-settings.ts). */ +.fm-gen { + position: fixed; + inset-inline-end: var(--space-4); + bottom: calc(var(--space-4) + var(--cv-row-h) * 5.5); + z-index: var(--z-companion); + width: calc(var(--space-8) * 11); + max-width: calc(100vw - var(--space-8)); + max-height: calc(100vh - var(--space-6)); + display: flex; + flex-direction: column; + overflow: hidden; + padding: var(--space-3); + background: var(--glass-solid-bg); + border: 1px solid var(--glass-border); + border-radius: var(--radius-pop); + box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow); + -webkit-backdrop-filter: var(--glass-filter); + backdrop-filter: var(--glass-filter); + color: var(--text-primary); + font-size: var(--fs-13); + text-align: start; +} +.fm-gen[hidden], .fm-gen [hidden] { display: none; } + +.fm-gen-head, .fm-gen-err, .fm-gen > .fm-gen-acts, .fm-gen > .fm-gen-line { flex: none; } +.fm-gen-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; } +.fm-gen > .fm-gen-acts { margin-block-start: var(--space-2); } +.fm-gen > .fm-gen-line { margin-block-end: 0; } +.fm-gen-head { display: flex; align-items: center; gap: var(--space-2); margin-block-end: var(--space-2); font-weight: 600; } +.fm-gen-icon { line-height: 0; color: var(--text-secondary); } +.fm-gen-title { flex: 1; } +.fm-gen-x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: calc(var(--space-1) / 2); border-radius: var(--radius-sm); line-height: 0; } +.fm-gen-x:hover { color: var(--text-primary); background: var(--surface-raised); } + +.fm-gen-err { margin: 0 0 var(--space-2); padding: var(--space-2); border: 1px solid var(--danger-fill); border-radius: var(--radius-md); color: var(--danger-text); font-size: var(--fs-12); line-height: 1.4; overflow-wrap: anywhere; min-height: calc(1.4em * 2 + var(--space-2) * 2); } +.fm-gen-err.is-empty { visibility: hidden; } + +.fm-gen-server { display: flex; align-items: center; gap: var(--space-2); margin-block-end: var(--space-2); font-size: var(--fs-12); color: var(--text-secondary); } +.fm-gen-servertext { flex: 1; min-width: 0; overflow-wrap: anywhere; } +.fm-gen-dot { flex: none; width: var(--space-2); height: var(--space-2); border-radius: 50%; background: var(--text-muted); } +.fm-gen-dot.is-up { background: var(--ok); } +.fm-gen-dot.is-down { background: var(--danger-text); } + +.fm-gen-row { display: grid; grid-template-columns: calc(var(--space-8) * 2 + var(--space-5)) minmax(0, 1fr); gap: var(--space-2); align-items: center; margin-block-end: var(--space-2); } +.fm-gen-lab { color: var(--text-secondary); font-size: var(--fs-12); overflow-wrap: anywhere; } +.fm-gen-row .cv-input { width: 100%; min-width: 0; } +.fm-gen-row input[type="checkbox"] { justify-self: start; accent-color: var(--accent-color); } +.fm-gen-split { display: flex; gap: var(--space-2); min-width: 0; } +.fm-gen-split .cv-input { flex: 1; min-width: 0; } +.fm-gen-text { resize: vertical; } + +.fm-gen-line { min-height: 1.4em; margin-block-end: var(--space-2); color: var(--text-secondary); font-size: var(--fs-12); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } +.fm-gen-line.is-warn { color: var(--warn); } +.fm-gen-ready { margin: 0 0 var(--space-2); padding-inline-start: var(--space-4); color: var(--warn); font-size: var(--fs-12); line-height: 1.4; overflow-wrap: anywhere; min-height: calc(1.4em * 3); } +.fm-gen-ready.is-empty { visibility: hidden; } +.fm-gen-form { min-height: calc(var(--ctl-sm) * 6 + var(--space-2) * 6); } + +/* the bar and the preview keep their boxes while idle so a run moves nothing */ +.fm-gen-prog { position: relative; height: var(--space-2); margin-block: var(--space-2); border-radius: var(--radius-sm); background: var(--bg-input); border: 1px solid var(--border-light); overflow: hidden; } +.fm-gen-prog.is-idle { visibility: hidden; } +.fm-gen-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: calc(var(--p, 0) * 100%); background: var(--accent-color); transition: width var(--dur-fast) linear; } +.fm-gen-prog.is-busy .fm-gen-fill { width: 30%; transition: none; animation: fm-gen-sweep 1.2s ease-in-out infinite; } +@keyframes fm-gen-sweep { from { inset-inline-start: -30%; } to { inset-inline-start: 100%; } } +@media (prefers-reduced-motion: reduce) { .fm-gen-prog.is-busy .fm-gen-fill { animation: none; width: 100%; opacity: 0.5; } } + +.fm-gen-preview { aspect-ratio: 16 / 9; margin-block-end: var(--space-2); border-radius: var(--radius-md); background: var(--surface-field); border: 1px solid var(--border-light); overflow: hidden; } +.fm-gen-preview img { display: block; width: 100%; height: 100%; object-fit: contain; } +.fm-gen-preview.is-empty img { visibility: hidden; } + +.fm-gen-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-end: var(--space-2); } +.fm-gen-go { flex: 1; } +.fm-gen-link { padding: 0; margin: 0; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: var(--fs-12); cursor: pointer; white-space: nowrap; } +.fm-gen-link:hover { color: var(--text-primary); text-decoration: underline; } + +.fm-comfy-split { display: flex; gap: var(--space-2); min-width: 0; } +.fm-comfy-split .cv-input { flex: 1; min-width: 0; } +.fm-comfy-split .cv-btn { flex: none; } +.fm-comfy-line { min-height: 1.4em; color: var(--text-secondary); font-size: var(--fs-12); overflow-wrap: anywhere; } diff --git a/frontend/src/styles/panels.css b/frontend/src/styles/panels.css index 8c5b8c0..daaa051 100644 --- a/frontend/src/styles/panels.css +++ b/frontend/src/styles/panels.css @@ -503,11 +503,22 @@ .cv-menu-item:hover:not(:disabled), .cv-menu-item.is-focus:not(:disabled), .cv-menu-item:focus:not(:disabled) { background: color-mix(in srgb, var(--text-primary) 10%, transparent); color: var(--text-primary); outline: none; } .cv-menu-item:hover:not(:disabled) .cv-menu-keys, .cv-menu-keys { color: color-mix(in srgb, var(--text-primary) 45%, transparent); font-size: 13px; letter-spacing: 0.04em; } .cv-menu-sep { height: 1px; margin: 6px 10px; background: color-mix(in srgb, var(--text-primary) 12%, transparent); } -/* A menu never runs past the window: it hangs from under the menu bar, scrolls inside itself (arrow keys focus a row, which scrolls into view), - and one of sixteen or more rows takes the compact row height. */ -.cv-menu { max-height: calc(100vh - var(--ctl-xl) - var(--space-2)); scroll-padding-block: var(--space-1); } -.cv-menu:has(> .cv-menu-item:nth-child(n + 16)) .cv-menu-item { height: var(--ctl-sm); font-size: var(--fs-13); } -.cv-menu:has(> .cv-menu-item:nth-child(n + 16)) .cv-menu-sep { margin-block: var(--space-1); } +/* A menu never runs past the window: it hangs from under the menu bar, its rows scroll inside the card (arrow keys focus a row, which scrolls into view), + and one of sixteen or more rows takes the compact row height. menu.ts sets the real cap inline (three quarters of the window). While rows + remain below, the bottom rows fade into the card's glass (a mask on the list, so no colour is painted on the glass) under a small pill; + both go at the last row (160ms) and come back when the rows are scrolled up (490ms). */ +.cv-menu { max-height: calc(100vh - var(--ctl-xl) - var(--space-2)); } +.cv-menu:has(> .cv-menu-list > .cv-menu-item:nth-child(n + 16)) .cv-menu-item { height: var(--ctl-sm); font-size: var(--fs-13); } +.cv-menu:has(> .cv-menu-list > .cv-menu-item:nth-child(n + 16)) .cv-menu-sep { margin-block: var(--space-1); } +@property --menu-more { syntax: '<number>'; inherits: false; initial-value: 0; } +.cv-menu:not([hidden]), .fm-pop.fm-pop-scroll:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; } +.cv-menu-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: var(--space-1); --menu-more: 0; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); mask-image: linear-gradient(to bottom, #000 calc(100% - min(88px, 40%)), rgb(0 0 0 / calc(1 - var(--menu-more))) calc(100% - min(22px, 10%))); transition: --menu-more 160ms ease-out; } +.cv-menu-more { position: absolute; left: 50%; bottom: 6px; width: 56px; height: 12px; margin-left: -28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); border-radius: 999px; background: var(--glass-bg); color: var(--text-secondary); pointer-events: none; opacity: 0; transition: opacity 160ms ease-out; } +.cv-menu-more svg { width: 12px; height: 8px; } +.has-more > .cv-menu-list { --menu-more: 1; scroll-padding-block-end: min(88px, 40%); transition-duration: 490ms; } +.has-more > .cv-menu-more { opacity: 1; transition-duration: 490ms; } +.no-fade > .cv-menu-list, .no-fade > .cv-menu-more { transition: none; } +@media (prefers-reduced-motion: reduce) { .cv-menu-list, .cv-menu-more { transition: none; } } .cv-brush-tip { cursor: grab; touch-action: none; } .cv-brush-tip:active { cursor: grabbing; } diff --git a/frontend/src/ui/comfy-settings.ts b/frontend/src/ui/comfy-settings.ts new file mode 100644 index 0000000..d93275f --- /dev/null +++ b/frontend/src/ui/comfy-settings.ts @@ -0,0 +1,106 @@ +import { ApiError } from '../io/api'; +import { comfyApi, type ComfyStatus } from '../io/comfy-api'; +import { el, setDisabled, setText, setValue } from './dom'; +import { onLanguage, t } from './i18n'; +import '../styles/comfy-generate.css'; + +export const COMFY_SECTION = 'Comfy'; +export const COMFY_CHANGED = 'fm:comfy-changed'; + +const message = (e: unknown): string => (e instanceof ApiError || e instanceof Error ? e.message : String(e)); + +export class ComfySettingsPage { + readonly groups: HTMLElement[]; + private st: ComfyStatus | null = null; + private readonly url = el<HTMLInputElement>('<input class="cv-input" type="url" dir="ltr" spellcheck="false" data-automation-id="comfy-settings-url">'); + private readonly test = el<HTMLButtonElement>('<button class="cv-btn" type="button" data-automation-id="comfy-settings-test"></button>'); + private readonly result = el('<p class="fm-comfy-line" aria-live="polite"></p>'); + private readonly key = el<HTMLInputElement>('<input class="cv-input" type="password" autocomplete="off" spellcheck="false" data-automation-id="comfy-settings-key">'); + private readonly saveKey = el<HTMLButtonElement>('<button class="cv-btn" type="button" data-automation-id="comfy-settings-key-save"></button>'); + private readonly forget = el<HTMLButtonElement>('<button class="cv-btn" type="button" data-automation-id="comfy-settings-key-forget"></button>'); + private readonly keyLine = el('<p class="fm-comfy-line" aria-live="polite"></p>'); + + constructor(group: (label: string, ...content: HTMLElement[]) => HTMLElement, note: (text: string) => HTMLElement) { + const urlRow = el('<div class="fm-comfy-split"></div>'); + urlRow.append(this.url, this.test); + const keyRow = el('<div class="fm-comfy-split"></div>'); + keyRow.append(this.key, this.saveKey, this.forget); + this.groups = [ + group('Comfy server', urlRow, this.result, note(t('Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.'))), + group('Sign-in key', keyRow, this.keyLine, note(t('Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.'))), + ]; + this.test.addEventListener('click', () => void this.save()); + this.url.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); void this.save(); } }); + this.key.addEventListener('input', () => this.paint()); + this.saveKey.addEventListener('click', () => void this.storeKey()); + this.forget.addEventListener('click', () => void this.clearKey()); + this.paint(); + onLanguage(() => this.paint()); + } + + show(): void { void this.load(); } + + private async load(): Promise<void> { + try { this.take(await comfyApi.status()); } catch (e) { setText(this.result, message(e)); } + } + + private take(st: ComfyStatus): void { + this.st = st; + setValue(this.url, st.url); + const pack = st.pack ? `${st.pack.name} ${st.pack.version}` : ''; + let line: string; + if (st.installed && st.supported !== false) line = t('Connected') + (st.comfy ? ` · Comfy ${st.comfy.version}` : '') + (pack ? ` · ${pack}` : '') + (st.device ? ` · ${st.device.name}` : ''); + else if (st.message) line = st.message; + else if (st.installed && st.comfy) line = t('This Comfy server is too old. It needs version {v} or newer.').replace('{v}', st.comfy.minimum); + else line = t('Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.'); + setText(this.result, line); + this.paint(); + } + + private async save(): Promise<void> { + const url = this.url.value.trim(); + if (!url) return; + setDisabled(this.test, true); + setText(this.result, t('Checking...')); + try { + this.take(await comfyApi.setServer(url)); + document.dispatchEvent(new CustomEvent(COMFY_CHANGED)); + } catch (e) { + setText(this.result, message(e)); + } finally { + setDisabled(this.test, false); + } + } + + private async storeKey(): Promise<void> { + const key = this.key.value.trim(); + if (!key) return; + try { + this.take(await comfyApi.setKey(key)); + this.key.value = ''; + document.dispatchEvent(new CustomEvent(COMFY_CHANGED)); + } catch (e) { setText(this.keyLine, message(e)); } + this.paint(); + } + + private async clearKey(): Promise<void> { + try { + this.take(await comfyApi.clearKey()); + document.dispatchEvent(new CustomEvent(COMFY_CHANGED)); + } catch (e) { setText(this.keyLine, message(e)); } + } + + private paint(): void { + setText(this.test, t('Test')); + setText(this.saveKey, t('Save key')); + setText(this.forget, t('Forget key')); + this.url.setAttribute('aria-label', t('Comfy server address')); + this.key.setAttribute('aria-label', t('Sign-in key')); + const has = !!this.st?.hasKey; + const canStore = this.st?.canStore ?? true; + setText(this.keyLine, !canStore ? t('This computer has no keychain FormMorpheus can use, so a key cannot be kept here.') : has ? t('A key is saved.') : t('No key saved.')); + setDisabled(this.key, !canStore); + setDisabled(this.saveKey, !canStore || !this.key.value.trim()); + setDisabled(this.forget, !has); + } +} diff --git a/frontend/src/ui/content-menu.ts b/frontend/src/ui/content-menu.ts index ce20da4..b94fb76 100644 --- a/frontend/src/ui/content-menu.ts +++ b/frontend/src/ui/content-menu.ts @@ -83,7 +83,7 @@ export class ContentMenu { private openX = 0; private openY = 0; constructor(private readonly engine: Engine) { - this.pop = new Popover('fm-cm', 264); + this.pop = new Popover('fm-cm', 264, true); const body = this.pop.body; const tileRow = el<HTMLElement>('<div class="fm-cm-tiles"></div>'); diff --git a/frontend/src/ui/generate-panel.ts b/frontend/src/ui/generate-panel.ts new file mode 100644 index 0000000..324af87 --- /dev/null +++ b/frontend/src/ui/generate-panel.ts @@ -0,0 +1,398 @@ +import type { Engine } from '../engine/engine'; +import { ApiError } from '../io/api'; +import { comfyApi, readinessWords, type ComfyJob, type ComfyJobState, type ComfyReadiness, type ComfySlot, type ComfyStatus, type ComfyWorkflow } from '../io/comfy-api'; +import { MODES, MODE_LABEL, MODE_WORKFLOW, collect, follow, land, missing, plainSlot, randomSeed, sources, type ComfyDeps, type ComfyMode } from '../app/features/comfy-generate'; +import { el, patchList, q, setClass, setDisabled, setHidden, setStyleVar, setText } from './dom'; +import { enhanceSelect } from './dropdown'; +import { icon } from './icons'; +import { t } from './i18n'; +import { barFloor } from './menu'; +import '../styles/comfy-generate.css'; + +const STORE = 'formmorpheus.comfygen'; + +const isAbort = (e: unknown): boolean => e instanceof DOMException && e.name === 'AbortError'; +const message = (e: unknown): string => (e instanceof ApiError || e instanceof Error ? e.message : String(e)); + +interface SlotForm { box: HTMLElement; read: () => Record<string, unknown>; seeds: string[]; prompt: () => string } + +export class GeneratePanel { + private readonly root: HTMLElement; + private readonly err: HTMLElement; + private readonly server: HTMLElement; + private readonly mode: HTMLSelectElement; + private readonly source: HTMLElement; + private readonly ready: HTMLElement; + private readonly form: HTMLElement; + private readonly prog: HTMLElement; + private readonly step: HTMLElement; + private readonly preview: HTMLImageElement; + private readonly go: HTMLButtonElement; + private readonly retry: HTMLButtonElement; + private readonly cancel: HTMLButtonElement; + private readonly status: HTMLElement; + private readonly forms = new Map<string, SlotForm>(); + private readonly readiness = new Map<string, ComfyReadiness>(); + private st: ComfyStatus | null = null; + private workflows: ComfyWorkflow[] | null = null; + private loading = false; + private picked: ComfyMode; + private ctrl: AbortController | null = null; + private job: ComfyJob | null = null; + private last: { mode: ComfyMode } | null = null; + private open = false; + private returnFocus: HTMLElement | null = null; + + constructor(private readonly deps: ComfyDeps, private readonly openSettings: () => void, private readonly onText: (text: string) => void = () => undefined) { + const stored = (() => { try { return localStorage.getItem(STORE) ?? ''; } catch { return ''; } })(); + this.picked = (MODES as string[]).includes(stored) ? (stored as ComfyMode) : 'animate'; + const row = (label: string, control: HTMLElement): HTMLElement => { + const r = el<HTMLElement>('<div class="fm-gen-row"><span class="fm-gen-lab"></span></div>'); + setText(q(r, '.fm-gen-lab'), t(label)); + r.appendChild(control); + return r; + }; + const button = (cls: string, label: string): HTMLButtonElement => { const b = el<HTMLButtonElement>(`<button class="${cls}" type="button"></button>`); setText(b, t(label)); return b; }; + + this.root = el<HTMLElement>( + '<section class="fm-gen" role="dialog" hidden data-automation-id="comfy-generate-card">' + + '<div class="fm-gen-head"><span class="fm-gen-icon"></span><span class="fm-gen-title"></span><button class="fm-gen-x" type="button"></button></div>' + + '<div class="fm-gen-err is-empty" role="alert"></div>' + + '<div class="fm-gen-body"></div></section>'); + this.root.setAttribute('aria-label', t('Generate with Comfy')); + q(this.root, '.fm-gen-icon').innerHTML = icon('genPlug', 16); + setText(q(this.root, '.fm-gen-title'), t('Generate with Comfy')); + const closeBtn = q<HTMLButtonElement>(this.root, '.fm-gen-x'); + closeBtn.innerHTML = icon('close', 14); + closeBtn.setAttribute('aria-label', t('Close')); + closeBtn.addEventListener('click', () => this.close()); + this.err = q(this.root, '.fm-gen-err'); + + const serverRow = el<HTMLElement>('<div class="fm-gen-server"><span class="fm-gen-dot"></span><span class="fm-gen-servertext" aria-live="polite"></span></div>'); + this.server = serverRow; + const settingsBtn = button('fm-gen-link', 'Comfy settings...'); + settingsBtn.dataset.automationId = 'comfy-generate-settings'; + settingsBtn.addEventListener('click', () => this.openSettings()); + serverRow.append(settingsBtn); + + this.mode = el<HTMLSelectElement>('<select class="cv-input" data-automation-id="comfy-generate-mode"></select>'); + this.mode.setAttribute('aria-label', t('Mode')); + for (const m of MODES) this.mode.append(new Option(t(MODE_LABEL[m]), m)); + this.mode.value = this.picked; + this.source = el<HTMLElement>('<div class="fm-gen-line" aria-live="polite"></div>'); + this.ready = el<HTMLElement>('<ul class="fm-gen-ready" aria-live="polite"></ul>'); + this.form = el<HTMLElement>('<div class="fm-gen-form"></div>'); + this.prog = el<HTMLElement>('<div class="fm-gen-prog is-idle" role="progressbar" aria-valuemin="0" aria-valuemax="100"><div class="fm-gen-fill"></div></div>'); + this.prog.setAttribute('aria-label', t('Progress')); + this.step = el<HTMLElement>('<div class="fm-gen-line" aria-live="polite"></div>'); + const frame = el<HTMLElement>('<div class="fm-gen-preview"><img alt=""></div>'); + this.preview = q<HTMLImageElement>(frame, 'img'); + this.go = button('cv-btn fm-gen-go', 'Generate'); + this.go.dataset.automationId = 'comfy-generate-run'; + this.retry = button('cv-btn', 'Retry with another seed'); + this.retry.dataset.automationId = 'comfy-generate-retry'; + this.cancel = button('cv-btn', 'Cancel'); + this.cancel.dataset.automationId = 'comfy-generate-cancel'; + const acts = el<HTMLElement>('<div class="fm-gen-acts"></div>'); + acts.append(this.go, this.retry, this.cancel); + this.status = el<HTMLElement>('<div class="fm-gen-line" aria-live="polite"></div>'); + q(this.root, '.fm-gen-body').append(serverRow, row('Mode', this.mode), this.source, this.ready, this.form, this.prog, this.step, frame); + this.root.append(acts, this.status); + + (document.getElementById('overlay-root') ?? document.body).appendChild(this.root); + enhanceSelect(this.mode); + + this.mode.addEventListener('change', () => { + this.picked = this.mode.value as ComfyMode; + try { localStorage.setItem(STORE, this.picked); } catch { /* this session only */ } + this.clearErr(); + void this.loadReadiness(); + this.patch(); + }); + this.go.addEventListener('click', () => { void this.run(false); }); + this.retry.addEventListener('click', () => { void this.run(true); }); + this.cancel.addEventListener('click', () => { void this.stop(); }); + this.root.addEventListener('keydown', (e) => { + if (e.key !== 'Escape' || this.ctrl) return; + e.preventDefault(); + e.stopPropagation(); + this.close(); + }); + this.deps.engine.on('selection', () => { if (this.open) this.patch(); }); + this.deps.engine.on('projects', () => { if (this.open) this.patch(); }); + window.addEventListener('resize', () => this.place()); + new ResizeObserver(() => this.place()).observe(this.root); + this.patch(); + } + + // bottom-anchored like the other cards, but never above the menu bar and never taller than the room below it + private place(): void { + if (!this.open) return; + const floor = barFloor(); + const cap = `${Math.max(0, Math.floor(window.innerHeight - floor - 4))}px`; + if (this.root.style.maxHeight !== cap) this.root.style.maxHeight = cap; + this.root.style.removeProperty('bottom'); + const r = this.root.getBoundingClientRect(); + if (r.top < floor) this.root.style.bottom = `${Math.max(4, Math.floor(window.innerHeight - floor - r.height))}px`; + } + + get isOpen(): boolean { return this.open; } + + show(mode?: ComfyMode): void { + if (mode) { this.picked = mode; this.mode.value = mode; } + const was = this.open; + this.open = true; + if (!was) this.returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null; + setHidden(this.root, false); + this.patch(); + this.place(); + if (!was) this.mode.focus(); + void this.refresh(); + } + + // a running job keeps running so its result still lands + close(): void { + if (!this.open) return; + this.open = false; + const inside = this.root.contains(document.activeElement); + setHidden(this.root, true); + if (inside && this.returnFocus?.isConnected) this.returnFocus.focus(); + this.returnFocus = null; + } + + async refresh(): Promise<void> { + try { + this.st = await comfyApi.status(); + } catch (e) { + this.st = null; + this.showErr(message(e)); + this.patch(); + return; + } + if (this.st.installed && this.st.supported !== false) { + this.readiness.clear(); + await this.loadWorkflows(); + } + this.patch(); + } + + private showErr(text: string): void { setText(this.err, text); setClass(this.err, 'is-empty', false); } + private clearErr(): void { setClass(this.err, 'is-empty', true); } + + private workflow(): ComfyWorkflow | null { return this.workflows?.find((w) => w.id === MODE_WORKFLOW[this.picked]) ?? null; } + + private async loadWorkflows(): Promise<void> { + if (this.loading) return; + this.loading = true; + try { + this.workflows = await comfyApi.workflows(); + this.clearErr(); + } catch (e) { + this.showErr(message(e)); + } finally { + this.loading = false; + } + await this.loadReadiness(); + } + + private async loadReadiness(): Promise<void> { + const wf = this.workflow(); + if (!wf || this.readiness.has(wf.id)) return; + if (wf.readiness) { this.readiness.set(wf.id, wf.readiness); this.patch(); return; } + try { + this.readiness.set(wf.id, await comfyApi.readiness(wf.id)); + } catch (e) { + this.showErr(message(e)); + } + this.patch(); + } + + + private formFor(wf: ComfyWorkflow): SlotForm { + const had = this.forms.get(wf.id); + if (had) return had; + const box = el<HTMLElement>('<div class="fm-gen-slots"></div>'); + const readers: Array<() => [string, unknown] | null> = []; + const seeds: string[] = []; + let prompt: () => string = () => ''; + for (const s of wf.slots.filter((x) => plainSlot(x.type))) { + const { control, read } = this.slotControl(s); + if (s.type === 'seed') seeds.push(s.name); + if (s.type === 'text' && /prompt/i.test(s.name) && !/neg/i.test(s.name)) prompt = () => String(read() ?? ''); + control.dataset.automationId = `comfy-slot-${s.name}`; + const r = el<HTMLElement>('<label class="fm-gen-row"><span class="fm-gen-lab"></span></label>'); + setText(q(r, '.fm-gen-lab'), s.description || s.name); + r.title = s.description ?? ''; + r.appendChild(control); + box.appendChild(r); + readers.push(() => { const v = read(); return v === undefined ? null : [s.name, v]; }); + } + this.form.appendChild(box); + const f: SlotForm = { box, seeds, prompt, read: () => Object.fromEntries(readers.map((r) => r()).filter((x): x is [string, unknown] => !!x)) }; + this.forms.set(wf.id, f); + return f; + } + + private slotControl(s: ComfySlot): { control: HTMLElement; read: () => unknown } { + const d = s.default; + if (s.type === 'text') { + const ta = el<HTMLTextAreaElement>('<textarea class="cv-input fm-gen-text" rows="3"></textarea>'); + ta.value = typeof d === 'string' ? d : ''; + return { control: ta, read: () => ta.value.trim() || (s.required ? '' : undefined) }; + } + if (s.type === 'bool') { + const cb = el<HTMLInputElement>('<input type="checkbox">'); + cb.checked = d === true; + return { control: cb, read: () => cb.checked }; + } + if (s.type === 'choice') { + const sel = el<HTMLSelectElement>('<select class="cv-input"></select>'); + for (const c of s.choices ?? []) sel.append(new Option(c, c)); + if (typeof d === 'string') sel.value = d; + return { control: sel, read: () => sel.value }; + } + if (s.type === 'size') { + const wrap = el<HTMLElement>('<span class="fm-gen-split"><input class="cv-input" type="number" step="8" min="8"><input class="cv-input" type="number" step="8" min="8"></span>'); + const [w, h] = Array.from(wrap.querySelectorAll('input')); + const m = this.deps.engine.movie; + const def = Array.isArray(d) ? d as number[] : [m?.width ?? 512, m?.height ?? 512]; + w.value = String(Math.round(def[0] / 8) * 8); + h.value = String(Math.round(def[1] / 8) * 8); + return { control: wrap, read: () => [Math.round(Number(w.value) / 8) * 8, Math.round(Number(h.value) / 8) * 8] }; + } + const n = el<HTMLInputElement>('<input class="cv-input" type="number">'); + if (s.min !== undefined) n.min = String(s.min); + if (s.max !== undefined) n.max = String(s.max); + n.step = s.type === 'int' || s.type === 'seed' ? String(s.step ?? 1) : String(s.step ?? 'any'); + n.value = typeof d === 'number' ? String(d) : s.type === 'seed' ? '-1' : ''; + return { control: n, read: () => (n.value === '' ? undefined : s.type === 'float' ? Number(n.value) : Math.round(Number(n.value))) }; + } + + + private async run(again: boolean): Promise<void> { + const wf = this.workflow(); + const mode = again && this.last ? this.last.mode : this.picked; + if (!wf || this.ctrl || !this.deps.engine.movie) return; + const src = sources(this.deps.engine); + const need = missing(mode, src); + if (need) { this.showErr(t(need)); return; } + this.clearErr(); + const ctrl = new AbortController(); + this.ctrl = ctrl; + this.job = null; + setText(this.status, ''); + this.setPreview(''); + this.patch(); + const form = this.formFor(wf); + try { + setText(this.step, t('Preparing the pictures...')); + const media = await collect(this.deps, mode, wf, src); + const values = { ...form.read(), ...media.slots }; + if (again) for (const k of form.seeds) values[k] = randomSeed(); + setText(this.step, t('Sending to Comfy...')); + this.job = await comfyApi.run(wf.id, values, media.files, !again, ctrl.signal); + this.last = { mode }; + this.patch(); + const done = await follow(this.job, (s) => this.tick(s), ctrl.signal); + this.job = done; + if (ctrl.signal.aborted || done.state === 'cancelled') { setText(this.status, t('Cancelled.')); return; } + if (done.state === 'failed') { this.showErr(done.error?.message || t('The job did not finish.')); return; } + setText(this.step, t('Bringing the result in...')); + const placed = await land(this.deps, mode, wf, done, src, form.prompt(), ctrl.signal); + if (placed.text) this.onText(placed.text); + const seed = typeof done.seed_used === 'number' ? ` ·${t('seed {n}').replace('{n}', String(done.seed_used))}` : ''; + setText(this.status, placed.blocks ? t('{n} blocks added').replace('{n}', String(placed.blocks)) + seed : placed.text ? t('Words added to the prompt.') : t('The job gave nothing to place.')); + } catch (e) { + if (isAbort(e)) setText(this.status, t('Cancelled.')); + else this.showErr(message(e)); + } finally { + this.ctrl = null; + setText(this.step, ''); + this.patch(); + } + } + + private async stop(): Promise<void> { + const job = this.job; + this.ctrl?.abort(); + if (job && (job.state === 'queued' || job.state === 'running')) { + try { await comfyApi.cancel(job.id); } catch (e) { this.showErr(message(e)); } + } + } + + private tick(s: ComfyJobState): void { + this.job = s.job; + if (s.preview?.image) this.setPreview(s.preview.image); + const j = s.job; + if (j.state === 'queued') setText(this.step, j.queue_position ? t('Waiting in the queue: place {n}').replace('{n}', String(j.queue_position)) : t('Waiting in the queue')); + else if (j.state === 'running') { + const p = s.preview ? { value: s.preview.step, max: s.preview.steps } : j.progress; + setText(this.step, p && p.max ? t('Step {value} of {max}').replace('{value}', String(p.value)).replace('{max}', String(p.max)) : t('Running...')); + } + this.patchProgress(); + } + + private setPreview(src: string): void { + if (src && !src.startsWith('data:')) src = `data:image/jpeg;base64,${src}`; + if (this.preview.getAttribute('src') !== src) { if (src) this.preview.src = src; else this.preview.removeAttribute('src'); } + setClass(this.preview.parentElement as HTMLElement, 'is-empty', !src); + } + + + private patchProgress(): void { + const j = this.job; + const live = !!this.ctrl; + const p = j?.state === 'running' ? j.progress : undefined; + const sized = !!p && p.max > 0; + setClass(this.prog, 'is-idle', !live); + setClass(this.prog, 'is-busy', live && !sized); + const frac = sized && p ? Math.min(1, p.value / p.max) : 0; + setStyleVar(this.prog, '--p', frac.toFixed(3)); + if (sized) this.prog.setAttribute('aria-valuenow', String(Math.round(frac * 100))); + else this.prog.removeAttribute('aria-valuenow'); + } + + private patch(): void { + const st = this.st; + const up = !!st?.installed && st.supported !== false; + const dot = q(this.server, '.fm-gen-dot'); + setClass(dot, 'is-up', up); + setClass(dot, 'is-down', !!st && !up); + let line = t('Checking the Comfy server...'); + if (st) { + if (up) line = t('Connected to {url}').replace('{url}', st.url) + (st.pack ? ` · ${st.pack.name} ${st.pack.version}` : ''); + else if (st.message) line = st.message; + else if (st.installed && st.comfy) line = t('This Comfy server is too old. It needs version {v} or newer.').replace('{v}', st.comfy.minimum); + else line = t('Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.'); + } else if (!this.err.classList.contains('is-empty')) line = t('The Comfy server could not be reached.'); + setText(q(this.server, '.fm-gen-servertext'), line); + + const wf = up ? this.workflow() : null; + const src = sources(this.deps.engine); + const need = this.deps.engine.movie ? missing(this.picked, src) : 'Open a movie first.'; + setText(this.source, up && !wf && this.workflows ? t('This Comfy server has no workflow for this mode.') : t(need || 'Ready to use the selected blocks.')); + setClass(this.source, 'is-warn', !!need); + + const rd = wf ? this.readiness.get(wf.id) : undefined; + const words = rd ? readinessWords(rd, t) : []; + patchList(this.ready, words, { + key: (w) => w, + create: (w) => { const li = document.createElement('li'); li.textContent = w; return li; }, + update: () => undefined, + }); + setClass(this.ready, 'is-empty', !words.length); + + const cur = wf ? this.formFor(wf) : null; + for (const f of this.forms.values()) setHidden(f.box, f !== cur); + + const running = !!this.ctrl; + const can = up && !!wf && !need && (rd ? rd.ready : true) && !!this.deps.engine.movie; + setText(this.go, running ? t('Generating...') : t('Generate')); + setClass(this.go, 'is-busy', running); + setDisabled(this.go, running || !can); + setDisabled(this.retry, running || !can || !this.last || !(cur?.seeds.length)); + setHidden(this.cancel, !running); + setDisabled(this.mode, running); + this.patchProgress(); + } +} diff --git a/frontend/src/ui/i18n/ar.ts b/frontend/src/ui/i18n/ar.ts index 6016c0e..a49e6fd 100644 --- a/frontend/src/ui/i18n/ar.ts +++ b/frontend/src/ui/i18n/ar.ts @@ -1085,4 +1085,18 @@ export const ar: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'مفتاح ElevenLabs الخاص بك. يُحفظ في سلسلة مفاتيح هذا الـ iPad ويُرسل إلى تلك الخدمة فقط.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'يستخدم الاستماع ميزة التعرف على الكلام الخاصة بهذا الـ iPad، على الجهاز نفسه. يطلب الإذن في المرة الأولى.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'يحتاج الاستماع إلى إذن لاستخدام التعرف على الكلام. اسمح به لـ FormMorpheus في تطبيق الإعدادات.', + 'Generate with Comfy': 'إنشاء باستخدام Comfy', 'Comfy settings': 'إعدادات Comfy', 'Generate': 'إنشاء', 'Generating': 'جارٍ الإنشاء', 'Retry with another seed': 'إعادة المحاولة ببذرة أخرى', + 'Fluid shot from flipbook keyframes': 'لقطة سلسة من الإطارات الرئيسية لكتاب التحريك', 'Animate a drawing': 'تحريك رسم', 'Erase on a video': 'المحو على فيديو', 'Add to a video': 'الإضافة إلى فيديو', 'Relight a video': 'إعادة إضاءة فيديو', 'Matte': 'قناع', 'Upscale': 'تكبير', + 'Select a Flipbook with the painted keyframes.': 'حدّد كتاب تحريك فيه الإطارات الرئيسية المرسومة.', 'Select a Drawing, Flipbook or picture to animate.': 'حدّد رسمًا أو كتاب تحريك أو صورة لتحريكها.', 'Select a video block.': 'حدّد كتلة فيديو.', + 'Paint over the video\'s first frame on a Drawing above it.': 'ارسم فوق الإطار الأول من الفيديو في رسم يعلوه.', 'Open a movie first.': 'افتح فيلمًا أولًا.', 'Ready to use the selected blocks.': 'جاهز لاستخدام الكتل المحددة.', + 'This Comfy server has no workflow for this mode.': 'لا يملك خادم Comfy هذا سير عمل لهذا الوضع.', 'Checking the Comfy server': 'جارٍ فحص خادم Comfy', 'Connected to {url}': 'تم الاتصال بـ {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'خادم Comfy هذا قديم جدًا. يلزم الإصدار {v} أو أحدث.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'لم يتم تثبيت Comfy-FormBridge-Suite. ضعه في مجلد custom_nodes في خادم Comfy ثم أعد تشغيل الخادم.', 'The Comfy server could not be reached.': 'تعذّر الوصول إلى خادم Comfy.', + 'Preparing the pictures': 'جارٍ تجهيز الصور', 'Sending to Comfy': 'جارٍ الإرسال إلى Comfy', 'Bringing the result in': 'جارٍ إحضار النتيجة', 'The job did not finish.': 'لم تكتمل المهمة.', 'seed {n}': 'البذرة {n}', '{n} blocks added': 'تمت إضافة {n} كتل', 'Words added to the prompt.': 'تمت إضافة الكلمات إلى الوصف.', 'The job gave nothing to place.': 'لم تُنتج المهمة شيئًا لوضعه.', + 'Waiting in the queue: place {n}': 'في الانتظار بالطابور: المركز {n}', 'Waiting in the queue': 'في الانتظار بالطابور', 'Step {value} of {max}': 'الخطوة {value} من {max}', 'Missing node pack: {name}': 'حزمة عقد مفقودة: {name}', 'Missing nodes: {names}': 'عقد مفقودة: {names}', + 'Missing model {file}{size}: put it in {place}': 'نموذج مفقود {file}{size}: ضعه في {place}', 'accept its terms at the source first': 'اقبل شروطه في المصدر أولًا', 'This workflow is not ready on the Comfy server.': 'سير العمل هذا غير جاهز على خادم Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'خادم Comfy', 'Sign-in key': 'مفتاح تسجيل الدخول', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'يرسل «إنشاء» الصور إلى خادم Comfy هذا ويعيد النتائج. يحتاج إلى Comfy-FormBridge-Suite في مجلد custom_nodes في الخادم.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'فقط لخادم يطلب مفتاحًا. يُحفظ في سلسلة المفاتيح بهذا الكمبيوتر ويُرسل إلى ذلك الخادم فقط.', + 'Comfy made nothing to add.': 'لم يصنع Comfy شيئًا لإضافته.', + 'Connected': 'متصل', 'Test': 'اختبار', 'Comfy server address': 'عنوان خادم Comfy', 'A key is saved.': 'يوجد مفتاح محفوظ.', 'No key saved.': 'لا يوجد مفتاح محفوظ.', }; diff --git a/frontend/src/ui/i18n/cs.ts b/frontend/src/ui/i18n/cs.ts index 24194e9..2d5858f 100644 --- a/frontend/src/ui/i18n/cs.ts +++ b/frontend/src/ui/i18n/cs.ts @@ -900,4 +900,18 @@ export const cs: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Váš vlastní klíč ElevenLabs. Je uložen v klíčence tohoto iPadu a odesílá se jen této službě.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Poslech používá vlastní rozpoznávání řeči tohoto iPadu, přímo v zařízení. Poprvé požádá o oprávnění.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Poslech potřebuje oprávnění k rozpoznávání řeči. Povolte je pro FormMorpheus v aplikaci Nastavení.', + 'Generate with Comfy': 'Vytvořit pomocí Comfy', 'Comfy settings': 'Nastavení Comfy', 'Generate': 'Vytvořit', 'Generating': 'Vytváří se', 'Retry with another seed': 'Zkusit znovu s jiným seedem', + 'Fluid shot from flipbook keyframes': 'Plynulý záběr z klíčových snímků flipbooku', 'Animate a drawing': 'Animovat kresbu', 'Erase on a video': 'Vymazat na videu', 'Add to a video': 'Přidat do videa', 'Relight a video': 'Přesvítit video', 'Matte': 'Matná maska', 'Upscale': 'Zvětšit', + 'Select a Flipbook with the painted keyframes.': 'Vyberte flipbook s namalovanými klíčovými snímky.', 'Select a Drawing, Flipbook or picture to animate.': 'Vyberte kresbu, flipbook nebo obrázek k animaci.', 'Select a video block.': 'Vyberte blok videa.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Namalujte přes první snímek videa na kresbě nad ním.', 'Open a movie first.': 'Nejdřív otevřete film.', 'Ready to use the selected blocks.': 'Připraveno použít vybrané bloky.', + 'This Comfy server has no workflow for this mode.': 'Tento server Comfy nemá pro tento režim žádný pracovní postup.', 'Checking the Comfy server': 'Kontrola serveru Comfy', 'Connected to {url}': 'Připojeno k {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Tento server Comfy je příliš starý. Potřebuje verzi {v} nebo novější.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite není nainstalován. Vložte ho do složky custom_nodes svého serveru Comfy a server restartujte.', 'The Comfy server could not be reached.': 'Server Comfy se nepodařilo zastihnout.', + 'Preparing the pictures': 'Připravují se obrázky', 'Sending to Comfy': 'Odesílání do Comfy', 'Bringing the result in': 'Přebírá se výsledek', 'The job did not finish.': 'Úloha nebyla dokončena.', 'seed {n}': 'seed {n}', '{n} blocks added': 'Přidáno bloků: {n}', 'Words added to the prompt.': 'Slova byla přidána do promptu.', 'The job gave nothing to place.': 'Úloha nevytvořila nic k vložení.', + 'Waiting in the queue: place {n}': 'Čeká ve frontě: pořadí {n}', 'Waiting in the queue': 'Čeká ve frontě', 'Step {value} of {max}': 'Krok {value} z {max}', 'Missing node pack: {name}': 'Chybí balík uzlů: {name}', 'Missing nodes: {names}': 'Chybějící uzly: {names}', + 'Missing model {file}{size}: put it in {place}': 'Chybí model {file}{size}: vložte ho do {place}', 'accept its terms at the source first': 'nejdřív přijměte jeho podmínky u zdroje', 'This workflow is not ready on the Comfy server.': 'Tento pracovní postup není na serveru Comfy připraven.', + 'Comfy': 'Comfy', 'Comfy server': 'Server Comfy', 'Sign-in key': 'Přihlašovací klíč', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Vytvořit odešle obrázky na tento server Comfy a přinese výsledky zpět. Potřebuje Comfy-FormBridge-Suite ve složce custom_nodes serveru.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Jen pro server, který ho vyžaduje. Je uložen v klíčence tohoto počítače a odesílá se jen tomuto serveru.', + 'Comfy made nothing to add.': 'Comfy nevytvořil nic k přidání.', + 'Connected': 'Připojeno', 'Test': 'Vyzkoušet', 'Comfy server address': 'Adresa serveru Comfy', 'A key is saved.': 'Klíč je uložen.', 'No key saved.': 'Není uložen žádný klíč.', }; diff --git a/frontend/src/ui/i18n/da.ts b/frontend/src/ui/i18n/da.ts index 88c7456..482a955 100644 --- a/frontend/src/ui/i18n/da.ts +++ b/frontend/src/ui/i18n/da.ts @@ -1063,4 +1063,18 @@ export const da: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Din egen ElevenLabs-nøgle. Den gemmes i denne iPads nøglering og sendes kun til den tjeneste.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Lytning bruger denne iPads egen talegenkendelse, direkte på enheden. Den beder om tilladelse første gang.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Lytning kræver tilladelse til at bruge talegenkendelse. Tillad det for FormMorpheus i appen Indstillinger.', + 'Generate with Comfy': 'Generer med Comfy', 'Comfy settings': 'Comfy-indstillinger', 'Generate': 'Generer', 'Generating': 'Genererer', 'Retry with another seed': 'Prøv igen med et andet seed', + 'Fluid shot from flipbook keyframes': 'Flydende optagelse fra et flipbooks keyframes', 'Animate a drawing': 'Animer en tegning', 'Erase on a video': 'Slet på en video', 'Add to a video': 'Føj til en video', 'Relight a video': 'Omlys en video', 'Matte': 'Matte', 'Upscale': 'Opskaler', + 'Select a Flipbook with the painted keyframes.': 'Vælg et flipbook med de malede keyframes.', 'Select a Drawing, Flipbook or picture to animate.': 'Vælg en tegning, et flipbook eller et billede, der skal animeres.', 'Select a video block.': 'Vælg en videoblok.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Mal over videoens første billede på en tegning ovenover.', 'Open a movie first.': 'Åbn en film først.', 'Ready to use the selected blocks.': 'Klar til at bruge de valgte blokke.', + 'This Comfy server has no workflow for this mode.': 'Denne Comfy-server har ingen arbejdsgang til denne tilstand.', 'Checking the Comfy server': 'Kontrollerer Comfy-serveren', 'Connected to {url}': 'Forbundet til {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Denne Comfy-server er for gammel. Den kræver version {v} eller nyere.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite er ikke installeret. Læg den i mappen custom_nodes på din Comfy-server, og genstart serveren.', 'The Comfy server could not be reached.': 'Comfy-serveren kunne ikke nås.', + 'Preparing the pictures': 'Forbereder billederne', 'Sending to Comfy': 'Sender til Comfy', 'Bringing the result in': 'Henter resultatet', 'The job did not finish.': 'Jobbet blev ikke færdigt.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} blokke tilføjet', 'Words added to the prompt.': 'Ord føjet til prompten.', 'The job gave nothing to place.': 'Jobbet gav intet at placere.', + 'Waiting in the queue: place {n}': 'Venter i køen: plads {n}', 'Waiting in the queue': 'Venter i køen', 'Step {value} of {max}': 'Trin {value} af {max}', 'Missing node pack: {name}': 'Manglende nodepakke: {name}', 'Missing nodes: {names}': 'Manglende noder: {names}', + 'Missing model {file}{size}: put it in {place}': 'Manglende model {file}{size}: læg den i {place}', 'accept its terms at the source first': 'accepter først vilkårene ved kilden', 'This workflow is not ready on the Comfy server.': 'Denne arbejdsgang er ikke klar på Comfy-serveren.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-server', 'Sign-in key': 'Loginnøgle', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Generer sender billeder til denne Comfy-server og henter resultaterne tilbage. Den kræver Comfy-FormBridge-Suite i serverens mappe custom_nodes.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Kun til en server, der beder om en. Den gemmes i denne computers nøglering og sendes kun til den server.', + 'Comfy made nothing to add.': 'Comfy lavede intet at tilføje.', + 'Connected': 'Forbundet', 'Test': 'Test', 'Comfy server address': 'Adressen på Comfy-serveren', 'A key is saved.': 'Der er gemt en nøgle.', 'No key saved.': 'Ingen nøgle gemt.', }; diff --git a/frontend/src/ui/i18n/de.ts b/frontend/src/ui/i18n/de.ts index d098517..c969a4a 100644 --- a/frontend/src/ui/i18n/de.ts +++ b/frontend/src/ui/i18n/de.ts @@ -1063,4 +1063,18 @@ export const de: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Dein eigener ElevenLabs-Schlüssel. Er wird im Schlüsselbund dieses iPad aufbewahrt und nur an diesen Dienst gesendet.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Zuhören nutzt die eigene Spracherkennung dieses iPad, direkt auf dem Gerät. Beim ersten Mal wird um Erlaubnis gefragt.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Zuhören braucht die Erlaubnis, die Spracherkennung zu nutzen. Erlaube sie für FormMorpheus in der App Einstellungen.', + 'Generate with Comfy': 'Mit Comfy erzeugen', 'Comfy settings': 'Comfy-Einstellungen', 'Generate': 'Erzeugen', 'Generating': 'Wird erzeugt', 'Retry with another seed': 'Mit anderem Seed erneut versuchen', + 'Fluid shot from flipbook keyframes': 'Fließende Einstellung aus Daumenkino-Keyframes', 'Animate a drawing': 'Zeichnung animieren', 'Erase on a video': 'In einem Video entfernen', 'Add to a video': 'Zu einem Video hinzufügen', 'Relight a video': 'Video neu ausleuchten', 'Matte': 'Matte', 'Upscale': 'Hochskalieren', + 'Select a Flipbook with the painted keyframes.': 'Wähle ein Daumenkino mit den gemalten Keyframes aus.', 'Select a Drawing, Flipbook or picture to animate.': 'Wähle eine Zeichnung, ein Daumenkino oder ein Bild zum Animieren aus.', 'Select a video block.': 'Wähle einen Videoblock aus.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Male auf einer Zeichnung darüber über das erste Einzelbild des Videos.', 'Open a movie first.': 'Öffne zuerst einen Film.', 'Ready to use the selected blocks.': 'Bereit, die ausgewählten Blöcke zu verwenden.', + 'This Comfy server has no workflow for this mode.': 'Dieser Comfy-Server hat keinen Workflow für diesen Modus.', 'Checking the Comfy server': 'Comfy-Server wird geprüft', 'Connected to {url}': 'Verbunden mit {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Dieser Comfy-Server ist zu alt. Er braucht Version {v} oder neuer.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite ist nicht installiert. Lege es in den Ordner custom_nodes deines Comfy-Servers und starte ihn neu.', 'The Comfy server could not be reached.': 'Der Comfy-Server ist nicht erreichbar.', + 'Preparing the pictures': 'Bilder werden vorbereitet', 'Sending to Comfy': 'Senden an Comfy', 'Bringing the result in': 'Ergebnis wird übernommen', 'The job did not finish.': 'Der Auftrag wurde nicht abgeschlossen.', 'seed {n}': 'Seed {n}', '{n} blocks added': '{n} Blöcke hinzugefügt', 'Words added to the prompt.': 'Wörter zum Prompt hinzugefügt.', 'The job gave nothing to place.': 'Der Auftrag lieferte nichts zum Einfügen.', + 'Waiting in the queue: place {n}': 'Wartet in der Warteschlange: Platz {n}', 'Waiting in the queue': 'Wartet in der Warteschlange', 'Step {value} of {max}': 'Schritt {value} von {max}', 'Missing node pack: {name}': 'Fehlendes Node-Paket: {name}', 'Missing nodes: {names}': 'Fehlende Nodes: {names}', + 'Missing model {file}{size}: put it in {place}': 'Fehlendes Modell {file}{size}: Lege es in {place}', 'accept its terms at the source first': 'akzeptiere zuerst die Bedingungen an der Quelle', 'This workflow is not ready on the Comfy server.': 'Dieser Workflow ist auf dem Comfy-Server nicht bereit.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-Server', 'Sign-in key': 'Anmeldeschlüssel', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Erzeugen sendet Bilder an diesen Comfy-Server und holt die Ergebnisse zurück. Dafür muss Comfy-FormBridge-Suite im Ordner custom_nodes des Servers liegen.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Nur für einen Server, der einen verlangt. Er wird im Schlüsselbund dieses Computers aufbewahrt und nur an diesen Server gesendet.', + 'Comfy made nothing to add.': 'Comfy hat nichts zum Hinzufügen erzeugt.', + 'Connected': 'Verbunden', 'Test': 'Testen', 'Comfy server address': 'Adresse des Comfy-Servers', 'A key is saved.': 'Ein Schlüssel ist gespeichert.', 'No key saved.': 'Kein Schlüssel gespeichert.', }; diff --git a/frontend/src/ui/i18n/el.ts b/frontend/src/ui/i18n/el.ts index c9033b6..3a1f7c5 100644 --- a/frontend/src/ui/i18n/el.ts +++ b/frontend/src/ui/i18n/el.ts @@ -976,4 +976,18 @@ export const el: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "Το δικό σας κλειδί ElevenLabs. Φυλάσσεται στην κλειδοθήκη αυτού του iPad και αποστέλλεται μόνο σε αυτή την υπηρεσία.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "Η ακρόαση χρησιμοποιεί τη δική του αναγνώριση ομιλίας του iPad, πάνω στη συσκευή. Ζητά άδεια την πρώτη φορά.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "Η ακρόαση χρειάζεται άδεια για χρήση της αναγνώρισης ομιλίας. Επιτρέψτε την για το FormMorpheus στην εφαρμογή Ρυθμίσεις.", + 'Generate with Comfy': 'Δημιουργία με το Comfy', 'Comfy settings': 'Ρυθμίσεις Comfy', 'Generate': 'Δημιουργία', 'Generating': 'Δημιουργία σε εξέλιξη', 'Retry with another seed': 'Επανάληψη με άλλο seed', + 'Fluid shot from flipbook keyframes': 'Ρευστό πλάνο από τα βασικά καρέ ενός flipbook', 'Animate a drawing': 'Animation σε ένα σχέδιο', 'Erase on a video': 'Σβήσιμο σε ένα βίντεο', 'Add to a video': 'Προσθήκη σε ένα βίντεο', 'Relight a video': 'Νέος φωτισμός σε ένα βίντεο', 'Matte': 'Μάσκα', 'Upscale': 'Μεγέθυνση', + 'Select a Flipbook with the painted keyframes.': 'Επιλέξτε ένα flipbook με τα ζωγραφισμένα βασικά καρέ.', 'Select a Drawing, Flipbook or picture to animate.': 'Επιλέξτε ένα σχέδιο, ένα flipbook ή μια εικόνα για animation.', 'Select a video block.': 'Επιλέξτε ένα μπλοκ βίντεο.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Ζωγραφίστε πάνω στο πρώτο καρέ του βίντεο, σε ένα σχέδιο από πάνω του.', 'Open a movie first.': 'Ανοίξτε πρώτα μια ταινία.', 'Ready to use the selected blocks.': 'Έτοιμο να χρησιμοποιήσει τα επιλεγμένα μπλοκ.', + 'This Comfy server has no workflow for this mode.': 'Αυτός ο διακομιστής Comfy δεν έχει ροή εργασίας για αυτή τη λειτουργία.', 'Checking the Comfy server': 'Έλεγχος του διακομιστή Comfy', 'Connected to {url}': 'Συνδέθηκε στο {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Αυτός ο διακομιστής Comfy είναι πολύ παλιός. Χρειάζεται την έκδοση {v} ή νεότερη.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Το Comfy-FormBridge-Suite δεν είναι εγκατεστημένο. Βάλτε το στον φάκελο custom_nodes του διακομιστή Comfy και κάντε επανεκκίνηση του διακομιστή.', 'The Comfy server could not be reached.': 'Δεν ήταν δυνατή η σύνδεση με τον διακομιστή Comfy.', + 'Preparing the pictures': 'Προετοιμασία των εικόνων', 'Sending to Comfy': 'Αποστολή στο Comfy', 'Bringing the result in': 'Μεταφορά του αποτελέσματος', 'The job did not finish.': 'Η εργασία δεν ολοκληρώθηκε.', 'seed {n}': 'seed {n}', '{n} blocks added': 'Προστέθηκαν {n} μπλοκ', 'Words added to the prompt.': 'Οι λέξεις προστέθηκαν στο prompt.', 'The job gave nothing to place.': 'Η εργασία δεν έδωσε τίποτα προς τοποθέτηση.', + 'Waiting in the queue: place {n}': 'Αναμονή στην ουρά: θέση {n}', 'Waiting in the queue': 'Αναμονή στην ουρά', 'Step {value} of {max}': 'Βήμα {value} από {max}', 'Missing node pack: {name}': 'Λείπει το πακέτο κόμβων: {name}', 'Missing nodes: {names}': 'Λείπουν κόμβοι: {names}', + 'Missing model {file}{size}: put it in {place}': 'Λείπει το μοντέλο {file}{size}: βάλτε το στο {place}', 'accept its terms at the source first': 'αποδεχτείτε πρώτα τους όρους του στην πηγή', 'This workflow is not ready on the Comfy server.': 'Αυτή η ροή εργασίας δεν είναι έτοιμη στον διακομιστή Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Διακομιστής Comfy', 'Sign-in key': 'Κλειδί σύνδεσης', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Η Δημιουργία στέλνει εικόνες σε αυτόν τον διακομιστή Comfy και φέρνει πίσω τα αποτελέσματα. Χρειάζεται το Comfy-FormBridge-Suite στον φάκελο custom_nodes του διακομιστή.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Μόνο για διακομιστή που το ζητά. Φυλάσσεται στην Κλειδοθήκη αυτού του υπολογιστή και αποστέλλεται μόνο σε αυτόν τον διακομιστή.', + 'Comfy made nothing to add.': 'Το Comfy δεν έφτιαξε τίποτα για προσθήκη.', + 'Connected': 'Συνδεδεμένο', 'Test': 'Δοκιμή', 'Comfy server address': 'Διεύθυνση του διακομιστή Comfy', 'A key is saved.': 'Υπάρχει αποθηκευμένο κλειδί.', 'No key saved.': 'Δεν υπάρχει αποθηκευμένο κλειδί.', }; diff --git a/frontend/src/ui/i18n/es.ts b/frontend/src/ui/i18n/es.ts index dda33a7..ab57e10 100644 --- a/frontend/src/ui/i18n/es.ts +++ b/frontend/src/ui/i18n/es.ts @@ -1119,4 +1119,18 @@ export const es: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Tu propia clave de ElevenLabs. Se guarda en el llavero de este iPad y solo se envía a ese servicio.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'La escucha usa el reconocimiento de voz propio de este iPad, en el dispositivo. Pide permiso la primera vez.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'La escucha necesita permiso para usar el reconocimiento de voz. Permítelo para FormMorpheus en la app Ajustes.', + 'Generate with Comfy': 'Generar con Comfy', 'Comfy settings': 'Ajustes de Comfy', 'Generate': 'Generar', 'Generating': 'Generando', 'Retry with another seed': 'Reintentar con otra semilla', + 'Fluid shot from flipbook keyframes': 'Plano fluido a partir de los fotogramas clave de un flipbook', 'Animate a drawing': 'Animar un dibujo', 'Erase on a video': 'Borrar en un vídeo', 'Add to a video': 'Añadir a un vídeo', 'Relight a video': 'Reiluminar un vídeo', 'Matte': 'Máscara', 'Upscale': 'Ampliar', + 'Select a Flipbook with the painted keyframes.': 'Selecciona un flipbook con los fotogramas clave pintados.', 'Select a Drawing, Flipbook or picture to animate.': 'Selecciona un dibujo, un flipbook o una imagen para animar.', 'Select a video block.': 'Selecciona un bloque de vídeo.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Pinta sobre el primer fotograma del vídeo en un dibujo situado encima.', 'Open a movie first.': 'Abre primero una película.', 'Ready to use the selected blocks.': 'Listo para usar los bloques seleccionados.', + 'This Comfy server has no workflow for this mode.': 'Este servidor Comfy no tiene ningún flujo de trabajo para este modo.', 'Checking the Comfy server': 'Comprobando el servidor Comfy', 'Connected to {url}': 'Conectado a {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Este servidor Comfy es demasiado antiguo. Necesita la versión {v} o posterior.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite no está instalado. Ponlo en la carpeta custom_nodes de tu servidor Comfy y reinícialo.', 'The Comfy server could not be reached.': 'No se pudo conectar con el servidor Comfy.', + 'Preparing the pictures': 'Preparando las imágenes', 'Sending to Comfy': 'Enviando a Comfy', 'Bringing the result in': 'Trayendo el resultado', 'The job did not finish.': 'El trabajo no terminó.', 'seed {n}': 'semilla {n}', '{n} blocks added': '{n} bloques añadidos', 'Words added to the prompt.': 'Palabras añadidas al prompt.', 'The job gave nothing to place.': 'El trabajo no dio nada que colocar.', + 'Waiting in the queue: place {n}': 'En la cola de espera: puesto {n}', 'Waiting in the queue': 'En la cola de espera', 'Step {value} of {max}': 'Paso {value} de {max}', 'Missing node pack: {name}': 'Falta el paquete de nodos: {name}', 'Missing nodes: {names}': 'Faltan nodos: {names}', + 'Missing model {file}{size}: put it in {place}': 'Falta el modelo {file}{size}: ponlo en {place}', 'accept its terms at the source first': 'acepta antes sus condiciones en el origen', 'This workflow is not ready on the Comfy server.': 'Este flujo de trabajo no está listo en el servidor Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Servidor Comfy', 'Sign-in key': 'Clave de acceso', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Generar envía imágenes a este servidor Comfy y trae los resultados. Necesita Comfy-FormBridge-Suite en la carpeta custom_nodes del servidor.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Solo para un servidor que la pida. Se guarda en el llavero de este equipo y se envía únicamente a ese servidor.', + 'Comfy made nothing to add.': 'Comfy no generó nada que añadir.', + 'Connected': 'Conectado', 'Test': 'Probar', 'Comfy server address': 'Dirección del servidor Comfy', 'A key is saved.': 'Hay una clave guardada.', 'No key saved.': 'No hay ninguna clave guardada.', }; diff --git a/frontend/src/ui/i18n/fi.ts b/frontend/src/ui/i18n/fi.ts index b3de527..2b4ba5d 100644 --- a/frontend/src/ui/i18n/fi.ts +++ b/frontend/src/ui/i18n/fi.ts @@ -1034,4 +1034,18 @@ export const fi: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Oma ElevenLabs-avaimesi. Se säilytetään tämän iPadin avainnipussa ja lähetetään vain kyseiselle palvelulle.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Kuuntelu käyttää tämän iPadin omaa puheentunnistusta laitteella. Se pyytää luvan ensimmäisellä kerralla.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Kuuntelu tarvitsee luvan puheentunnistuksen käyttöön. Salli se FormMorpheusille Asetukset-sovelluksessa.', + 'Generate with Comfy': 'Luo Comfyllä', 'Comfy settings': 'Comfyn asetukset', 'Generate': 'Luo', 'Generating': 'Luodaan', 'Retry with another seed': 'Yritä uudelleen toisella siemenellä', + 'Fluid shot from flipbook keyframes': 'Sujuva kuvaus piirrosanimaation avainkuvista', 'Animate a drawing': 'Animoi piirros', 'Erase on a video': 'Poista videolta', 'Add to a video': 'Lisää videoon', 'Relight a video': 'Valaise video uudelleen', 'Matte': 'Maski', 'Upscale': 'Suurenna', + 'Select a Flipbook with the painted keyframes.': 'Valitse piirrosanimaatio, jossa on maalatut avainkuvat.', 'Select a Drawing, Flipbook or picture to animate.': 'Valitse animoitava piirros, piirrosanimaatio tai kuva.', 'Select a video block.': 'Valitse videolohko.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Maalaa videon ensimmäisen kuvan päälle sen yläpuolella olevalla piirroksella.', 'Open a movie first.': 'Avaa ensin elokuva.', 'Ready to use the selected blocks.': 'Valmis käyttämään valittuja lohkoja.', + 'This Comfy server has no workflow for this mode.': 'Tällä Comfy-palvelimella ei ole työnkulkua tälle tilalle.', 'Checking the Comfy server': 'Tarkistetaan Comfy-palvelinta', 'Connected to {url}': 'Yhdistetty osoitteeseen {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Tämä Comfy-palvelin on liian vanha. Se tarvitsee version {v} tai uudemman.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suitea ei ole asennettu. Laita se Comfy-palvelimesi custom_nodes-kansioon ja käynnistä palvelin uudelleen.', 'The Comfy server could not be reached.': 'Comfy-palvelinta ei tavoitettu.', + 'Preparing the pictures': 'Valmistellaan kuvia', 'Sending to Comfy': 'Lähetetään Comfylle', 'Bringing the result in': 'Tuodaan tulosta', 'The job did not finish.': 'Työ ei valmistunut.', 'seed {n}': 'siemen {n}', '{n} blocks added': '{n} lohkoa lisätty', 'Words added to the prompt.': 'Sanat lisättiin kehotteeseen.', 'The job gave nothing to place.': 'Työ ei tuottanut mitään sijoitettavaa.', + 'Waiting in the queue: place {n}': 'Odottaa jonossa: sija {n}', 'Waiting in the queue': 'Odottaa jonossa', 'Step {value} of {max}': 'Vaihe {value} / {max}', 'Missing node pack: {name}': 'Puuttuva solmupaketti: {name}', 'Missing nodes: {names}': 'Puuttuvat solmut: {names}', + 'Missing model {file}{size}: put it in {place}': 'Puuttuva malli {file}{size}: laita se kansioon {place}', 'accept its terms at the source first': 'hyväksy ensin sen ehdot lähteellä', 'This workflow is not ready on the Comfy server.': 'Tämä työnkulku ei ole valmis Comfy-palvelimella.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-palvelin', 'Sign-in key': 'Kirjautumisavain', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Luo lähettää kuvia tälle Comfy-palvelimelle ja tuo tulokset takaisin. Se tarvitsee Comfy-FormBridge-Suiten palvelimen custom_nodes-kansioon.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Vain palvelimelle, joka sitä pyytää. Se säilytetään tämän tietokoneen avainnipussa ja lähetetään vain sille palvelimelle.', + 'Comfy made nothing to add.': 'Comfy ei tehnyt mitään lisättävää.', + 'Connected': 'Yhdistetty', 'Test': 'Testaa', 'Comfy server address': 'Comfy-palvelimen osoite', 'A key is saved.': 'Avain on tallennettu.', 'No key saved.': 'Avainta ei ole tallennettu.', }; diff --git a/frontend/src/ui/i18n/fr.ts b/frontend/src/ui/i18n/fr.ts index 9db94b7..773ab77 100644 --- a/frontend/src/ui/i18n/fr.ts +++ b/frontend/src/ui/i18n/fr.ts @@ -1139,4 +1139,18 @@ export const fr: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "Votre propre clé ElevenLabs. Elle est conservée dans le trousseau de cet iPad et envoyée uniquement à ce service.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "L'écoute utilise la reconnaissance vocale propre à cet iPad, sur l'appareil. Elle demande l'autorisation la première fois.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "L'écoute a besoin de l'autorisation d'utiliser la reconnaissance vocale. Autorisez-la pour FormMorpheus dans l'app Réglages.", + 'Generate with Comfy': 'Générer avec Comfy', 'Comfy settings': 'Réglages de Comfy', 'Generate': 'Générer', 'Generating': 'Génération en cours', 'Retry with another seed': 'Réessayer avec une autre graine', + 'Fluid shot from flipbook keyframes': 'Plan fluide à partir des images clés d\'un folioscope', 'Animate a drawing': 'Animer un dessin', 'Erase on a video': 'Effacer dans une vidéo', 'Add to a video': 'Ajouter à une vidéo', 'Relight a video': 'Rééclairer une vidéo', 'Matte': 'Cache', 'Upscale': 'Agrandir', + 'Select a Flipbook with the painted keyframes.': 'Sélectionnez un folioscope avec les images clés peintes.', 'Select a Drawing, Flipbook or picture to animate.': 'Sélectionnez un dessin, un folioscope ou une image à animer.', 'Select a video block.': 'Sélectionnez un bloc vidéo.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Peignez sur la première image de la vidéo, dans un dessin placé au-dessus.', 'Open a movie first.': 'Ouvrez d\'abord un film.', 'Ready to use the selected blocks.': 'Prêt à utiliser les blocs sélectionnés.', + 'This Comfy server has no workflow for this mode.': 'Ce serveur Comfy n\'a aucun flux de travail pour ce mode.', 'Checking the Comfy server': 'Vérification du serveur Comfy', 'Connected to {url}': 'Connecté à {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Ce serveur Comfy est trop ancien. Il faut la version {v} ou une version plus récente.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite n\'est pas installé. Placez-le dans le dossier custom_nodes de votre serveur Comfy, puis redémarrez-le.', 'The Comfy server could not be reached.': 'Le serveur Comfy est injoignable.', + 'Preparing the pictures': 'Préparation des images', 'Sending to Comfy': 'Envoi à Comfy', 'Bringing the result in': 'Récupération du résultat', 'The job did not finish.': 'La tâche ne s\'est pas terminée.', 'seed {n}': 'graine {n}', '{n} blocks added': '{n} blocs ajoutés', 'Words added to the prompt.': 'Mots ajoutés au prompt.', 'The job gave nothing to place.': 'La tâche n\'a rien produit à placer.', + 'Waiting in the queue: place {n}': 'En file d\'attente : place {n}', 'Waiting in the queue': 'En file d\'attente', 'Step {value} of {max}': 'Étape {value} sur {max}', 'Missing node pack: {name}': 'Pack de nœuds manquant : {name}', 'Missing nodes: {names}': 'Nœuds manquants : {names}', + 'Missing model {file}{size}: put it in {place}': 'Modèle manquant {file}{size} : placez-le dans {place}', 'accept its terms at the source first': 'acceptez d\'abord ses conditions à la source', 'This workflow is not ready on the Comfy server.': 'Ce flux de travail n\'est pas prêt sur le serveur Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Serveur Comfy', 'Sign-in key': 'Clé de connexion', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Générer envoie des images à ce serveur Comfy et rapporte les résultats. Il faut Comfy-FormBridge-Suite dans le dossier custom_nodes du serveur.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Seulement pour un serveur qui en demande une. Elle est conservée dans le trousseau de cet ordinateur et envoyée uniquement à ce serveur.', + 'Comfy made nothing to add.': 'Comfy n\'a rien produit à ajouter.', + 'Connected': 'Connecté', 'Test': 'Tester', 'Comfy server address': 'Adresse du serveur Comfy', 'A key is saved.': 'Une clé est enregistrée.', 'No key saved.': 'Aucune clé enregistrée.', }; diff --git a/frontend/src/ui/i18n/hi.ts b/frontend/src/ui/i18n/hi.ts index b869009..db1ecca 100644 --- a/frontend/src/ui/i18n/hi.ts +++ b/frontend/src/ui/i18n/hi.ts @@ -1082,4 +1082,18 @@ export const hi: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "आपकी अपनी ElevenLabs कुंजी। यह इस iPad के कीचेन में रखी जाती है और केवल उसी सेवा को भेजी जाती है।", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "सुनना इस iPad की अपनी स्पीच रिकग्निशन का उपयोग करता है, डिवाइस पर ही। यह पहली बार अनुमति माँगता है।", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "सुनने के लिए स्पीच रिकग्निशन का उपयोग करने की अनुमति चाहिए। सेटिंग ऐप में FormMorpheus के लिए इसे अनुमति दें।", + 'Generate with Comfy': 'Comfy से बनाएँ', 'Comfy settings': 'Comfy सेटिंग', 'Generate': 'बनाएँ', 'Generating': 'बनाया जा रहा है', 'Retry with another seed': 'दूसरे सीड से फिर कोशिश करें', + 'Fluid shot from flipbook keyframes': 'फ़्लिपबुक के कीफ़्रेम से सहज शॉट', 'Animate a drawing': 'ड्रॉइंग को एनिमेट करें', 'Erase on a video': 'वीडियो पर मिटाएँ', 'Add to a video': 'वीडियो में जोड़ें', 'Relight a video': 'वीडियो की रोशनी फिर से करें', 'Matte': 'मैट', 'Upscale': 'बड़ा करें', + 'Select a Flipbook with the painted keyframes.': 'पेंट किए हुए कीफ़्रेम वाली फ़्लिपबुक चुनें।', 'Select a Drawing, Flipbook or picture to animate.': 'एनिमेट करने के लिए कोई ड्रॉइंग, फ़्लिपबुक या तस्वीर चुनें।', 'Select a video block.': 'कोई वीडियो ब्लॉक चुनें।', + 'Paint over the video\'s first frame on a Drawing above it.': 'उसके ऊपर की किसी ड्रॉइंग पर वीडियो के पहले फ़्रेम के ऊपर पेंट करें।', 'Open a movie first.': 'पहले कोई फ़िल्म खोलें।', 'Ready to use the selected blocks.': 'चुने हुए ब्लॉक इस्तेमाल करने के लिए तैयार।', + 'This Comfy server has no workflow for this mode.': 'इस Comfy सर्वर पर इस मोड के लिए कोई वर्कफ़्लो नहीं है।', 'Checking the Comfy server': 'Comfy सर्वर जाँचा जा रहा है', 'Connected to {url}': '{url} से जुड़ा', 'This Comfy server is too old. It needs version {v} or newer.': 'यह Comfy सर्वर बहुत पुराना है। इसे संस्करण {v} या नया चाहिए।', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite इंस्टॉल नहीं है। इसे अपने Comfy सर्वर के custom_nodes फ़ोल्डर में रखें और सर्वर दोबारा शुरू करें।', 'The Comfy server could not be reached.': 'Comfy सर्वर तक नहीं पहुँचा जा सका।', + 'Preparing the pictures': 'तस्वीरें तैयार की जा रही हैं', 'Sending to Comfy': 'Comfy को भेजा जा रहा है', 'Bringing the result in': 'नतीजा लाया जा रहा है', 'The job did not finish.': 'काम पूरा नहीं हुआ।', 'seed {n}': 'सीड {n}', '{n} blocks added': '{n} ब्लॉक जोड़े गए', 'Words added to the prompt.': 'शब्द प्रॉम्प्ट में जोड़े गए।', 'The job gave nothing to place.': 'काम से रखने लायक कुछ नहीं मिला।', + 'Waiting in the queue: place {n}': 'कतार में इंतज़ार: स्थान {n}', 'Waiting in the queue': 'कतार में इंतज़ार', 'Step {value} of {max}': '{max} में से चरण {value}', 'Missing node pack: {name}': 'नोड पैक नहीं मिला: {name}', 'Missing nodes: {names}': 'नोड नहीं मिले: {names}', + 'Missing model {file}{size}: put it in {place}': 'मॉडल {file}{size} नहीं मिला: इसे {place} में रखें', 'accept its terms at the source first': 'पहले स्रोत पर इसकी शर्तें स्वीकार करें', 'This workflow is not ready on the Comfy server.': 'यह वर्कफ़्लो Comfy सर्वर पर तैयार नहीं है।', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy सर्वर', 'Sign-in key': 'साइन-इन कुंजी', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'बनाएँ तस्वीरें इस Comfy सर्वर को भेजता है और नतीजे वापस लाता है। इसके लिए सर्वर के custom_nodes फ़ोल्डर में Comfy-FormBridge-Suite चाहिए।', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'सिर्फ़ उस सर्वर के लिए जो इसे माँगता हो। यह इस कंप्यूटर की कीचेन में रखी जाती है और केवल उसी सर्वर को भेजी जाती है।', + 'Comfy made nothing to add.': 'Comfy ने जोड़ने के लिए कुछ नहीं बनाया।', + 'Connected': 'जुड़ा हुआ', 'Test': 'जाँचें', 'Comfy server address': 'Comfy सर्वर का पता', 'A key is saved.': 'एक कुंजी सहेजी हुई है।', 'No key saved.': 'कोई कुंजी सहेजी नहीं है।', }; diff --git a/frontend/src/ui/i18n/hu.ts b/frontend/src/ui/i18n/hu.ts index b03eece..4afe18d 100644 --- a/frontend/src/ui/i18n/hu.ts +++ b/frontend/src/ui/i18n/hu.ts @@ -900,4 +900,18 @@ export const hu: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "Saját ElevenLabs-kulcsod. Az iPad kulcstartójában tárolódik, és csak arra a szolgáltatásra kerül elküldésre.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "A hallgatás az iPad saját beszédfelismerését használja, magán az eszközön. Első alkalommal engedélyt kér.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "A hallgatáshoz engedély kell a beszédfelismerés használatához. Engedélyezd a FormMorpheus számára a Beállítások alkalmazásban.", + 'Generate with Comfy': 'Létrehozás Comfyvel', 'Comfy settings': 'Comfy-beállítások', 'Generate': 'Létrehozás', 'Generating': 'Létrehozás folyamatban', 'Retry with another seed': 'Újrapróbálás másik seeddel', + 'Fluid shot from flipbook keyframes': 'Folyékony jelenet egy flipbook kulcsképkockáiból', 'Animate a drawing': 'Rajz animálása', 'Erase on a video': 'Törlés egy videón', 'Add to a video': 'Hozzáadás egy videóhoz', 'Relight a video': 'Videó újravilágítása', 'Matte': 'Maszk', 'Upscale': 'Nagyítás', + 'Select a Flipbook with the painted keyframes.': 'Válassz ki egy flipbookot a megfestett kulcsképkockákkal.', 'Select a Drawing, Flipbook or picture to animate.': 'Válassz ki egy rajzot, flipbookot vagy képet az animáláshoz.', 'Select a video block.': 'Válassz ki egy videóblokkot.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Fess a videó első képkockájára egy fölötte lévő rajzon.', 'Open a movie first.': 'Először nyiss meg egy filmet.', 'Ready to use the selected blocks.': 'Készen áll a kijelölt blokkok használatára.', + 'This Comfy server has no workflow for this mode.': 'Ennek a Comfy-kiszolgálónak nincs munkafolyamata ehhez a módhoz.', 'Checking the Comfy server': 'A Comfy-kiszolgáló ellenőrzése', 'Connected to {url}': 'Csatlakozva: {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Ez a Comfy-kiszolgáló túl régi. A(z) {v} vagy újabb verzió kell hozzá.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'A Comfy-FormBridge-Suite nincs telepítve. Tedd a Comfy-kiszolgálód custom_nodes mappájába, és indítsd újra a kiszolgálót.', 'The Comfy server could not be reached.': 'A Comfy-kiszolgáló nem érhető el.', + 'Preparing the pictures': 'A képek előkészítése', 'Sending to Comfy': 'Küldés a Comfynak', 'Bringing the result in': 'Az eredmény behozatala', 'The job did not finish.': 'A feladat nem fejeződött be.', 'seed {n}': 'seed: {n}', '{n} blocks added': '{n} blokk hozzáadva', 'Words added to the prompt.': 'Szavak hozzáadva a prompthoz.', 'The job gave nothing to place.': 'A feladat nem adott semmit, amit el lehetne helyezni.', + 'Waiting in the queue: place {n}': 'Várakozás a sorban: {n}. hely', 'Waiting in the queue': 'Várakozás a sorban', 'Step {value} of {max}': '{value}. lépés, összesen {max}', 'Missing node pack: {name}': 'Hiányzó csomópontcsomag: {name}', 'Missing nodes: {names}': 'Hiányzó csomópontok: {names}', + 'Missing model {file}{size}: put it in {place}': 'Hiányzó modell: {file}{size}, tedd ide: {place}', 'accept its terms at the source first': 'előbb fogadd el a feltételeit a forrásnál', 'This workflow is not ready on the Comfy server.': 'Ez a munkafolyamat nem áll készen a Comfy-kiszolgálón.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-kiszolgáló', 'Sign-in key': 'Bejelentkezési kulcs', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'A Létrehozás képeket küld ennek a Comfy-kiszolgálónak, és visszahozza az eredményeket. A kiszolgáló custom_nodes mappájában ott kell lennie a Comfy-FormBridge-Suite-nak.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Csak olyan kiszolgálóhoz, amelyik kéri. Ennek a számítógépnek a kulcstartójában tárolódik, és csak annak a kiszolgálónak lesz elküldve.', + 'Comfy made nothing to add.': 'A Comfy nem készített semmit, amit hozzá lehetne adni.', + 'Connected': 'Csatlakozva', 'Test': 'Próba', 'Comfy server address': 'A Comfy-kiszolgáló címe', 'A key is saved.': 'Van mentett kulcs.', 'No key saved.': 'Nincs mentett kulcs.', }; diff --git a/frontend/src/ui/i18n/id.ts b/frontend/src/ui/i18n/id.ts index 5e11081..f6f65d4 100644 --- a/frontend/src/ui/i18n/id.ts +++ b/frontend/src/ui/i18n/id.ts @@ -1083,4 +1083,18 @@ export const id: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "Kunci ElevenLabs milik Anda sendiri. Kunci ini disimpan di keychain iPad ini dan hanya dikirim ke layanan tersebut.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "Mendengarkan memakai pengenalan ucapan bawaan iPad ini, langsung di perangkat. Izin akan diminta saat pertama kali.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "Mendengarkan memerlukan izin untuk memakai pengenalan ucapan. Izinkan untuk FormMorpheus di app Pengaturan.", + 'Generate with Comfy': 'Buat dengan Comfy', 'Comfy settings': 'Pengaturan Comfy', 'Generate': 'Buat', 'Generating': 'Sedang membuat', 'Retry with another seed': 'Coba lagi dengan seed lain', + 'Fluid shot from flipbook keyframes': 'Adegan mengalir dari keyframe flipbook', 'Animate a drawing': 'Animasikan gambar', 'Erase on a video': 'Hapus pada video', 'Add to a video': 'Tambahkan ke video', 'Relight a video': 'Atur ulang pencahayaan video', 'Matte': 'Matte', 'Upscale': 'Perbesar', + 'Select a Flipbook with the painted keyframes.': 'Pilih flipbook dengan keyframe yang sudah dilukis.', 'Select a Drawing, Flipbook or picture to animate.': 'Pilih gambar, flipbook, atau foto untuk dianimasikan.', 'Select a video block.': 'Pilih satu blok video.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Lukis di atas bingkai pertama video pada sebuah gambar di atasnya.', 'Open a movie first.': 'Buka film terlebih dahulu.', 'Ready to use the selected blocks.': 'Siap memakai blok yang dipilih.', + 'This Comfy server has no workflow for this mode.': 'Server Comfy ini tidak punya alur kerja untuk mode ini.', 'Checking the Comfy server': 'Memeriksa server Comfy', 'Connected to {url}': 'Terhubung ke {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Server Comfy ini terlalu lama. Butuh versi {v} atau yang lebih baru.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite belum terpasang. Letakkan di folder custom_nodes pada server Comfy Anda, lalu mulai ulang server.', 'The Comfy server could not be reached.': 'Server Comfy tidak dapat dijangkau.', + 'Preparing the pictures': 'Menyiapkan gambar', 'Sending to Comfy': 'Mengirim ke Comfy', 'Bringing the result in': 'Mengambil hasilnya', 'The job did not finish.': 'Tugas tidak selesai.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} blok ditambahkan', 'Words added to the prompt.': 'Kata ditambahkan ke prompt.', 'The job gave nothing to place.': 'Tugas tidak menghasilkan apa pun untuk ditempatkan.', + 'Waiting in the queue: place {n}': 'Menunggu dalam antrean: urutan {n}', 'Waiting in the queue': 'Menunggu dalam antrean', 'Step {value} of {max}': 'Langkah {value} dari {max}', 'Missing node pack: {name}': 'Paket node tidak ada: {name}', 'Missing nodes: {names}': 'Node tidak ada: {names}', + 'Missing model {file}{size}: put it in {place}': 'Model {file}{size} tidak ada: letakkan di {place}', 'accept its terms at the source first': 'setujui dulu ketentuannya di sumbernya', 'This workflow is not ready on the Comfy server.': 'Alur kerja ini belum siap di server Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Server Comfy', 'Sign-in key': 'Kunci masuk', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Buat mengirim gambar ke server Comfy ini dan membawa hasilnya kembali. Diperlukan Comfy-FormBridge-Suite di folder custom_nodes server.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Hanya untuk server yang memintanya. Disimpan di keychain komputer ini dan hanya dikirim ke server itu.', + 'Comfy made nothing to add.': 'Comfy tidak membuat apa pun untuk ditambahkan.', + 'Connected': 'Terhubung', 'Test': 'Uji', 'Comfy server address': 'Alamat server Comfy', 'A key is saved.': 'Sebuah kunci tersimpan.', 'No key saved.': 'Belum ada kunci tersimpan.', }; diff --git a/frontend/src/ui/i18n/it.ts b/frontend/src/ui/i18n/it.ts index 04515a2..dc65885 100644 --- a/frontend/src/ui/i18n/it.ts +++ b/frontend/src/ui/i18n/it.ts @@ -1157,4 +1157,18 @@ export const it: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "La tua chiave ElevenLabs. Viene conservata nel portachiavi di questo iPad e inviata solo a quel servizio.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "L'ascolto usa il riconoscimento vocale di questo iPad, direttamente sul dispositivo. Chiede il permesso la prima volta.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "L'ascolto ha bisogno del permesso di usare il riconoscimento vocale. Consentilo per FormMorpheus nell'app Impostazioni.", + 'Generate with Comfy': 'Genera con Comfy', 'Comfy settings': 'Impostazioni di Comfy', 'Generate': 'Genera', 'Generating': 'Generazione in corso', 'Retry with another seed': 'Riprova con un altro seed', + 'Fluid shot from flipbook keyframes': 'Inquadratura fluida dai fotogrammi chiave di un flipbook', 'Animate a drawing': 'Anima un disegno', 'Erase on a video': 'Cancella in un video', 'Add to a video': 'Aggiungi a un video', 'Relight a video': 'Rimodella la luce di un video', 'Matte': 'Maschera', 'Upscale': 'Ingrandisci', + 'Select a Flipbook with the painted keyframes.': 'Seleziona un flipbook con i fotogrammi chiave dipinti.', 'Select a Drawing, Flipbook or picture to animate.': 'Seleziona un disegno, un flipbook o un\'immagine da animare.', 'Select a video block.': 'Seleziona un blocco video.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Dipingi sul primo fotogramma del video in un disegno sopra di esso.', 'Open a movie first.': 'Apri prima un filmato.', 'Ready to use the selected blocks.': 'Pronto a usare i blocchi selezionati.', + 'This Comfy server has no workflow for this mode.': 'Questo server Comfy non ha alcun flusso di lavoro per questa modalità.', 'Checking the Comfy server': 'Controllo del server Comfy', 'Connected to {url}': 'Connesso a {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Questo server Comfy è troppo vecchio. Serve la versione {v} o successiva.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite non è installato. Mettilo nella cartella custom_nodes del tuo server Comfy e riavvialo.', 'The Comfy server could not be reached.': 'Impossibile raggiungere il server Comfy.', + 'Preparing the pictures': 'Preparazione delle immagini', 'Sending to Comfy': 'Invio a Comfy', 'Bringing the result in': 'Recupero del risultato', 'The job did not finish.': 'Il lavoro non è terminato.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} blocchi aggiunti', 'Words added to the prompt.': 'Parole aggiunte al prompt.', 'The job gave nothing to place.': 'Il lavoro non ha prodotto nulla da inserire.', + 'Waiting in the queue: place {n}': 'In coda: posizione {n}', 'Waiting in the queue': 'In coda', 'Step {value} of {max}': 'Passo {value} di {max}', 'Missing node pack: {name}': 'Pacchetto di nodi mancante: {name}', 'Missing nodes: {names}': 'Nodi mancanti: {names}', + 'Missing model {file}{size}: put it in {place}': 'Modello mancante {file}{size}: mettilo in {place}', 'accept its terms at the source first': 'accetta prima le condizioni alla fonte', 'This workflow is not ready on the Comfy server.': 'Questo flusso di lavoro non è pronto sul server Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Server Comfy', 'Sign-in key': 'Chiave di accesso', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Genera invia immagini a questo server Comfy e riporta i risultati. Serve Comfy-FormBridge-Suite nella cartella custom_nodes del server.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Solo per un server che ne richiede una. Viene conservata nel portachiavi di questo computer e inviata solo a quel server.', + 'Comfy made nothing to add.': 'Comfy non ha prodotto nulla da aggiungere.', + 'Connected': 'Connesso', 'Test': 'Prova', 'Comfy server address': 'Indirizzo del server Comfy', 'A key is saved.': 'Una chiave è salvata.', 'No key saved.': 'Nessuna chiave salvata.', }; diff --git a/frontend/src/ui/i18n/ja.ts b/frontend/src/ui/i18n/ja.ts index cd023ba..38097ad 100644 --- a/frontend/src/ui/i18n/ja.ts +++ b/frontend/src/ui/i18n/ja.ts @@ -1080,4 +1080,18 @@ export const ja: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "ご自身の ElevenLabs キーです。この iPad のキーチェーンに保管され、そのサービスにのみ送信されます。", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "聞き取りは、この iPad 自身の音声認識をデバイス上で使います。初回に許可を求められます。", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "聞き取りには音声認識を使う許可が必要です。設定アプリで FormMorpheus に許可してください。", + 'Generate with Comfy': 'Comfy で生成', 'Comfy settings': 'Comfy の設定', 'Generate': '生成', 'Generating': '生成中', 'Retry with another seed': '別のシードでやり直す', + 'Fluid shot from flipbook keyframes': 'パラパラ漫画のキーフレームからなめらかなショットを作る', 'Animate a drawing': '絵をアニメーションにする', 'Erase on a video': 'ビデオ上で消す', 'Add to a video': 'ビデオに追加', 'Relight a video': 'ビデオのライティングを変える', 'Matte': 'マット', 'Upscale': 'アップスケール', + 'Select a Flipbook with the painted keyframes.': '描いたキーフレームのあるパラパラ漫画を選択してください。', 'Select a Drawing, Flipbook or picture to animate.': 'アニメーションにする絵、パラパラ漫画、または画像を選択してください。', 'Select a video block.': 'ビデオブロックを選択してください。', + 'Paint over the video\'s first frame on a Drawing above it.': '上にある絵で、ビデオの最初のフレームの上に描いてください。', 'Open a movie first.': '先にムービーを開いてください。', 'Ready to use the selected blocks.': '選択したブロックを使用できます。', + 'This Comfy server has no workflow for this mode.': 'この Comfy サーバーには、このモード用のワークフローがありません。', 'Checking the Comfy server': 'Comfy サーバーを確認しています', 'Connected to {url}': '{url} に接続しました', 'This Comfy server is too old. It needs version {v} or newer.': 'この Comfy サーバーは古すぎます。バージョン {v} 以降が必要です。', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite がインストールされていません。Comfy サーバーの custom_nodes フォルダに入れて、サーバーを再起動してください。', 'The Comfy server could not be reached.': 'Comfy サーバーに接続できませんでした。', + 'Preparing the pictures': '画像を準備しています', 'Sending to Comfy': 'Comfy に送信しています', 'Bringing the result in': '結果を取り込んでいます', 'The job did not finish.': 'ジョブは完了しませんでした。', 'seed {n}': 'シード {n}', '{n} blocks added': '{n} 個のブロックを追加しました', 'Words added to the prompt.': 'プロンプトに言葉を追加しました。', 'The job gave nothing to place.': 'ジョブから配置できるものは得られませんでした。', + 'Waiting in the queue: place {n}': '待機列で待っています: {n} 番目', 'Waiting in the queue': '待機列で待っています', 'Step {value} of {max}': 'ステップ {value} / {max}', 'Missing node pack: {name}': 'ノードパックがありません: {name}', 'Missing nodes: {names}': 'ノードがありません: {names}', + 'Missing model {file}{size}: put it in {place}': 'モデル {file}{size} がありません: {place} に入れてください', 'accept its terms at the source first': '先に提供元で利用条件に同意してください', 'This workflow is not ready on the Comfy server.': 'このワークフローは Comfy サーバーでまだ使えません。', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy サーバー', 'Sign-in key': 'サインインキー', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': '「生成」は画像をこの Comfy サーバーに送り、結果を持ち帰ります。サーバーの custom_nodes フォルダに Comfy-FormBridge-Suite が必要です。', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'キーを求めるサーバー専用です。このコンピュータのキーチェーンに保管され、そのサーバーにだけ送られます。', + 'Comfy made nothing to add.': 'Comfy は追加するものを何も作りませんでした。', + 'Connected': '接続済み', 'Test': 'テスト', 'Comfy server address': 'Comfy サーバーのアドレス', 'A key is saved.': 'キーが保存されています。', 'No key saved.': '保存されたキーはありません。', }; diff --git a/frontend/src/ui/i18n/ko.ts b/frontend/src/ui/i18n/ko.ts index 2d645cb..36f4612 100644 --- a/frontend/src/ui/i18n/ko.ts +++ b/frontend/src/ui/i18n/ko.ts @@ -1080,4 +1080,18 @@ export const ko: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': "직접 만든 ElevenLabs 키입니다. 이 iPad의 키체인에 보관되며 해당 서비스에만 전송됩니다.", 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': "듣기는 이 iPad의 자체 음성 인식을 기기에서 사용합니다. 처음 사용할 때 권한을 요청합니다.", 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': "듣기에는 음성 인식을 사용할 권한이 필요합니다. 설정 앱에서 FormMorpheus에 허용하세요.", + 'Generate with Comfy': 'Comfy로 생성', 'Comfy settings': 'Comfy 설정', 'Generate': '생성', 'Generating': '생성하는 중', 'Retry with another seed': '다른 시드로 다시 시도', + 'Fluid shot from flipbook keyframes': '플립북 키프레임으로 부드러운 샷 만들기', 'Animate a drawing': '그림을 애니메이션으로 만들기', 'Erase on a video': '비디오에서 지우기', 'Add to a video': '비디오에 추가', 'Relight a video': '비디오 조명 다시 입히기', 'Matte': '매트', 'Upscale': '업스케일', + 'Select a Flipbook with the painted keyframes.': '그린 키프레임이 있는 플립북을 선택하세요.', 'Select a Drawing, Flipbook or picture to animate.': '애니메이션으로 만들 그림, 플립북 또는 이미지를 선택하세요.', 'Select a video block.': '비디오 블록을 선택하세요.', + 'Paint over the video\'s first frame on a Drawing above it.': '위에 있는 그림에서 비디오의 첫 프레임 위에 그리세요.', 'Open a movie first.': '먼저 영화를 여세요.', 'Ready to use the selected blocks.': '선택한 블록을 사용할 준비가 되었습니다.', + 'This Comfy server has no workflow for this mode.': '이 Comfy 서버에는 이 모드용 워크플로가 없습니다.', 'Checking the Comfy server': 'Comfy 서버를 확인하는 중', 'Connected to {url}': '{url}에 연결됨', 'This Comfy server is too old. It needs version {v} or newer.': '이 Comfy 서버는 너무 오래되었습니다. {v} 버전 이상이 필요합니다.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite가 설치되어 있지 않습니다. Comfy 서버의 custom_nodes 폴더에 넣고 서버를 다시 시작하세요.', 'The Comfy server could not be reached.': 'Comfy 서버에 연결할 수 없습니다.', + 'Preparing the pictures': '이미지를 준비하는 중', 'Sending to Comfy': 'Comfy로 보내는 중', 'Bringing the result in': '결과를 가져오는 중', 'The job did not finish.': '작업이 끝나지 않았습니다.', 'seed {n}': '시드 {n}', '{n} blocks added': '블록 {n}개 추가됨', 'Words added to the prompt.': '프롬프트에 단어를 추가했습니다.', 'The job gave nothing to place.': '작업에서 배치할 결과가 나오지 않았습니다.', + 'Waiting in the queue: place {n}': '대기열에서 기다리는 중: {n}번째', 'Waiting in the queue': '대기열에서 기다리는 중', 'Step {value} of {max}': '{max}단계 중 {value}단계', 'Missing node pack: {name}': '노드 팩 없음: {name}', 'Missing nodes: {names}': '노드 없음: {names}', + 'Missing model {file}{size}: put it in {place}': '모델 {file}{size} 없음: {place}에 넣으세요', 'accept its terms at the source first': '먼저 제공처에서 약관에 동의하세요', 'This workflow is not ready on the Comfy server.': '이 워크플로는 Comfy 서버에서 아직 준비되지 않았습니다.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy 서버', 'Sign-in key': '로그인 키', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': '생성은 이미지를 이 Comfy 서버로 보내고 결과를 가져옵니다. 서버의 custom_nodes 폴더에 Comfy-FormBridge-Suite가 필요합니다.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': '키를 요구하는 서버에만 필요합니다. 이 컴퓨터의 키체인에 보관되며 해당 서버로만 전송됩니다.', + 'Comfy made nothing to add.': 'Comfy가 추가할 것을 만들지 않았습니다.', + 'Connected': '연결됨', 'Test': '테스트', 'Comfy server address': 'Comfy 서버 주소', 'A key is saved.': '키가 저장되어 있습니다.', 'No key saved.': '저장된 키가 없습니다.', }; diff --git a/frontend/src/ui/i18n/nb.ts b/frontend/src/ui/i18n/nb.ts index ada1b3e..5f5d6e1 100644 --- a/frontend/src/ui/i18n/nb.ts +++ b/frontend/src/ui/i18n/nb.ts @@ -1061,4 +1061,18 @@ export const nb: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Din egen ElevenLabs-nøkkel. Den lagres i nøkkelringen på denne iPaden og sendes bare til den tjenesten.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Lytting bruker denne iPadens egen talegjenkjenning, direkte på enheten. Den ber om tillatelse første gang.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Lytting trenger tillatelse til å bruke talegjenkjenning. Tillat det for FormMorpheus i Innstillinger-appen.', + 'Generate with Comfy': 'Generer med Comfy', 'Comfy settings': 'Comfy-innstillinger', 'Generate': 'Generer', 'Generating': 'Genererer', 'Retry with another seed': 'Prøv igjen med et annet seed', + 'Fluid shot from flipbook keyframes': 'Flytende opptak fra et flipbooks nøkkelbilder', 'Animate a drawing': 'Animer en tegning', 'Erase on a video': 'Slett på en video', 'Add to a video': 'Legg til i en video', 'Relight a video': 'Omlys en video', 'Matte': 'Matte', 'Upscale': 'Oppskaler', + 'Select a Flipbook with the painted keyframes.': 'Velg et flipbook med de malte nøkkelbildene.', 'Select a Drawing, Flipbook or picture to animate.': 'Velg en tegning, et flipbook eller et bilde som skal animeres.', 'Select a video block.': 'Velg en videoblokk.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Mal over videoens første bilde på en tegning over den.', 'Open a movie first.': 'Åpne en film først.', 'Ready to use the selected blocks.': 'Klar til å bruke de valgte blokkene.', + 'This Comfy server has no workflow for this mode.': 'Denne Comfy-serveren har ingen arbeidsflyt for denne modusen.', 'Checking the Comfy server': 'Sjekker Comfy-serveren', 'Connected to {url}': 'Koblet til {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Denne Comfy-serveren er for gammel. Den trenger versjon {v} eller nyere.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite er ikke installert. Legg den i mappen custom_nodes på Comfy-serveren din, og start serveren på nytt.', 'The Comfy server could not be reached.': 'Fikk ikke kontakt med Comfy-serveren.', + 'Preparing the pictures': 'Forbereder bildene', 'Sending to Comfy': 'Sender til Comfy', 'Bringing the result in': 'Henter inn resultatet', 'The job did not finish.': 'Jobben ble ikke ferdig.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} blokker lagt til', 'Words added to the prompt.': 'Ord lagt til i prompten.', 'The job gave nothing to place.': 'Jobben ga ingenting å plassere.', + 'Waiting in the queue: place {n}': 'Venter i køen: plass {n}', 'Waiting in the queue': 'Venter i køen', 'Step {value} of {max}': 'Trinn {value} av {max}', 'Missing node pack: {name}': 'Manglende nodepakke: {name}', 'Missing nodes: {names}': 'Manglende noder: {names}', + 'Missing model {file}{size}: put it in {place}': 'Manglende modell {file}{size}: legg den i {place}', 'accept its terms at the source first': 'godta vilkårene ved kilden først', 'This workflow is not ready on the Comfy server.': 'Denne arbeidsflyten er ikke klar på Comfy-serveren.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-server', 'Sign-in key': 'Påloggingsnøkkel', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Generer sender bilder til denne Comfy-serveren og henter resultatene tilbake. Den trenger Comfy-FormBridge-Suite i serverens mappe custom_nodes.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Bare for en server som ber om en. Den lagres i nøkkelringen på denne datamaskinen og sendes bare til den serveren.', + 'Comfy made nothing to add.': 'Comfy laget ingenting å legge til.', + 'Connected': 'Tilkoblet', 'Test': 'Test', 'Comfy server address': 'Adressen til Comfy-serveren', 'A key is saved.': 'En nøkkel er lagret.', 'No key saved.': 'Ingen nøkkel lagret.', }; diff --git a/frontend/src/ui/i18n/nl.ts b/frontend/src/ui/i18n/nl.ts index 9c67acc..7fc0652 100644 --- a/frontend/src/ui/i18n/nl.ts +++ b/frontend/src/ui/i18n/nl.ts @@ -1061,4 +1061,18 @@ export const nl: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Je eigen ElevenLabs-sleutel. Hij wordt bewaard in de sleutelhanger van deze iPad en alleen naar die dienst gestuurd.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Luisteren gebruikt de eigen spraakherkenning van deze iPad, op het apparaat zelf. De eerste keer vraagt het om toestemming.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Luisteren heeft toestemming nodig om spraakherkenning te gebruiken. Sta het toe voor FormMorpheus in de app Instellingen.', + 'Generate with Comfy': 'Genereren met Comfy', 'Comfy settings': 'Comfy-instellingen', 'Generate': 'Genereren', 'Generating': 'Bezig met genereren', 'Retry with another seed': 'Opnieuw proberen met een andere seed', + 'Fluid shot from flipbook keyframes': 'Vloeiende shot uit de keyframes van een flipboek', 'Animate a drawing': 'Een tekening animeren', 'Erase on a video': 'Wissen in een video', 'Add to a video': 'Toevoegen aan een video', 'Relight a video': 'Een video opnieuw belichten', 'Matte': 'Matte', 'Upscale': 'Opschalen', + 'Select a Flipbook with the painted keyframes.': 'Selecteer een flipboek met de geschilderde keyframes.', 'Select a Drawing, Flipbook or picture to animate.': 'Selecteer een tekening, flipboek of afbeelding om te animeren.', 'Select a video block.': 'Selecteer een videoblok.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Schilder over het eerste beeld van de video op een tekening erboven.', 'Open a movie first.': 'Open eerst een film.', 'Ready to use the selected blocks.': 'Klaar om de geselecteerde blokken te gebruiken.', + 'This Comfy server has no workflow for this mode.': 'Deze Comfy-server heeft geen workflow voor deze modus.', 'Checking the Comfy server': 'De Comfy-server wordt gecontroleerd', 'Connected to {url}': 'Verbonden met {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Deze Comfy-server is te oud. Hij heeft versie {v} of nieuwer nodig.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite is niet geïnstalleerd. Zet het in de map custom_nodes van je Comfy-server en start de server opnieuw op.', 'The Comfy server could not be reached.': 'De Comfy-server is niet bereikbaar.', + 'Preparing the pictures': 'De beelden worden voorbereid', 'Sending to Comfy': 'Versturen naar Comfy', 'Bringing the result in': 'Het resultaat wordt opgehaald', 'The job did not finish.': 'De taak is niet voltooid.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} blokken toegevoegd', 'Words added to the prompt.': 'Woorden toegevoegd aan de prompt.', 'The job gave nothing to place.': 'De taak leverde niets op om te plaatsen.', + 'Waiting in the queue: place {n}': 'Wacht in de wachtrij: plaats {n}', 'Waiting in the queue': 'Wacht in de wachtrij', 'Step {value} of {max}': 'Stap {value} van {max}', 'Missing node pack: {name}': 'Ontbrekend nodepakket: {name}', 'Missing nodes: {names}': 'Ontbrekende nodes: {names}', + 'Missing model {file}{size}: put it in {place}': 'Ontbrekend model {file}{size}: zet het in {place}', 'accept its terms at the source first': 'accepteer eerst de voorwaarden bij de bron', 'This workflow is not ready on the Comfy server.': 'Deze workflow is niet klaar op de Comfy-server.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-server', 'Sign-in key': 'Aanmeldsleutel', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Genereren stuurt beelden naar deze Comfy-server en haalt de resultaten terug. Het heeft Comfy-FormBridge-Suite nodig in de map custom_nodes van de server.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Alleen voor een server die erom vraagt. Hij wordt bewaard in de sleutelhanger van deze computer en alleen naar die server gestuurd.', + 'Comfy made nothing to add.': 'Comfy heeft niets gemaakt om toe te voegen.', + 'Connected': 'Verbonden', 'Test': 'Testen', 'Comfy server address': 'Adres van de Comfy-server', 'A key is saved.': 'Er is een sleutel opgeslagen.', 'No key saved.': 'Geen sleutel opgeslagen.', }; diff --git a/frontend/src/ui/i18n/pl.ts b/frontend/src/ui/i18n/pl.ts index 7261258..3546813 100644 --- a/frontend/src/ui/i18n/pl.ts +++ b/frontend/src/ui/i18n/pl.ts @@ -903,4 +903,18 @@ export const pl: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Twój własny klucz ElevenLabs. Jest przechowywany w pęku kluczy tego iPada i wysyłany tylko do tej usługi.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Słuchanie korzysta z własnego rozpoznawania mowy tego iPada, na urządzeniu. Za pierwszym razem prosi o zgodę.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Słuchanie wymaga zgody na używanie rozpoznawania mowy. Zezwól na to dla FormMorpheus w aplikacji Ustawienia.', + 'Generate with Comfy': 'Generuj w Comfy', 'Comfy settings': 'Ustawienia Comfy', 'Generate': 'Generuj', 'Generating': 'Generowanie', 'Retry with another seed': 'Spróbuj ponownie z innym ziarnem', + 'Fluid shot from flipbook keyframes': 'Płynne ujęcie z klatek kluczowych animacji poklatkowej', 'Animate a drawing': 'Animuj rysunek', 'Erase on a video': 'Wymaż na wideo', 'Add to a video': 'Dodaj do wideo', 'Relight a video': 'Zmień oświetlenie wideo', 'Matte': 'Maska', 'Upscale': 'Powiększ', + 'Select a Flipbook with the painted keyframes.': 'Zaznacz animację poklatkową z namalowanymi klatkami kluczowymi.', 'Select a Drawing, Flipbook or picture to animate.': 'Zaznacz rysunek, animację poklatkową lub obraz do animowania.', 'Select a video block.': 'Zaznacz blok wideo.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Namaluj na pierwszej klatce wideo, na rysunku nad nim.', 'Open a movie first.': 'Najpierw otwórz film.', 'Ready to use the selected blocks.': 'Gotowe do użycia zaznaczonych bloków.', + 'This Comfy server has no workflow for this mode.': 'Ten serwer Comfy nie ma przepływu pracy dla tego trybu.', 'Checking the Comfy server': 'Sprawdzanie serwera Comfy', 'Connected to {url}': 'Połączono z {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Ten serwer Comfy jest za stary. Wymaga wersji {v} lub nowszej.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite nie jest zainstalowany. Umieść go w folderze custom_nodes serwera Comfy i uruchom serwer ponownie.', 'The Comfy server could not be reached.': 'Nie można połączyć się z serwerem Comfy.', + 'Preparing the pictures': 'Przygotowywanie obrazów', 'Sending to Comfy': 'Wysyłanie do Comfy', 'Bringing the result in': 'Pobieranie wyniku', 'The job did not finish.': 'Zadanie nie zostało ukończone.', 'seed {n}': 'ziarno {n}', '{n} blocks added': 'Dodano bloków: {n}', 'Words added to the prompt.': 'Słowa dodane do promptu.', 'The job gave nothing to place.': 'Zadanie nie dało nic do wstawienia.', + 'Waiting in the queue: place {n}': 'Oczekiwanie w kolejce: miejsce {n}', 'Waiting in the queue': 'Oczekiwanie w kolejce', 'Step {value} of {max}': 'Krok {value} z {max}', 'Missing node pack: {name}': 'Brak pakietu węzłów: {name}', 'Missing nodes: {names}': 'Brak węzłów: {names}', + 'Missing model {file}{size}: put it in {place}': 'Brak modelu {file}{size}: umieść go w {place}', 'accept its terms at the source first': 'najpierw zaakceptuj jego warunki w źródle', 'This workflow is not ready on the Comfy server.': 'Ten przepływ pracy nie jest gotowy na serwerze Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Serwer Comfy', 'Sign-in key': 'Klucz logowania', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Generuj wysyła obrazy na ten serwer Comfy i sprowadza wyniki z powrotem. Wymaga Comfy-FormBridge-Suite w folderze custom_nodes serwera.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Tylko dla serwera, który go wymaga. Jest przechowywany w pęku kluczy tego komputera i wysyłany tylko do tego serwera.', + 'Comfy made nothing to add.': 'Comfy nie utworzył niczego do dodania.', + 'Connected': 'Połączono', 'Test': 'Testuj', 'Comfy server address': 'Adres serwera Comfy', 'A key is saved.': 'Klucz jest zapisany.', 'No key saved.': 'Brak zapisanego klucza.', }; diff --git a/frontend/src/ui/i18n/pt-BR.ts b/frontend/src/ui/i18n/pt-BR.ts index fe1df7f..61d21da 100644 --- a/frontend/src/ui/i18n/pt-BR.ts +++ b/frontend/src/ui/i18n/pt-BR.ts @@ -1153,4 +1153,18 @@ export const ptBR: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Sua própria chave do ElevenLabs. Ela fica guardada no chaveiro deste iPad e é enviada somente a esse serviço.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'A escuta usa o reconhecimento de fala do próprio iPad, no dispositivo. Ela pede permissão na primeira vez.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'A escuta precisa de permissão para usar o reconhecimento de fala. Permita para o FormMorpheus no app Ajustes.', + 'Generate with Comfy': 'Gerar com o Comfy', 'Comfy settings': 'Configurações do Comfy', 'Generate': 'Gerar', 'Generating': 'Gerando', 'Retry with another seed': 'Tentar de novo com outra semente', + 'Fluid shot from flipbook keyframes': 'Plano fluido a partir dos quadros-chave de um flipbook', 'Animate a drawing': 'Animar um desenho', 'Erase on a video': 'Apagar em um vídeo', 'Add to a video': 'Adicionar a um vídeo', 'Relight a video': 'Reiluminar um vídeo', 'Matte': 'Máscara', 'Upscale': 'Ampliar', + 'Select a Flipbook with the painted keyframes.': 'Selecione um flipbook com os quadros-chave pintados.', 'Select a Drawing, Flipbook or picture to animate.': 'Selecione um desenho, um flipbook ou uma imagem para animar.', 'Select a video block.': 'Selecione um bloco de vídeo.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Pinte sobre o primeiro quadro do vídeo em um desenho acima dele.', 'Open a movie first.': 'Abra um filme primeiro.', 'Ready to use the selected blocks.': 'Pronto para usar os blocos selecionados.', + 'This Comfy server has no workflow for this mode.': 'Este servidor Comfy não tem fluxo de trabalho para este modo.', 'Checking the Comfy server': 'Verificando o servidor Comfy', 'Connected to {url}': 'Conectado a {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Este servidor Comfy é antigo demais. Ele precisa da versão {v} ou mais recente.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'O Comfy-FormBridge-Suite não está instalado. Coloque-o na pasta custom_nodes do seu servidor Comfy e reinicie-o.', 'The Comfy server could not be reached.': 'Não foi possível alcançar o servidor Comfy.', + 'Preparing the pictures': 'Preparando as imagens', 'Sending to Comfy': 'Enviando ao Comfy', 'Bringing the result in': 'Trazendo o resultado', 'The job did not finish.': 'O trabalho não terminou.', 'seed {n}': 'semente {n}', '{n} blocks added': '{n} blocos adicionados', 'Words added to the prompt.': 'Palavras adicionadas ao prompt.', 'The job gave nothing to place.': 'O trabalho não gerou nada para colocar.', + 'Waiting in the queue: place {n}': 'Na fila de espera: posição {n}', 'Waiting in the queue': 'Na fila de espera', 'Step {value} of {max}': 'Passo {value} de {max}', 'Missing node pack: {name}': 'Pacote de nós ausente: {name}', 'Missing nodes: {names}': 'Nós ausentes: {names}', + 'Missing model {file}{size}: put it in {place}': 'Modelo ausente {file}{size}: coloque-o em {place}', 'accept its terms at the source first': 'aceite antes os termos na origem', 'This workflow is not ready on the Comfy server.': 'Este fluxo de trabalho não está pronto no servidor Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Servidor Comfy', 'Sign-in key': 'Chave de acesso', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Gerar envia imagens a este servidor Comfy e traz os resultados de volta. Ele precisa do Comfy-FormBridge-Suite na pasta custom_nodes do servidor.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Somente para um servidor que peça uma. Ela fica no chaveiro deste computador e é enviada apenas a esse servidor.', + 'Comfy made nothing to add.': 'O Comfy não gerou nada para adicionar.', + 'Connected': 'Conectado', 'Test': 'Testar', 'Comfy server address': 'Endereço do servidor Comfy', 'A key is saved.': 'Há uma chave salva.', 'No key saved.': 'Nenhuma chave salva.', }; diff --git a/frontend/src/ui/i18n/ru.ts b/frontend/src/ui/i18n/ru.ts index 95007ea..0ab330e 100644 --- a/frontend/src/ui/i18n/ru.ts +++ b/frontend/src/ui/i18n/ru.ts @@ -904,4 +904,18 @@ export const ru: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Ваш личный ключ ElevenLabs. Он хранится в связке ключей этого iPad и отправляется только этому сервису.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Прослушивание использует собственное распознавание речи этого iPad прямо на устройстве. При первом запуске запрашивается разрешение.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Для прослушивания нужно разрешение на распознавание речи. Разрешите его для FormMorpheus в приложении Настройки.', + 'Generate with Comfy': 'Создать с помощью Comfy', 'Comfy settings': 'Настройки Comfy', 'Generate': 'Создать', 'Generating': 'Создание', 'Retry with another seed': 'Повторить с другим сидом', + 'Fluid shot from flipbook keyframes': 'Плавный кадр из ключевых кадров флипбука', 'Animate a drawing': 'Анимировать рисунок', 'Erase on a video': 'Стереть на видео', 'Add to a video': 'Добавить в видео', 'Relight a video': 'Изменить освещение видео', 'Matte': 'Маска', 'Upscale': 'Увеличить', + 'Select a Flipbook with the painted keyframes.': 'Выберите флипбук с нарисованными ключевыми кадрами.', 'Select a Drawing, Flipbook or picture to animate.': 'Выберите рисунок, флипбук или картинку для анимации.', 'Select a video block.': 'Выберите видеоблок.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Нарисуйте поверх первого кадра видео на рисунке выше.', 'Open a movie first.': 'Сначала откройте фильм.', 'Ready to use the selected blocks.': 'Готово использовать выбранные блоки.', + 'This Comfy server has no workflow for this mode.': 'На этом сервере Comfy нет рабочего процесса для этого режима.', 'Checking the Comfy server': 'Проверка сервера Comfy', 'Connected to {url}': 'Подключено к {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Этот сервер Comfy слишком старый. Нужна версия {v} или новее.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite не установлен. Положите его в папку custom_nodes вашего сервера Comfy и перезапустите сервер.', 'The Comfy server could not be reached.': 'Не удалось связаться с сервером Comfy.', + 'Preparing the pictures': 'Подготовка изображений', 'Sending to Comfy': 'Отправка в Comfy', 'Bringing the result in': 'Получение результата', 'The job did not finish.': 'Задание не завершилось.', 'seed {n}': 'сид {n}', '{n} blocks added': 'Добавлено блоков: {n}', 'Words added to the prompt.': 'Слова добавлены в запрос.', 'The job gave nothing to place.': 'Задание не дало ничего, что можно поместить.', + 'Waiting in the queue: place {n}': 'Ожидание в очереди: место {n}', 'Waiting in the queue': 'Ожидание в очереди', 'Step {value} of {max}': 'Шаг {value} из {max}', 'Missing node pack: {name}': 'Нет набора узлов: {name}', 'Missing nodes: {names}': 'Нет узлов: {names}', + 'Missing model {file}{size}: put it in {place}': 'Нет модели {file}{size}: положите её в {place}', 'accept its terms at the source first': 'сначала примите её условия на сайте источника', 'This workflow is not ready on the Comfy server.': 'Этот рабочий процесс не готов на сервере Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Сервер Comfy', 'Sign-in key': 'Ключ для входа', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Команда «Создать» отправляет изображения на этот сервер Comfy и возвращает результаты. Для неё нужен Comfy-FormBridge-Suite в папке custom_nodes сервера.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Только для сервера, который его требует. Он хранится в связке ключей этого компьютера и отправляется только на этот сервер.', + 'Comfy made nothing to add.': 'Comfy не создал ничего для добавления.', + 'Connected': 'Подключено', 'Test': 'Проверить', 'Comfy server address': 'Адрес сервера Comfy', 'A key is saved.': 'Ключ сохранён.', 'No key saved.': 'Ключ не сохранён.', }; diff --git a/frontend/src/ui/i18n/sr-Latn.ts b/frontend/src/ui/i18n/sr-Latn.ts index faf051b..e2d2b3c 100644 --- a/frontend/src/ui/i18n/sr-Latn.ts +++ b/frontend/src/ui/i18n/sr-Latn.ts @@ -903,4 +903,18 @@ export const srLatn: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Vaš sopstveni ElevenLabs ključ. Čuva se u privesku za ključeve ovog iPad-a i šalje samo toj usluzi.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Slušanje koristi sopstveno prepoznavanje govora ovog iPad-a, na samom uređaju. Prvi put traži dozvolu.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Slušanje zahteva dozvolu za korišćenje prepoznavanja govora. Dozvolite ga za FormMorpheus u aplikaciji Podešavanja.', + 'Generate with Comfy': 'Napravi pomoću Comfy-ja', 'Comfy settings': 'Comfy podešavanja', 'Generate': 'Napravi', 'Generating': 'Pravljenje u toku', 'Retry with another seed': 'Pokušaj ponovo s drugim seedom', + 'Fluid shot from flipbook keyframes': 'Fluidan snimak iz ključnih kadrova flipbooka', 'Animate a drawing': 'Animiraj crtež', 'Erase on a video': 'Obriši na videu', 'Add to a video': 'Dodaj videu', 'Relight a video': 'Ponovo osvetli video', 'Matte': 'Maska', 'Upscale': 'Uvećaj', + 'Select a Flipbook with the painted keyframes.': 'Izaberi flipbook sa naslikanim ključnim kadrovima.', 'Select a Drawing, Flipbook or picture to animate.': 'Izaberi crtež, flipbook ili sliku za animaciju.', 'Select a video block.': 'Izaberi video blok.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Slikaj preko prvog kadra videa na crtežu iznad njega.', 'Open a movie first.': 'Prvo otvori film.', 'Ready to use the selected blocks.': 'Spremno za korišćenje izabranih blokova.', + 'This Comfy server has no workflow for this mode.': 'Ovaj Comfy server nema tok rada za ovaj režim.', 'Checking the Comfy server': 'Provera Comfy servera', 'Connected to {url}': 'Povezano sa {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Ovaj Comfy server je prestar. Potrebna je verzija {v} ili novija.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite nije instaliran. Stavi ga u fasciklu custom_nodes na svom Comfy serveru i ponovo pokreni server.', 'The Comfy server could not be reached.': 'Comfy server nije dostupan.', + 'Preparing the pictures': 'Priprema slika', 'Sending to Comfy': 'Slanje Comfy-ju', 'Bringing the result in': 'Preuzimanje rezultata', 'The job did not finish.': 'Zadatak nije završen.', 'seed {n}': 'seed {n}', '{n} blocks added': 'Dodato blokova: {n}', 'Words added to the prompt.': 'Reči su dodate u prompt.', 'The job gave nothing to place.': 'Zadatak nije dao ništa za postavljanje.', + 'Waiting in the queue: place {n}': 'Čeka u redu: mesto {n}', 'Waiting in the queue': 'Čeka u redu', 'Step {value} of {max}': 'Korak {value} od {max}', 'Missing node pack: {name}': 'Nedostaje paket čvorova: {name}', 'Missing nodes: {names}': 'Nedostaju čvorovi: {names}', + 'Missing model {file}{size}: put it in {place}': 'Nedostaje model {file}{size}: stavi ga u {place}', 'accept its terms at the source first': 'prvo prihvati njegove uslove na izvoru', 'This workflow is not ready on the Comfy server.': 'Ovaj tok rada nije spreman na Comfy serveru.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy server', 'Sign-in key': 'Ključ za prijavu', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Napravi šalje slike ovom Comfy serveru i vraća rezultate. Potreban je Comfy-FormBridge-Suite u fascikli custom_nodes na serveru.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Samo za server koji ga traži. Čuva se u priveziku za ključeve ovog računara i šalje se samo tom serveru.', + 'Comfy made nothing to add.': 'Comfy nije napravio ništa za dodavanje.', + 'Connected': 'Povezano', 'Test': 'Probaj', 'Comfy server address': 'Adresa Comfy servera', 'A key is saved.': 'Ključ je sačuvan.', 'No key saved.': 'Nijedan ključ nije sačuvan.', }; diff --git a/frontend/src/ui/i18n/sv.ts b/frontend/src/ui/i18n/sv.ts index 89add54..991c66b 100644 --- a/frontend/src/ui/i18n/sv.ts +++ b/frontend/src/ui/i18n/sv.ts @@ -992,4 +992,18 @@ export const sv: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Din egen ElevenLabs-nyckel. Den sparas i den här iPadens nyckelring och skickas bara till den tjänsten.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Lyssning använder den här iPadens egen taligenkänning, direkt på enheten. Den frågar om tillstånd första gången.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Lyssning behöver tillstånd att använda taligenkänning. Tillåt det för FormMorpheus i appen Inställningar.', + 'Generate with Comfy': 'Generera med Comfy', 'Comfy settings': 'Comfy-inställningar', 'Generate': 'Generera', 'Generating': 'Genererar', 'Retry with another seed': 'Försök igen med ett annat seed', + 'Fluid shot from flipbook keyframes': 'Flytande tagning från ett flipbooks nyckelbilder', 'Animate a drawing': 'Animera en teckning', 'Erase on a video': 'Radera på en video', 'Add to a video': 'Lägg till i en video', 'Relight a video': 'Belys en video på nytt', 'Matte': 'Matt', 'Upscale': 'Skala upp', + 'Select a Flipbook with the painted keyframes.': 'Markera ett flipbook med de målade nyckelbilderna.', 'Select a Drawing, Flipbook or picture to animate.': 'Markera en teckning, ett flipbook eller en bild att animera.', 'Select a video block.': 'Markera ett videoblock.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Måla över videons första bildruta på en teckning ovanför.', 'Open a movie first.': 'Öppna en film först.', 'Ready to use the selected blocks.': 'Redo att använda de markerade blocken.', + 'This Comfy server has no workflow for this mode.': 'Den här Comfy-servern har inget arbetsflöde för det här läget.', 'Checking the Comfy server': 'Kontrollerar Comfy-servern', 'Connected to {url}': 'Ansluten till {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Den här Comfy-servern är för gammal. Den kräver version {v} eller senare.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite är inte installerat. Lägg det i mappen custom_nodes på din Comfy-server och starta om servern.', 'The Comfy server could not be reached.': 'Det gick inte att nå Comfy-servern.', + 'Preparing the pictures': 'Förbereder bilderna', 'Sending to Comfy': 'Skickar till Comfy', 'Bringing the result in': 'Hämtar in resultatet', 'The job did not finish.': 'Jobbet blev inte klart.', 'seed {n}': 'seed {n}', '{n} blocks added': '{n} block tillagda', 'Words added to the prompt.': 'Ord tillagda i prompten.', 'The job gave nothing to place.': 'Jobbet gav inget att placera.', + 'Waiting in the queue: place {n}': 'Väntar i kön: plats {n}', 'Waiting in the queue': 'Väntar i kön', 'Step {value} of {max}': 'Steg {value} av {max}', 'Missing node pack: {name}': 'Nodpaket saknas: {name}', 'Missing nodes: {names}': 'Noder saknas: {names}', + 'Missing model {file}{size}: put it in {place}': 'Modell saknas {file}{size}: lägg den i {place}', 'accept its terms at the source first': 'godkänn villkoren hos källan först', 'This workflow is not ready on the Comfy server.': 'Det här arbetsflödet är inte klart på Comfy-servern.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy-server', 'Sign-in key': 'Inloggningsnyckel', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Generera skickar bilder till den här Comfy-servern och hämtar tillbaka resultaten. Det kräver Comfy-FormBridge-Suite i serverns mapp custom_nodes.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Bara för en server som ber om en. Den sparas i den här datorns nyckelring och skickas bara till den servern.', + 'Comfy made nothing to add.': 'Comfy skapade inget att lägga till.', + 'Connected': 'Ansluten', 'Test': 'Testa', 'Comfy server address': 'Adress till Comfy-servern', 'A key is saved.': 'En nyckel är sparad.', 'No key saved.': 'Ingen nyckel sparad.', }; diff --git a/frontend/src/ui/i18n/th.ts b/frontend/src/ui/i18n/th.ts index 44ac546..ea60655 100644 --- a/frontend/src/ui/i18n/th.ts +++ b/frontend/src/ui/i18n/th.ts @@ -1101,4 +1101,18 @@ export const th: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'คีย์ ElevenLabs ของคุณเอง เก็บไว้ในพวงกุญแจของ iPad เครื่องนี้และส่งไปยังบริการนั้นเท่านั้น', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'การฟังใช้การรู้จำเสียงพูดของ iPad เครื่องนี้เอง บนอุปกรณ์ โดยจะขออนุญาตในครั้งแรก', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'การฟังต้องได้รับอนุญาตให้ใช้การรู้จำเสียงพูด อนุญาตให้ FormMorpheus ในแอปการตั้งค่า', + 'Generate with Comfy': 'สร้างด้วย Comfy', 'Comfy settings': 'การตั้งค่า Comfy', 'Generate': 'สร้าง', 'Generating': 'กำลังสร้าง', 'Retry with another seed': 'ลองอีกครั้งด้วยซีดอื่น', + 'Fluid shot from flipbook keyframes': 'ช็อตลื่นไหลจากคีย์เฟรมของสมุดภาพเคลื่อนไหว', 'Animate a drawing': 'ทำภาพวาดให้เคลื่อนไหว', 'Erase on a video': 'ลบบนวิดีโอ', 'Add to a video': 'เพิ่มลงในวิดีโอ', 'Relight a video': 'ปรับแสงวิดีโอใหม่', 'Matte': 'แมตต์', 'Upscale': 'ขยายภาพ', + 'Select a Flipbook with the painted keyframes.': 'เลือกสมุดภาพเคลื่อนไหวที่มีคีย์เฟรมที่วาดไว้', 'Select a Drawing, Flipbook or picture to animate.': 'เลือกภาพวาด สมุดภาพเคลื่อนไหว หรือรูปภาพที่จะทำให้เคลื่อนไหว', 'Select a video block.': 'เลือกบล็อกวิดีโอ', + 'Paint over the video\'s first frame on a Drawing above it.': 'วาดทับเฟรมแรกของวิดีโอบนภาพวาดที่อยู่เหนือขึ้นไป', 'Open a movie first.': 'เปิดภาพยนตร์ก่อน', 'Ready to use the selected blocks.': 'พร้อมใช้บล็อกที่เลือกแล้ว', + 'This Comfy server has no workflow for this mode.': 'เซิร์ฟเวอร์ Comfy นี้ไม่มีเวิร์กโฟลว์สำหรับโหมดนี้', 'Checking the Comfy server': 'กำลังตรวจสอบเซิร์ฟเวอร์ Comfy', 'Connected to {url}': 'เชื่อมต่อกับ {url} แล้ว', 'This Comfy server is too old. It needs version {v} or newer.': 'เซิร์ฟเวอร์ Comfy นี้เก่าเกินไป ต้องใช้เวอร์ชัน {v} หรือใหม่กว่า', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'ยังไม่ได้ติดตั้ง Comfy-FormBridge-Suite ให้วางไว้ในโฟลเดอร์ custom_nodes ของเซิร์ฟเวอร์ Comfy แล้วเริ่มเซิร์ฟเวอร์ใหม่', 'The Comfy server could not be reached.': 'ติดต่อเซิร์ฟเวอร์ Comfy ไม่ได้', + 'Preparing the pictures': 'กำลังเตรียมรูปภาพ', 'Sending to Comfy': 'กำลังส่งไปยัง Comfy', 'Bringing the result in': 'กำลังนำผลลัพธ์เข้ามา', 'The job did not finish.': 'งานไม่เสร็จสมบูรณ์', 'seed {n}': 'ซีด {n}', '{n} blocks added': 'เพิ่มแล้ว {n} บล็อก', 'Words added to the prompt.': 'เพิ่มคำลงในพรอมต์แล้ว', 'The job gave nothing to place.': 'งานนี้ไม่ได้ให้อะไรที่จะวางได้', + 'Waiting in the queue: place {n}': 'กำลังรอในคิว: ลำดับที่ {n}', 'Waiting in the queue': 'กำลังรอในคิว', 'Step {value} of {max}': 'ขั้นที่ {value} จาก {max}', 'Missing node pack: {name}': 'ไม่มีชุดโหนด: {name}', 'Missing nodes: {names}': 'ไม่มีโหนด: {names}', + 'Missing model {file}{size}: put it in {place}': 'ไม่มีโมเดล {file}{size}: วางไว้ใน {place}', 'accept its terms at the source first': 'ยอมรับข้อกำหนดที่แหล่งที่มาก่อน', 'This workflow is not ready on the Comfy server.': 'เวิร์กโฟลว์นี้ยังไม่พร้อมบนเซิร์ฟเวอร์ Comfy', + 'Comfy': 'Comfy', 'Comfy server': 'เซิร์ฟเวอร์ Comfy', 'Sign-in key': 'คีย์ลงชื่อเข้าใช้', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'สร้างจะส่งรูปภาพไปยังเซิร์ฟเวอร์ Comfy นี้และนำผลลัพธ์กลับมา ต้องมี Comfy-FormBridge-Suite อยู่ในโฟลเดอร์ custom_nodes ของเซิร์ฟเวอร์', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'ใช้เฉพาะกับเซิร์ฟเวอร์ที่ขอคีย์ เก็บไว้ในพวงกุญแจของคอมพิวเตอร์เครื่องนี้ และส่งให้เซิร์ฟเวอร์นั้นเท่านั้น', + 'Comfy made nothing to add.': 'Comfy ไม่ได้สร้างอะไรให้เพิ่ม', + 'Connected': 'เชื่อมต่อแล้ว', 'Test': 'ทดสอบ', 'Comfy server address': 'ที่อยู่เซิร์ฟเวอร์ Comfy', 'A key is saved.': 'บันทึกคีย์ไว้แล้ว', 'No key saved.': 'ยังไม่ได้บันทึกคีย์', }; diff --git a/frontend/src/ui/i18n/tr.ts b/frontend/src/ui/i18n/tr.ts index e892e0f..35b594d 100644 --- a/frontend/src/ui/i18n/tr.ts +++ b/frontend/src/ui/i18n/tr.ts @@ -1025,4 +1025,18 @@ export const tr: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Kendi ElevenLabs anahtarınız. Bu iPad\'in anahtar zincirinde saklanır ve yalnızca o hizmete gönderilir.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Dinleme, bu iPad\'in kendi konuşma tanımasını cihaz üzerinde kullanır. İlk seferde izin ister.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Dinleme, konuşma tanımayı kullanmak için izin gerektirir. Ayarlar uygulamasında FormMorpheus için izin verin.', + 'Generate with Comfy': 'Comfy ile oluştur', 'Comfy settings': 'Comfy ayarları', 'Generate': 'Oluştur', 'Generating': 'Oluşturuluyor', 'Retry with another seed': 'Başka bir tohumla yeniden dene', + 'Fluid shot from flipbook keyframes': 'Flipbook anahtar karelerinden akıcı çekim', 'Animate a drawing': 'Bir çizimi canlandır', 'Erase on a video': 'Bir videoda sil', 'Add to a video': 'Bir videoya ekle', 'Relight a video': 'Bir videoyu yeniden aydınlat', 'Matte': 'Maske', 'Upscale': 'Büyüt', + 'Select a Flipbook with the painted keyframes.': 'Boyanmış anahtar kareleri olan bir flipbook seç.', 'Select a Drawing, Flipbook or picture to animate.': 'Canlandırmak için bir çizim, flipbook veya resim seç.', 'Select a video block.': 'Bir video bloğu seç.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Videonun ilk karesinin üzerine, üstündeki bir çizimde boya.', 'Open a movie first.': 'Önce bir film aç.', 'Ready to use the selected blocks.': 'Seçili blokları kullanmaya hazır.', + 'This Comfy server has no workflow for this mode.': 'Bu Comfy sunucusunda bu mod için iş akışı yok.', 'Checking the Comfy server': 'Comfy sunucusu denetleniyor', 'Connected to {url}': '{url} adresine bağlanıldı', 'This Comfy server is too old. It needs version {v} or newer.': 'Bu Comfy sunucusu çok eski. {v} veya daha yeni bir sürüm gerekiyor.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite kurulu değil. Comfy sunucunun custom_nodes klasörüne koy ve sunucuyu yeniden başlat.', 'The Comfy server could not be reached.': 'Comfy sunucusuna ulaşılamadı.', + 'Preparing the pictures': 'Resimler hazırlanıyor', 'Sending to Comfy': 'Comfy\'ye gönderiliyor', 'Bringing the result in': 'Sonuç getiriliyor', 'The job did not finish.': 'İş tamamlanmadı.', 'seed {n}': 'tohum {n}', '{n} blocks added': '{n} blok eklendi', 'Words added to the prompt.': 'Sözcükler isteme eklendi.', 'The job gave nothing to place.': 'İş, yerleştirilecek bir şey üretmedi.', + 'Waiting in the queue: place {n}': 'Sırada bekliyor: {n}. sıra', 'Waiting in the queue': 'Sırada bekliyor', 'Step {value} of {max}': 'Adım {value} / {max}', 'Missing node pack: {name}': 'Eksik düğüm paketi: {name}', 'Missing nodes: {names}': 'Eksik düğümler: {names}', + 'Missing model {file}{size}: put it in {place}': 'Eksik model {file}{size}: {place} içine koy', 'accept its terms at the source first': 'önce kaynağında koşullarını kabul et', 'This workflow is not ready on the Comfy server.': 'Bu iş akışı Comfy sunucusunda hazır değil.', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy sunucusu', 'Sign-in key': 'Oturum açma anahtarı', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Oluştur, resimleri bu Comfy sunucusuna gönderir ve sonuçları geri getirir. Sunucunun custom_nodes klasöründe Comfy-FormBridge-Suite olması gerekir.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Yalnızca anahtar isteyen bir sunucu için. Bu bilgisayarın anahtar zincirinde saklanır ve yalnızca o sunucuya gönderilir.', + 'Comfy made nothing to add.': 'Comfy eklenecek bir şey üretmedi.', + 'Connected': 'Bağlandı', 'Test': 'Dene', 'Comfy server address': 'Comfy sunucusunun adresi', 'A key is saved.': 'Bir anahtar kayıtlı.', 'No key saved.': 'Kayıtlı anahtar yok.', }; diff --git a/frontend/src/ui/i18n/uk.ts b/frontend/src/ui/i18n/uk.ts index 84847c5..cdbf49a 100644 --- a/frontend/src/ui/i18n/uk.ts +++ b/frontend/src/ui/i18n/uk.ts @@ -920,4 +920,18 @@ export const uk: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Ваш власний ключ ElevenLabs. Він зберігається в в\'язці ключів цього iPad і надсилається лише цій службі.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Слухання використовує власне розпізнавання мовлення цього iPad просто на пристрої. Уперше воно запитує дозвіл.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Для слухання потрібен дозвіл на розпізнавання мовлення. Дозвольте його для FormMorpheus у застосунку Налаштування.', + 'Generate with Comfy': 'Створити за допомогою Comfy', 'Comfy settings': 'Налаштування Comfy', 'Generate': 'Створити', 'Generating': 'Створення', 'Retry with another seed': 'Повторити з іншим сідом', + 'Fluid shot from flipbook keyframes': 'Плавний кадр із ключових кадрів фліпбука', 'Animate a drawing': 'Анімувати малюнок', 'Erase on a video': 'Стерти на відео', 'Add to a video': 'Додати до відео', 'Relight a video': 'Змінити освітлення відео', 'Matte': 'Маска', 'Upscale': 'Збільшити', + 'Select a Flipbook with the painted keyframes.': 'Виберіть фліпбук із намальованими ключовими кадрами.', 'Select a Drawing, Flipbook or picture to animate.': 'Виберіть малюнок, фліпбук або картинку для анімації.', 'Select a video block.': 'Виберіть відеоблок.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Намалюйте поверх першого кадру відео на малюнку вище.', 'Open a movie first.': 'Спершу відкрийте фільм.', 'Ready to use the selected blocks.': 'Готово використати вибрані блоки.', + 'This Comfy server has no workflow for this mode.': 'На цьому сервері Comfy немає робочого процесу для цього режиму.', 'Checking the Comfy server': 'Перевірка сервера Comfy', 'Connected to {url}': 'Підключено до {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Цей сервер Comfy надто старий. Потрібна версія {v} або новіша.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Comfy-FormBridge-Suite не встановлено. Покладіть його в теку custom_nodes вашого сервера Comfy і перезапустіть сервер.', 'The Comfy server could not be reached.': 'Не вдалося зв\'язатися із сервером Comfy.', + 'Preparing the pictures': 'Підготовка зображень', 'Sending to Comfy': 'Надсилання до Comfy', 'Bringing the result in': 'Отримання результату', 'The job did not finish.': 'Завдання не завершилося.', 'seed {n}': 'сід {n}', '{n} blocks added': 'Додано блоків: {n}', 'Words added to the prompt.': 'Слова додано до запиту.', 'The job gave nothing to place.': 'Завдання не дало нічого, що можна розмістити.', + 'Waiting in the queue: place {n}': 'Очікування в черзі: місце {n}', 'Waiting in the queue': 'Очікування в черзі', 'Step {value} of {max}': 'Крок {value} із {max}', 'Missing node pack: {name}': 'Немає набору вузлів: {name}', 'Missing nodes: {names}': 'Немає вузлів: {names}', + 'Missing model {file}{size}: put it in {place}': 'Немає моделі {file}{size}: покладіть її в {place}', 'accept its terms at the source first': 'спершу прийміть її умови на сайті джерела', 'This workflow is not ready on the Comfy server.': 'Цей робочий процес не готовий на сервері Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Сервер Comfy', 'Sign-in key': 'Ключ для входу', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Команда «Створити» надсилає зображення на цей сервер Comfy і повертає результати. Їй потрібен Comfy-FormBridge-Suite у теці custom_nodes сервера.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Лише для сервера, який його вимагає. Він зберігається в в\'язці ключів цього комп\'ютера й надсилається тільки на цей сервер.', + 'Comfy made nothing to add.': 'Comfy не створив нічого для додавання.', + 'Connected': 'Підключено', 'Test': 'Перевірити', 'Comfy server address': 'Адреса сервера Comfy', 'A key is saved.': 'Ключ збережено.', 'No key saved.': 'Ключ не збережено.', }; diff --git a/frontend/src/ui/i18n/vi.ts b/frontend/src/ui/i18n/vi.ts index d3ac705..81263f5 100644 --- a/frontend/src/ui/i18n/vi.ts +++ b/frontend/src/ui/i18n/vi.ts @@ -1120,4 +1120,18 @@ export const vi: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': 'Khóa ElevenLabs của riêng bạn. Khóa được giữ trong chuỗi khóa của iPad này và chỉ gửi tới dịch vụ đó.', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': 'Nghe dùng tính năng nhận dạng giọng nói riêng của iPad này, ngay trên thiết bị. Lần đầu sẽ xin quyền.', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': 'Nghe cần quyền dùng nhận dạng giọng nói. Hãy cho phép FormMorpheus trong ứng dụng Cài đặt.', + 'Generate with Comfy': 'Tạo bằng Comfy', 'Comfy settings': 'Cài đặt Comfy', 'Generate': 'Tạo', 'Generating': 'Đang tạo', 'Retry with another seed': 'Thử lại với seed khác', + 'Fluid shot from flipbook keyframes': 'Cảnh mượt từ các khung chính của flipbook', 'Animate a drawing': 'Làm hình vẽ chuyển động', 'Erase on a video': 'Xóa trên video', 'Add to a video': 'Thêm vào video', 'Relight a video': 'Chiếu sáng lại video', 'Matte': 'Mặt nạ', 'Upscale': 'Phóng to', + 'Select a Flipbook with the painted keyframes.': 'Chọn một flipbook có các khung chính đã vẽ.', 'Select a Drawing, Flipbook or picture to animate.': 'Chọn một hình vẽ, flipbook hoặc ảnh để làm chuyển động.', 'Select a video block.': 'Chọn một khối video.', + 'Paint over the video\'s first frame on a Drawing above it.': 'Vẽ lên khung hình đầu tiên của video trên một hình vẽ nằm phía trên.', 'Open a movie first.': 'Hãy mở một phim trước.', 'Ready to use the selected blocks.': 'Sẵn sàng dùng các khối đã chọn.', + 'This Comfy server has no workflow for this mode.': 'Máy chủ Comfy này không có quy trình cho chế độ này.', 'Checking the Comfy server': 'Đang kiểm tra máy chủ Comfy', 'Connected to {url}': 'Đã kết nối tới {url}', 'This Comfy server is too old. It needs version {v} or newer.': 'Máy chủ Comfy này quá cũ. Cần phiên bản {v} trở lên.', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': 'Chưa cài Comfy-FormBridge-Suite. Hãy đặt nó vào thư mục custom_nodes của máy chủ Comfy rồi khởi động lại máy chủ.', 'The Comfy server could not be reached.': 'Không thể kết nối tới máy chủ Comfy.', + 'Preparing the pictures': 'Đang chuẩn bị ảnh', 'Sending to Comfy': 'Đang gửi tới Comfy', 'Bringing the result in': 'Đang đưa kết quả vào', 'The job did not finish.': 'Tác vụ chưa hoàn tất.', 'seed {n}': 'seed {n}', '{n} blocks added': 'Đã thêm {n} khối', 'Words added to the prompt.': 'Đã thêm chữ vào prompt.', 'The job gave nothing to place.': 'Tác vụ không cho ra gì để đặt vào.', + 'Waiting in the queue: place {n}': 'Đang chờ trong hàng đợi: vị trí {n}', 'Waiting in the queue': 'Đang chờ trong hàng đợi', 'Step {value} of {max}': 'Bước {value} trên {max}', 'Missing node pack: {name}': 'Thiếu gói node: {name}', 'Missing nodes: {names}': 'Thiếu node: {names}', + 'Missing model {file}{size}: put it in {place}': 'Thiếu mô hình {file}{size}: hãy đặt vào {place}', 'accept its terms at the source first': 'hãy chấp nhận điều khoản tại nguồn trước', 'This workflow is not ready on the Comfy server.': 'Quy trình này chưa sẵn sàng trên máy chủ Comfy.', + 'Comfy': 'Comfy', 'Comfy server': 'Máy chủ Comfy', 'Sign-in key': 'Khóa đăng nhập', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': 'Tạo sẽ gửi ảnh tới máy chủ Comfy này và mang kết quả về. Cần có Comfy-FormBridge-Suite trong thư mục custom_nodes của máy chủ.', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': 'Chỉ dành cho máy chủ yêu cầu. Khóa được lưu trong chuỗi khóa của máy tính này và chỉ gửi tới máy chủ đó.', + 'Comfy made nothing to add.': 'Comfy không tạo ra gì để thêm.', + 'Connected': 'Đã kết nối', 'Test': 'Thử', 'Comfy server address': 'Địa chỉ máy chủ Comfy', 'A key is saved.': 'Đã lưu một khóa.', 'No key saved.': 'Chưa lưu khóa nào.', }; diff --git a/frontend/src/ui/i18n/zh-CN.ts b/frontend/src/ui/i18n/zh-CN.ts index 3738158..57fa2f1 100644 --- a/frontend/src/ui/i18n/zh-CN.ts +++ b/frontend/src/ui/i18n/zh-CN.ts @@ -1120,4 +1120,18 @@ export const zhCN: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': '你自己的 ElevenLabs 密钥。它保存在这台 iPad 的钥匙串中,只会发送给该服务。', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': '聆听使用这台 iPad 自带的语音识别,在设备上完成。第一次会请求权限。', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': '聆听需要使用语音识别的权限。请在“设置”应用中为 FormMorpheus 允许。', + 'Generate with Comfy': '用 Comfy 生成', 'Comfy settings': 'Comfy 设置', 'Generate': '生成', 'Generating': '正在生成', 'Retry with another seed': '换一个种子重试', + 'Fluid shot from flipbook keyframes': '由翻页动画关键帧生成流畅镜头', 'Animate a drawing': '让绘画动起来', 'Erase on a video': '在视频上擦除', 'Add to a video': '添加到视频', 'Relight a video': '重新打光视频', 'Matte': '遮罩', 'Upscale': '放大', + 'Select a Flipbook with the painted keyframes.': '请选择画有关键帧的翻页动画。', 'Select a Drawing, Flipbook or picture to animate.': '请选择要制作动画的绘画、翻页动画或图片。', 'Select a video block.': '请选择一个视频块。', + 'Paint over the video\'s first frame on a Drawing above it.': '在上方的绘画中,在视频的第一帧上涂画。', 'Open a movie first.': '请先打开一部影片。', 'Ready to use the selected blocks.': '已可使用所选的块。', + 'This Comfy server has no workflow for this mode.': '此 Comfy 服务器没有适用于此模式的工作流。', 'Checking the Comfy server': '正在检查 Comfy 服务器', 'Connected to {url}': '已连接到 {url}', 'This Comfy server is too old. It needs version {v} or newer.': '此 Comfy 服务器版本过旧,需要 {v} 或更新的版本。', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': '未安装 Comfy-FormBridge-Suite。请把它放进 Comfy 服务器的 custom_nodes 文件夹,然后重新启动服务器。', 'The Comfy server could not be reached.': '无法连接到 Comfy 服务器。', + 'Preparing the pictures': '正在准备图片', 'Sending to Comfy': '正在发送到 Comfy', 'Bringing the result in': '正在载入结果', 'The job did not finish.': '任务未完成。', 'seed {n}': '种子 {n}', '{n} blocks added': '已添加 {n} 个块', 'Words added to the prompt.': '文字已加入提示词。', 'The job gave nothing to place.': '任务没有产生可放置的内容。', + 'Waiting in the queue: place {n}': '正在排队:第 {n} 位', 'Waiting in the queue': '正在排队', 'Step {value} of {max}': '第 {value} 步,共 {max} 步', 'Missing node pack: {name}': '缺少节点包:{name}', 'Missing nodes: {names}': '缺少节点:{names}', + 'Missing model {file}{size}: put it in {place}': '缺少模型 {file}{size}:请放入 {place}', 'accept its terms at the source first': '请先在来源处接受其条款', 'This workflow is not ready on the Comfy server.': '此工作流在 Comfy 服务器上尚未就绪。', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy 服务器', 'Sign-in key': '登录密钥', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': '“生成”会把图片发送到此 Comfy 服务器并取回结果。服务器的 custom_nodes 文件夹中需要有 Comfy-FormBridge-Suite。', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': '仅用于要求密钥的服务器。它保存在这台电脑的钥匙串中,只发送给该服务器。', + 'Comfy made nothing to add.': 'Comfy 没有生成可添加的内容。', + 'Connected': '已连接', 'Test': '测试', 'Comfy server address': 'Comfy 服务器地址', 'A key is saved.': '已保存密钥。', 'No key saved.': '未保存密钥。', }; diff --git a/frontend/src/ui/i18n/zh-TW.ts b/frontend/src/ui/i18n/zh-TW.ts index afb5b2f..de1dbe4 100644 --- a/frontend/src/ui/i18n/zh-TW.ts +++ b/frontend/src/ui/i18n/zh-TW.ts @@ -1120,4 +1120,18 @@ export const zhTW: Record<string, string> = { 'Your own ElevenLabs key. It is kept in this iPad\'s keychain and sent only to that service.': '你自己的 ElevenLabs 金鑰。它保存在這台 iPad 的鑰匙圈中,只會傳送給該服務。', 'Listening uses this iPad\'s own speech recognition, on the device. It asks for permission the first time.': '聆聽使用這台 iPad 內建的語音辨識,在裝置上完成。第一次會要求權限。', 'Listening needs permission to use speech recognition. Allow it for FormMorpheus in the Settings app.': '聆聽需要使用語音辨識的權限。請在「設定」App 中為 FormMorpheus 允許。', + 'Generate with Comfy': '用 Comfy 產生', 'Comfy settings': 'Comfy 設定', 'Generate': '產生', 'Generating': '正在產生', 'Retry with another seed': '換一個種子重試', + 'Fluid shot from flipbook keyframes': '由翻頁動畫關鍵影格產生流暢鏡頭', 'Animate a drawing': '讓繪圖動起來', 'Erase on a video': '在影片上擦除', 'Add to a video': '加入影片', 'Relight a video': '重新打光影片', 'Matte': '遮罩', 'Upscale': '放大', + 'Select a Flipbook with the painted keyframes.': '請選取畫有關鍵影格的翻頁動畫。', 'Select a Drawing, Flipbook or picture to animate.': '請選取要製作動畫的繪圖、翻頁動畫或圖片。', 'Select a video block.': '請選取一個影片區塊。', + 'Paint over the video\'s first frame on a Drawing above it.': '在上方的繪圖中,於影片的第一個影格上塗畫。', 'Open a movie first.': '請先開啟一部影片。', 'Ready to use the selected blocks.': '已可使用所選的區塊。', + 'This Comfy server has no workflow for this mode.': '此 Comfy 伺服器沒有適用於此模式的工作流程。', 'Checking the Comfy server': '正在檢查 Comfy 伺服器', 'Connected to {url}': '已連線到 {url}', 'This Comfy server is too old. It needs version {v} or newer.': '此 Comfy 伺服器版本過舊,需要 {v} 或更新的版本。', + 'Comfy-FormBridge-Suite is not installed. Put it in the custom_nodes folder of your Comfy server and restart it.': '尚未安裝 Comfy-FormBridge-Suite。請把它放進 Comfy 伺服器的 custom_nodes 資料夾,然後重新啟動伺服器。', 'The Comfy server could not be reached.': '無法連線到 Comfy 伺服器。', + 'Preparing the pictures': '正在準備圖片', 'Sending to Comfy': '正在傳送到 Comfy', 'Bringing the result in': '正在載入結果', 'The job did not finish.': '工作未完成。', 'seed {n}': '種子 {n}', '{n} blocks added': '已加入 {n} 個區塊', 'Words added to the prompt.': '文字已加入提示詞。', 'The job gave nothing to place.': '工作沒有產生可放置的內容。', + 'Waiting in the queue: place {n}': '正在排隊:第 {n} 位', 'Waiting in the queue': '正在排隊', 'Step {value} of {max}': '第 {value} 步,共 {max} 步', 'Missing node pack: {name}': '缺少節點套件:{name}', 'Missing nodes: {names}': '缺少節點:{names}', + 'Missing model {file}{size}: put it in {place}': '缺少模型 {file}{size}:請放入 {place}', 'accept its terms at the source first': '請先在來源處接受其條款', 'This workflow is not ready on the Comfy server.': '此工作流程在 Comfy 伺服器上尚未就緒。', + 'Comfy': 'Comfy', 'Comfy server': 'Comfy 伺服器', 'Sign-in key': '登入金鑰', + 'Generate sends pictures to this Comfy server and brings the results back. It needs Comfy-FormBridge-Suite in the server\'s custom_nodes folder.': '「產生」會把圖片傳送到此 Comfy 伺服器並取回結果。伺服器的 custom_nodes 資料夾中需要有 Comfy-FormBridge-Suite。', + 'Only for a server that asks for one. It is kept in this computer\'s keychain and sent only to that server.': '僅用於要求金鑰的伺服器。它保存在這台電腦的鑰匙圈中,只會傳送給該伺服器。', + 'Comfy made nothing to add.': 'Comfy 沒有產生可加入的內容。', + 'Connected': '已連線', 'Test': '測試', 'Comfy server address': 'Comfy 伺服器位址', 'A key is saved.': '已儲存金鑰。', 'No key saved.': '未儲存金鑰。', }; diff --git a/frontend/src/ui/menu.ts b/frontend/src/ui/menu.ts index 5e75971..098a7f7 100644 --- a/frontend/src/ui/menu.ts +++ b/frontend/src/ui/menu.ts @@ -9,6 +9,12 @@ export type MenuItem = string | '-' | SubMenu; export interface SubMenu { label: string; items: MenuItem[] } const isSub = (i: MenuItem): i is SubMenu => typeof i === 'object'; +/** How tall a menu may be when its top is at `top`: three quarters of the window at most, never past its bottom edge. */ +const MENU_SHARE = 0.75, MENU_PAD = 4; +export const menuCap = (top: number): number => Math.max(0, Math.min(Math.floor(window.innerHeight * MENU_SHARE), Math.floor(window.innerHeight - top - MENU_PAD))); +/** The line a menu opened at a point may not go above: under the in-window menu bar when one shows, else the window's top. */ +export const barFloor = (): number => { const r = document.querySelector('.cv-menubar')?.getBoundingClientRect(); return r && r.height > 0 ? r.bottom + MENU_PAD : MENU_PAD; }; + /** Edit > Menus: command ids left out of the menu bar's menus, and the colour name each item is drawn in. */ let hiddenIds = new Set<string>(); let itemColors: Record<string, string> = {}; @@ -31,20 +37,23 @@ export function trimMenu(items: MenuItem[]): MenuItem[] { export class PopupMenu { readonly panel: HTMLElement; + private readonly list: HTMLElement; private rows: Array<{ id: string; node: HTMLButtonElement }> = []; private subs: Array<{ sub: SubMenu; node: HTMLButtonElement; menu: PopupMenu }> = []; private seps: HTMLElement[] = []; private key = ''; private openSub: PopupMenu | null = null; private subTop = 0; + private floor: number | null = null; onClose: (() => void) | null = null; constructor(private readonly commands: Commands, private readonly parent: PopupMenu | null = null, standalone = false) { - this.panel = el<HTMLElement>('<div class="cv-menu" role="menu" hidden></div>'); + this.panel = el<HTMLElement>('<div class="cv-menu" role="menu" hidden><div class="cv-menu-list" role="none"></div><div class="cv-menu-more" aria-hidden="true"><svg viewBox="0 0 12 8"><path d="M1.5 1.5 6 6l4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></div></div>'); + this.list = q(this.panel, '.cv-menu-list'); document.getElementById('overlay-root')?.appendChild(this.panel); this.panel.addEventListener('contextmenu', (e) => e.preventDefault()); // A scrolled menu moves its rows, so a submenu opened beside one would no longer line up. - this.panel.addEventListener('scroll', () => { if (this.panel.scrollTop !== this.subTop) this.closeSub(); }, { passive: true }); + this.list.addEventListener('scroll', () => { if (this.list.scrollTop !== this.subTop) this.closeSub(); this.showMore(); }, { passive: true }); // A menu opened on its own (the layers' right-click menu) closes on a press anywhere outside it; the menubar's // menus are closed by the menubar, which also owns their buttons. if (standalone) document.addEventListener('pointerdown', (e) => { if (this.isOpen && !this.contains(e.target as Node)) this.close(); }, true); @@ -99,8 +108,8 @@ export class PopupMenu { for (const s of oldSubs) { if (this.openSub === s.menu) this.closeSub(); s.menu.dispose(); s.node.remove(); } for (const r of oldRows) r.node.remove(); for (const sep of oldSeps) sep.remove(); - let cursor = this.panel.firstElementChild; - for (const n of want) { if (n !== cursor) this.panel.insertBefore(n, cursor); else cursor = cursor.nextElementSibling; } + let cursor = this.list.firstElementChild; + for (const n of want) { if (n !== cursor) this.list.insertBefore(n, cursor); else cursor = cursor.nextElementSibling; } this.rows = rows; this.subs = subs; this.seps = seps; @@ -118,7 +127,7 @@ export class PopupMenu { private root(): PopupMenu { let m: PopupMenu = this; while (m.parent) m = m.parent; return m; } /** The rows a key can reach, in order: the enabled commands and submenu rows. */ - items(): HTMLButtonElement[] { return Array.from(this.panel.children).filter((n): n is HTMLButtonElement => n instanceof HTMLButtonElement && !n.disabled); } + items(): HTMLButtonElement[] { return Array.from(this.list.children).filter((n): n is HTMLButtonElement => n instanceof HTMLButtonElement && !n.disabled); } /** This menu or, following the open submenus, the innermost one showing. */ deepest(): PopupMenu { let m: PopupMenu = this; while (m.openSub?.isOpen) m = m.openSub; return m; } @@ -145,7 +154,7 @@ export class PopupMenu { if (this.openSub === menu && menu.isOpen) return; this.closeSub(); this.openSub = menu; - this.subTop = this.panel.scrollTop; + this.subTop = this.list.scrollTop; setClass(row, 'is-open', true); menu.onClose = () => setClass(row, 'is-open', false); const r = row.getBoundingClientRect(); @@ -158,43 +167,77 @@ export class PopupMenu { s?.close(); } - /** Refreshes labels, checks and enabled states, then shows the menu at `x, y`, kept within the window; a menu taller - * than the window scrolls. */ + /** Refreshes labels, checks and enabled states, then shows the menu at `x, y`, kept within the window and never above + * the menu bar; at most three quarters of the window tall, the rest scrolls. */ openAt(x: number, y: number): void { + this.floor = barFloor(); this.refresh(); this.panel.style.visibility = 'hidden'; this.panel.hidden = false; - this.panel.scrollTop = 0; + this.panel.style.maxHeight = `${menuCap(this.floor)}px`; + this.list.scrollTop = 0; // offset sizes: the open animation scales the panel, and the placement must not follow that const w = this.panel.offsetWidth, h = this.panel.offsetHeight; // As native menus: below and right of the pointer when it fits, otherwise above or to the left of it, so the // pointer sits at a corner and never over an item (clamping alone could put a submenu under it, opening it). const fitsRight = x + w <= window.innerWidth - 4, fitsBelow = y + h <= window.innerHeight - 4; const left = Math.max(4, Math.min(fitsRight ? x : x - w, window.innerWidth - w - 4)); - const top = Math.max(4, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4)); + const top = Math.max(this.floor, Math.min(fitsBelow ? y : y - h, window.innerHeight - h - 4)); this.panel.style.left = `${Math.round(left)}px`; this.panel.style.top = `${Math.round(top)}px`; // the menu grows from the point it was opened at (a corner of it) this.panel.style.setProperty('--fm-ox', `${Math.round(Math.max(0, Math.min(w, x - left)))}px`); this.panel.style.setProperty('--fm-oy', `${Math.round(Math.max(0, Math.min(h, y - top)))}px`); + this.showMore(true); this.panel.style.visibility = ''; } - /** A submenu beside its row: to the right, or to the left when the right has no room. */ + /** A menubar menu: its top on `y` just under the bar, never moved up over it; capped like `openAt`, the rest scrolls. */ + openUnder(x: number, y: number): void { + this.floor = y; + this.refresh(); + this.panel.style.visibility = 'hidden'; + this.panel.hidden = false; + this.panel.style.maxHeight = `${menuCap(y)}px`; + this.list.scrollTop = 0; + const w = this.panel.offsetWidth; + const left = Math.max(MENU_PAD, Math.min(x, window.innerWidth - w - MENU_PAD)); + this.panel.style.left = `${Math.round(left)}px`; + this.panel.style.top = `${Math.round(y)}px`; + this.panel.style.setProperty('--fm-ox', `${Math.round(Math.max(0, Math.min(w, x - left)))}px`); + this.panel.style.setProperty('--fm-oy', '0px'); + this.showMore(true); + this.panel.style.visibility = ''; + } + + /** A submenu beside its row: to the right, or to the left when the right has no room; below the floor of the menu it + * hangs from and to the same cap. */ private openBeside(row: DOMRect): void { this.refresh(); this.panel.style.visibility = 'hidden'; this.panel.hidden = false; - this.panel.scrollTop = 0; - const w = this.panel.offsetWidth, h = this.panel.offsetHeight, pad = 4; + const floor = this.root().floor, pad = MENU_PAD; + this.panel.style.maxHeight = floor === null ? '' : `${menuCap(floor)}px`; + this.list.scrollTop = 0; + const w = this.panel.offsetWidth, h = this.panel.offsetHeight; const right = row.right - 2, left = row.left - w + 2; const x = right + w <= window.innerWidth - pad ? right : Math.max(pad, left); - const y = Math.max(pad, Math.min(row.top - pad, window.innerHeight - h - pad)); + const y = Math.max(floor ?? pad, Math.min(row.top - pad, window.innerHeight - h - pad)); this.panel.style.left = `${Math.round(x)}px`; this.panel.style.top = `${Math.round(y)}px`; + this.showMore(true); this.panel.style.visibility = ''; } + /** The fade and pill at the bottom show while rows remain below; `instant` (on opening) sets the state with no fade. */ + private showMore(instant = false): void { + const l = this.list; + const more = this.root().floor !== null && !this.panel.hidden && l.scrollHeight - l.clientHeight - l.scrollTop > 1; + if (instant) setClass(this.panel, 'no-fade', true); + setClass(this.panel, 'has-more', more); + if (instant) { void getComputedStyle(this.panel.lastElementChild ?? this.panel).opacity; setClass(this.panel, 'no-fade', false); } + } + private refresh(): void { for (const r of this.rows) { const cmd = this.commands.get(r.id); @@ -364,7 +407,7 @@ export class MenuBar { this.openIndex = i; setClass(b.btn, 'is-open', true); const r = b.btn.getBoundingClientRect(); - b.menu.openAt(r.left, r.bottom + 4); + b.menu.openUnder(r.left, r.bottom + 4); if (keyboard) b.menu.items()[0]?.focus(); } diff --git a/frontend/src/ui/popover.ts b/frontend/src/ui/popover.ts index c007964..ff5274d 100644 --- a/frontend/src/ui/popover.ts +++ b/frontend/src/ui/popover.ts @@ -1,6 +1,7 @@ import { el, q, setClass, setText } from './dom'; import { icon } from './icons'; import './icons-morph'; +import { barFloor, menuCap } from './menu'; const MARGIN = 8; const GAP = 6; @@ -14,6 +15,8 @@ export class Popover { private readonly subs = new Map<HTMLElement, HTMLElement>(); private readonly hideFns: Array<() => void> = []; private open = false; + private floor = MARGIN; + private list: HTMLElement | null = null; /** Set by a card that stays open for presses on these targets (it still closes on Escape or any other outside press). */ keep: ((target: Element) => boolean) | null = null; private readonly down =(e: PointerEvent): void => { @@ -41,10 +44,17 @@ export class Popover { }; private readonly blur = (): void => this.hide(); - constructor(cls = '', width = 0) { - this.el = Popover.panel(`fm-pop ${cls}`.trim()); + /** `list`: the rows go in a list that scrolls inside the card, which keeps its glass and shows the more-below hint. */ + constructor(cls = '', width = 0, list = false) { + this.el = Popover.panel(`fm-pop ${list ? 'fm-pop-scroll ' : ''}${cls}`.trim()); if (width) this.el.style.width = `${width}px`; this.body = this.el; + if (list) { + this.list = el<HTMLElement>('<div class="cv-menu-list" role="none"></div>'); + this.el.append(this.list, el<HTMLElement>('<div class="cv-menu-more" aria-hidden="true"><svg viewBox="0 0 12 8"><path d="M1.5 1.5 6 6l4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></div>')); + this.body = this.list; + this.list.addEventListener('scroll', () => this.showMore(), { passive: true }); + } this.el.addEventListener('keydown', (e) => { if (e.key !== 'Escape') e.stopPropagation(); }); this.el.addEventListener('pointerover', (e) => { const row = (e.target as HTMLElement).closest<HTMLElement>('.fm-pop-row, .fm-cm-tile'); @@ -62,18 +72,36 @@ export class Popover { onHide(fn: () => void): void { this.hideFns.push(fn); } + /** At a point (a right-click, a shortcut): never above the menu bar, at most three quarters of the window tall. */ showAt(x: number, y: number): void { this.anchor = null; + this.floor = barFloor(); + this.el.style.maxHeight = `${menuCap(this.floor)}px`; this.reveal(); + if (this.list) this.list.scrollTop = 0; this.place(x, y); + this.showMore(true); + } + + /** A list card: the fade and pill show while rows remain below; `instant` (on opening) sets the state with no fade. */ + private showMore(instant = false): void { + const l = this.list; + if (!l) return; + const more = this.open && l.scrollHeight - l.clientHeight - l.scrollTop > 1; + if (instant) setClass(this.el, 'no-fade', true); + setClass(this.el, 'has-more', more); + if (instant) { void getComputedStyle(this.el.lastElementChild ?? this.el).opacity; setClass(this.el, 'no-fade', false); } } showFor(anchor: HTMLElement, side: 'above' | 'below'): void { this.anchor = anchor; + this.floor = MARGIN; + this.el.style.maxHeight = ''; this.reveal(); // offset sizes, not getBoundingClientRect: the open animation scales the card, and that must not shift its place const r = anchor.getBoundingClientRect(), h = this.el.offsetHeight; this.place(r.left, side === 'above' ? r.top - h - GAP : r.bottom + GAP, r.left + r.width / 2, side === 'above' ? r.top : r.bottom); + this.showMore(true); } hide(): void { @@ -115,11 +143,13 @@ export class Popover { } panel.hidden = false; setClass(row, 'is-open', true); + const floor = Math.max(MARGIN, this.floor); + panel.style.maxHeight = this.floor > MARGIN ? `${menuCap(floor)}px` : ''; const r = row.getBoundingClientRect(), bw = panel.offsetWidth, bh = panel.offsetHeight; const right = r.right + 2, left = r.left - bw - 2; const toRight = right + bw + MARGIN <= window.innerWidth; const x = toRight ? right : Math.max(MARGIN, left); - const y = Math.max(MARGIN, Math.min(r.top - 6, window.innerHeight - bh - MARGIN)); + const y = Math.max(floor, Math.min(r.top - 6, window.innerHeight - bh - MARGIN)); panel.style.transform = `translate(${Math.round(x)}px, ${Math.round(y)}px)`; // the submenu grows from the row it opened beside panel.style.setProperty('--fm-ox', toRight ? '0px' : `${bw}px`); @@ -159,7 +189,7 @@ export class Popover { private place(x: number, y: number, ox = x, oy = y): void { const w = this.el.offsetWidth, h = this.el.offsetHeight; const nx = Math.round(Math.max(MARGIN, Math.min(x, window.innerWidth - w - MARGIN))); - const ny = Math.round(Math.max(MARGIN, Math.min(y, window.innerHeight - h - MARGIN))); + const ny = Math.round(Math.max(this.floor, Math.min(y, window.innerHeight - h - MARGIN))); this.el.style.transform = `translate(${nx}px, ${ny}px)`; this.el.style.setProperty('--fm-ox', `${Math.round(Math.max(0, Math.min(w, ox - nx)))}px`); this.el.style.setProperty('--fm-oy', `${Math.round(Math.max(0, Math.min(h, oy - ny)))}px`); diff --git a/frontend/src/ui/settings-dialog.ts b/frontend/src/ui/settings-dialog.ts index 72f6f5b..2dc7e39 100644 --- a/frontend/src/ui/settings-dialog.ts +++ b/frontend/src/ui/settings-dialog.ts @@ -15,11 +15,12 @@ import { THEATER_LAYOUTS, setTheaterLayout, theaterLayout } from './shell-opts'; import { PenSettingsPage } from './pen-settings'; import { THEMES, readChoice, setAccent, setIntensity, setTheme, themeSwatchesHtml } from './themes'; import { VIDEO_TOOLS, VideoToolsPage } from './video-tools'; +import { COMFY_SECTION, ComfySettingsPage } from './comfy-settings'; const RAIL_KEY = 'formmorpheus.prefsRailCollapsed'; const AUTOSAVE_CHOICES: ReadonlyArray<readonly [string, string]> = [['0', 'Off'], ['10', '10 s'], ['30', '30 s'], ['60', '1 min'], ['300', '5 min']]; const NOTICE_CHOICES: ReadonlyArray<readonly [string, string]> = [['0', 'Automatic'], ['3', '3 seconds'], ['5', '5 seconds'], ['10', '10 seconds'], ['20', '20 seconds']]; -const SECTION_ORDER = ['General', 'Interface', 'Timeline', 'Pen and Tablet', VIDEO_TOOLS, 'Agents']; +const SECTION_ORDER = ['General', 'Interface', 'Timeline', 'Pen and Tablet', VIDEO_TOOLS, COMFY_SECTION, 'Agents']; export class SettingsDialog extends Dialog { private readonly grid = el('<div class="nm-theme-grid" role="group" aria-label="Theme"></div>'); @@ -42,6 +43,7 @@ export class SettingsDialog extends Dialog { private prefs: Prefs = loadPrefs(); private readonly penPage = new PenSettingsPage(); private videoTools: VideoToolsPage | null = null; + private comfy: ComfySettingsPage | null = null; private readonly homeRow = checkRow('Show Home screen at launch', (v) => this.change({ autoShowHome: v })); private readonly homeCloseRow = checkRow('Show Home screen when the last movie closes', (v) => this.change({ homeOnLastClose: v })); @@ -92,7 +94,7 @@ export class SettingsDialog extends Dialog { this.grid.append(swatches.content); for (const b of Array.from(this.grid.querySelectorAll<HTMLElement>('[data-theme-id]'))) b.style.removeProperty('border-color'); const pages = el('<div class="cv-prefs-pages"></div>'); - const railIcons: Record<string, string> = { General: 'pfGeneral', Interface: 'pfInterface', Timeline: 'pfHistory', 'Pen and Tablet': 'shPen', [VIDEO_TOOLS]: 'film', Agents: 'agent' }; + const railIcons: Record<string, string> = { General: 'pfGeneral', Interface: 'pfInterface', Timeline: 'pfHistory', 'Pen and Tablet': 'shPen', [VIDEO_TOOLS]: 'film', [COMFY_SECTION]: 'genPlug', Agents: 'agent' }; const grp = (label: string, ...content: HTMLElement[]): HTMLElement => { const g = el('<section class="cv-prefs-group"><h3 class="cv-prefs-label"></h3></section>'); const h = q<HTMLElement>(g, '.cv-prefs-label'); @@ -160,6 +162,8 @@ export class SettingsDialog extends Dialog { if (platform.kind !== 'ipad') { this.videoTools = new VideoToolsPage(grp, nt); add(VIDEO_TOOLS, ...this.videoTools.groups); + this.comfy = new ComfySettingsPage(grp, nt); + add(COMFY_SECTION, ...this.comfy.groups); } const mcpRow = (label: string, value: string): HTMLElement => { const row = el('<div class="cv-field"><span></span><code class="cv-prefs-agents-mcp" translate="no" dir="ltr"></code></div>'); @@ -277,6 +281,7 @@ export class SettingsDialog extends Dialog { this.snapAlwaysRow.set(p.stageSnapAlways); this.penPage.show(); this.videoTools?.show(); + this.comfy?.show(); void this.loadAgents(); this.sync(); if (section && this.sections.has(section)) this.showSection(section); diff --git a/frontend/src/ui/whats-new-data.ts b/frontend/src/ui/whats-new-data.ts index 4479efc..7a61014 100644 --- a/frontend/src/ui/whats-new-data.ts +++ b/frontend/src/ui/whats-new-data.ts @@ -4,6 +4,14 @@ export interface Addition { title: string; text: string; command: string } export interface Release { version: string; name: string; additions: Addition[] } export const RELEASES: readonly Release[] = [ + { + version: '0.39.0', name: 'Generate with Comfy', + additions: [ + { title: 'Make video with a Comfy server', text: 'Create, Generate with Comfy sends pictures from the Timeline to your Comfy server and brings the result back on new tracks, in one undo step. Desktop only.', command: 'comfy-generate' }, + { title: 'Seven ways to generate', text: 'A fluid shot from Flipbook keyframes, animate a drawing, or erase, add or relight something in a video from a drawing painted over its first frame. Matte and Upscale work on a video block.', command: 'comfy-generate' }, + { title: 'Agents can generate too', text: 'Outside agents can check the server and follow its jobs, and ask your approval to generate from the blocks you have selected.', command: 'comfy-generate' }, + ], + }, { version: '0.38.0', name: 'More on the iPad', additions: [ diff --git a/frontend/src/version.ts b/frontend/src/version.ts index 7a6a8b6..6133112 100644 --- a/frontend/src/version.ts +++ b/frontend/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.38.1'; +export const VERSION = '0.39.0'; diff --git a/ios/project.yml b/ios/project.yml index c2b329a..7c17c71 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -27,7 +27,7 @@ settings: TARGETED_DEVICE_FAMILY: "2" SUPPORTS_MACCATALYST: NO SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: NO - MARKETING_VERSION: "0.38.1" + MARKETING_VERSION: "0.39.0" CURRENT_PROJECT_VERSION: "1" configs: Debug: diff --git a/setup/api_contract_check b/setup/api_contract_check index dcbbf61..3705632 100755 --- a/setup/api_contract_check +++ b/setup/api_contract_check @@ -17,6 +17,7 @@ have: ffmpeg, a socket server, or a folder dialog onto the file system. /api/video-tools* finds, downloads and removes ffmpeg; the iPad encodes with its own video encoders /api/agents*, /api/agent/*, /api/terminal*, /api/mcp/*, /mcp outside agents and the terminal panel are desktop only + /api/comfy/* generation through the person's own Comfy server; hidden on iPad /api/window/* the window key guards a loopback server other programs can reach; the iPad's scheme handler answers only its own web view x-websockets in the contract sockets cannot be served through the scheme handler @@ -56,6 +57,7 @@ DESKTOP_ONLY = [ ("*", "/api/mcp/*"), ("*", "/api/video-tools"), ("*", "/api/video-tools/*"), + ("*", "/api/comfy/*"), ("*", "/api/window/*"), ("*", "/mcp"), ] diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 713b765..1122b1a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "formmorpheus" -version = "0.38.1" +version = "0.39.0" dependencies = [ "gtk", "objc2", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index ff54ea9..7f906a0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "formmorpheus" -version = "0.38.1" +version = "0.39.0" description = "FormMorpheus desktop shell" authors = ["NodeAgentc, Inc."] license = "Apache-2.0" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 20e5f2f..3e390d7 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "FormMorpheus", - "version": "0.38.1", + "version": "0.39.0", "identifier": "ai.nodemode.formmorpheus", "build": { "frontendDist": "../frontend/dist"