Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Fixes 5: ARCHITECTURE no longer describes Pricing.inputSeconds

Claude6f8b56ed1048
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index b8fd0ac2..b330b651 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -87,7 +87,7 @@ A **model** has one **route** per (operation, provider). A route's `FieldMap` tr
Round 4 adds 17 operations (`remove-object`, `video-swap`, `video-insert`, `keyframes`, `sdr-to-hdr`, `export-video`, `ocr`, `still-motion`, `audio-loop`, `audio-join`, `scene-3d`, `splat`, `text-to-3d`, `rig-3d`, `extract-frames`, `images-to-video`, `overlay`) with labels, output kinds and NEEDS, and the canonical params they use: `points` (clicked on the first frame), `keyframeTimes`, `format` (a `VideoFormat`: H.264, 10-bit H.265, ProRes 422 HQ or 4444, FFV1, EXR, and on the open engine HLG or PQ 10-bit), Ken Burns `zoomFrom` / `zoomTo` / `panFrom` / `panTo` / `easing`, `crossfade`, `sourceDuration`, `frameInterval`, `targetFps`, `slowdown`, `colormap`, `sideBySide`, `matteOutput`, `position`, `scale`, `animation`, and `inputs.model3d`. `FieldMap` gains a key for each (`points` in Bria's or SAM's shape, `keyframes` as image + frame index at the API's fps, `zoom` for fal's zoompan, `loop` by repetition, `numFrames` from the clip's length, `upscaleFactor` from the target size and the clip's shorter edge…), plus `ranges` (clamped and rounded before sending), `maxImages`, `omitEmptyPrompt` and `ignore`. `EnumField.accepts` sends the closest value an API takes when a model runs on two APIs (Grok Imagine on fal and Higgsfield). `GenInput.sourceSize` and `sourceFps` (and `sourceDuration`, unless the request set it) are filled on the server from the input clip's header (`src/server/media-facts.ts`: MP4 / MOV, then WebM / Matroska).
-`ModelOptions` describe what the composer shows: aspect ratios, resolutions, durations, audio, end frame, multi-shot, draft mode, voices and voice cloning, languages, sliders, enum controls, provider-fetched preset lists, motion paths, and since round 3 `minImages` + `imageLabels` (try-on: "Person photo", "Add garment"), `promptless`, `maxVideos` / `maxAudios` (reference clips), `sourceLanguages` and `requires` ({images?, prompt?, msg}, checked in `planGeneration` before any job is created). `Pricing` gains `byResolution` (a price per `params.resolution`) and `inputSeconds` (per-second prices doubled for edits billed on input + output). Round 4 adds `promptOptional` (the box shows, but the model also runs without words), `requires.mask` / `points` (video erasers), `formats`, `colormaps`, `sideBySide`, `matteOutputs`, `keepsNamed`, `fpsTargets`, `slowdowns` and `labels` on controls; `ModelDef.worker: "isolated"`; `ModelRoute.chained` (a route the server builds as several jobs: the open keyframe film) and `ModelRoute.preview` (the parts of the map the composer previews a result with, kept in the slim client catalog). `Pricing` gains `promo` (a launch price to a date: FLUX 3 Max at 720p is $0.0425/s until 2026-11-07, then $0.17/s) and `factors` (multipliers by a setting: Topaz 60 fps ×2, ByteDance Pro ×10, FLUX.3 Creative about ×1.4).
+`ModelOptions` describe what the composer shows: aspect ratios, resolutions, durations, audio, end frame, multi-shot, draft mode, voices and voice cloning, languages, sliders, enum controls, provider-fetched preset lists, motion paths, and since round 3 `minImages` + `imageLabels` (try-on: "Person photo", "Add garment"), `promptless`, `maxVideos` / `maxAudios` (reference clips), `sourceLanguages` and `requires` ({images?, prompt?, msg}, checked in `planGeneration` before any job is created). `Pricing` gains `byResolution` (a price per `params.resolution`); a per-second price is the whole price of a second of clip (fixes-5 dropped `inputSeconds`: Happy Horse's $0.28/s at 720p already sums fal's input and output halves). Round 4 adds `promptOptional` (the box shows, but the model also runs without words), `requires.mask` / `points` (video erasers), `formats`, `colormaps`, `sideBySide`, `matteOutputs`, `keepsNamed`, `fpsTargets`, `slowdowns` and `labels` on controls; `ModelDef.worker: "isolated"`; `ModelRoute.chained` (a route the server builds as several jobs: the open keyframe film) and `ModelRoute.preview` (the parts of the map the composer previews a result with, kept in the slim client catalog). `Pricing` gains `promo` (a launch price to a date: FLUX 3 Max at 720p is $0.0425/s until 2026-11-07, then $0.17/s) and `factors` (multipliers by a setting: Topaz 60 fps ×2, ByteDance Pro ×10, FLUX.3 Creative about ×1.4).
`plan.ts` adds `promptOptional(model, op)` (promptless ops such as trim, mux, captions, layers, image-to-3d, vectorize), NEEDS entries with `oneOf` and `media` (transcribe and separate-audio take audio or video), a server-only check that rejects inputs no route can send (it needs the field maps the slim client catalog strips), and `inferOperation` picking `ref2v` when clips are attached. Since round 4, two or more images are `keyframes` when they carry `keyframeTimes` (or the model has no `ref2v` and no chained route), checked by `checkKeyframes` (on a chained route: up to 10, the first at 0 s, every gap within the model's clip lengths); a `format` the model doesn't write is refused; `checkVideoToolOptions` refuses colour maps and matte outputs the model can't make, and Remove background fills `params.matteOutput` with the model's first; a remove-object request can name its target with a mask or points instead of words when a route reads them (`markedTarget`). `estimateCost(model, params, jobs, op)` prices upscale-video, interpolate, sdr-to-hdr and export-video by the clip's seconds (`params.sourceDuration`; slow motion by the stretched length) and applies `Pricing.factors`. `chooseRoute` (in `src/server/generations.ts`) passes over a route whose image list takes fewer images than the run sends (`FieldMap.maxImages`).