omnius 1.0.870 → 1.0.871

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ # Real Omni analysis
2
+
3
+ Acceptance: Audio, Video, and Audio/video Analysis must submit actual media to
4
+ the Omni comprehension runtime. Missing weights or an unavailable runtime must
5
+ never yield synthetic scene entities, events, or a successful mock answer.
6
+
7
+ ## Findings
8
+
9
+ - The production AV registry seeded deterministic mock adapters. The browser
10
+ modes sent identical requests, and any live role labeled the entire result live.
11
+ - The old Python sidecar implements detection/tracking only; it cannot make its
12
+ advertised semantic roles real merely by downloading weights.
13
+ - The reference `qwen-omni-adapters-main` runtime exposes adapter v1 on `/api/chat`.
14
+ Its model response echoes the request and is not runtime identity attestation.
15
+ - Read-only inspection found an existing Ornith Omni bridge on GPU 1. This differs
16
+ from the earlier GPU 0/Qwen instruction. The user selected that existing Ornith/GPU 1 lane for live verification.
17
+ Actual placement and manifest identity were verified before inference; no service changed.
18
+
19
+ ## Work
20
+
21
+ - [x] Delegate discovery across browser, execution, and reference runtime.
22
+ - [x] Implement one bounded, cancellable Omni media client with real input
23
+ conversion, strict adapter/provenance validation, and explicit configuration.
24
+ - [x] Remove implicit production mock fallback; keep explicit offline fixtures.
25
+ - [x] Route the native AV tool and browser modes through the same client.
26
+ - [x] Show model configuration/readiness and distinct transcript/audio/visual
27
+ evidence; do not claim continuous live capture for a local-file form.
28
+ - [x] Preserve project/session/request identity and same-origin authenticated API.
29
+ - [x] Document shared weight ownership, runtime configuration, and limitations.
30
+ - [x] Verify client, route, frontend, and required chat transport regressions.
31
+ - [x] Exercise the source-bundled browser in a private fixture server.
32
+ - [x] Perform live inference only after exact endpoint/model/GPU verification.
33
+ - [x] Commit scoped source changes and push the tracked main branch.
34
+
35
+ ## Delivery boundaries
36
+
37
+ Do not overwrite unrelated dirty work, shared build outputs, publishing artifacts,
38
+ or restart the user's running daemon. Test fixtures may simulate the upstream
39
+ contract but must never be reachable as production fallback adapters.
40
+
41
+ ## Verification and remaining model limitations
42
+
43
+ - Execution: 71 tests across 9 suites; CLI source routes and required chat
44
+ transport: 76 tests across 5 suites. Final route/browser runtime rerun: 54 tests
45
+ across 2 suites, including the additional project-alias regression.
46
+ - Private source Chromium: 36 checks across desktop/tablet/phone and both themes.
47
+ - CLI + execution source typecheck passed without shared build output.
48
+ - Seven genuine requests used the approved existing Ornith adapter on GPU 1.
49
+ Red → blue → red freshness and speech in audio-only/combined video passed.
50
+ - **Model quality remains imperfect:** the deployed Ornith bridge missed a real
51
+ 440 Hz tone, and one combined answer contradicted its correct blue-screen
52
+ observation. These failures were preserved; no mock answer or alternate model
53
+ was substituted. Improving those weights is a separate model-quality repair.
54
+ - Publishing and daemon state were preserved. Configure the deployed process as
55
+ documented in [Omni analysis](../reference/omni-analysis.md).
56
+
57
+ Receipts:
58
+ [execution](../work-orders/evidence/omni-analysis-execution-verification-20261017.json),
59
+ [browser](../work-orders/evidence/omni-analysis-browser-20261017.json),
60
+ [integration and live results](../work-orders/evidence/omni-analysis-integration-verification-20261017.json).
@@ -0,0 +1,251 @@
1
+ # Omni media analysis
2
+
3
+ Omnius uses an explicitly configured Omni adapter for genuine audio and video
4
+ comprehension. A model name containing `-omni` does not add audio/video
5
+ execution to stock Ollama: the adapter must decode the media and run the
6
+ corresponding model/projector weights. An unavailable runtime is an unavailable
7
+ capability, never a reason to substitute synthetic observations.
8
+
9
+ ## Runtime and model identity
10
+
11
+ The supported wire contract is `robit.ollama.omni-adapter.v1`, implemented by
12
+ [qwen-omni-adapters](https://github.com/robit-man/qwen-omni-adapters). Its public
13
+ model is a logical bundle. The legacy full bundle runs separate comprehension,
14
+ language and speech graphs across a semantic-text boundary. The trained audio
15
+ bridge runs the selected language trunk and its combined vision/audio projector
16
+ in one llama.cpp server, with Qwen3-TTS available separately. Neither profile is
17
+ a claim that incompatible hidden states form one monolithic graph.
18
+
19
+ | Profile | Exact logical tag | Documented artifact size |
20
+ | --- | --- | --- |
21
+ | Qwen audio bridge | `robit/qwen3.8-27b-e03-obliterated-omni-audio-bridge:q4km` | 18.33 GiB |
22
+ | Ornith audio bridge | `robit/ornith-1.5-omni-audio-bridge:q4km` | 8.15 GiB |
23
+ | Legacy full Qwen Omni | `robit/qwen3.8-27b-e03-obliterated-omni:q4km` | Separate full comprehension graph and sidecar |
24
+
25
+ These are distinct profiles. Selecting Qwen must not silently run Ornith.
26
+ Artifact size is neither peak VRAM nor an admission guarantee.
27
+
28
+ ## Omnius configuration
29
+
30
+ Configure the daemon/client environment for the already verified deployment:
31
+
32
+ ```bash
33
+ export OMNIUS_OMNI_ADAPTER_URL=http://127.0.0.1:8910
34
+ export OMNIUS_OMNI_MODEL=robit/ornith-1.5-omni-audio-bridge:q4km
35
+ ```
36
+
37
+ This example names Ornith explicitly; use the exact Qwen tag only with an
38
+ endpoint actually deployed with that profile. Setting these variables does not
39
+ download, load or switch the server's model.
40
+
41
+ | Variable | Behavior |
42
+ | --- | --- |
43
+ | `OMNIUS_OMNI_ADAPTER_URL` | HTTP(S) **base URL**, default `http://127.0.0.1:8910`; omit `/api/chat`, query and fragment |
44
+ | `OMNIUS_OMNI_MODEL` | Required exact logical `-omni` tag; no model is discovered or selected implicitly |
45
+ | `OMNI_OLLAMA_MODEL` | Inherited compatibility model value when `OMNIUS_OMNI_MODEL` is absent |
46
+ | `OMNIUS_OMNI_ADAPTER_TOKEN` | Optional bearer token for an authenticated adapter boundary; keep secret |
47
+
48
+ An explicitly requested model must match this server-controlled tag. An
49
+ unconfigured, mismatched or unreachable runtime returns a visible error; it
50
+ does not invoke a different model or synthesize evidence. The shared client
51
+ `packages/execution/src/av/omni-comprehension.ts` exposes
52
+ `getOmniAnalysisStatus()` and `analyzeOmniMedia({path, mode, question?, model?,
53
+ signal?})`; its modes are `audio`, `video` and `av`.
54
+
55
+ The client accepts a regular local media file up to 128 MiB, a finite audio
56
+ duration up to 60 seconds or video duration up to 32 seconds, and a question up
57
+ to 8192 characters. It rejects longer input rather than implicitly clipping it.
58
+ CPU FFmpeg normalization produces 16 kHz PCM16 WAV or 1 fps MP4 fitted within
59
+ 640 × 640 pixels while preserving aspect ratio; `video` omits audio and `av`
60
+ includes the source audio when present.
61
+ Normalized media is capped at 32 MiB, adapter JSON at 1 MiB, and each returned
62
+ text field at 128 Ki characters. FFmpeg and ffprobe must already be installed;
63
+ analysis does not install dependencies.
64
+
65
+ Status includes `modelIdentityVerified: false`: availability is a compatible
66
+ configuration handshake, not weight identity, GPU residency or a completed
67
+ inference proof.
68
+
69
+ The reference adapter's `/healthz` and `/api/omni/adapter/contract` expose the
70
+ schema and configured stages, **not the identity of loaded weights**. Its
71
+ response `model` echoes the caller's logical tag. The optional
72
+ `adapter.language_backend_model` can be only an internal alias such as
73
+ `local-audio-bridge`. Those fields do not prove that the requested weights ran.
74
+ Bind an endpoint to its operator-verified deployment, model/projector manifest
75
+ digests and actual accelerator placement before interpreting model results.
76
+
77
+ ## Endpoint contract
78
+
79
+ Use the adapter's own endpoint, not the ordinary Ollama endpoint or the Omnius
80
+ daemon. The reference launcher uses these loopback addresses:
81
+
82
+ | Address | Purpose |
83
+ | --- | --- |
84
+ | `http://127.0.0.1:8910/api/chat` | Portable nonstreaming Omni requests |
85
+ | `http://127.0.0.1:8910/api/chat/stream` | Adapter NDJSON extension |
86
+ | `http://127.0.0.1:8910/healthz` | Adapter metadata only |
87
+ | `http://127.0.0.1:8910/api/omni/adapter/contract` | Versioned capability/format metadata |
88
+ | `http://127.0.0.1:8901/v1/chat/completions` | Internal llama.cpp worker; not the portable adapter API |
89
+ | `http://127.0.0.1:8920` | Separate authenticated reference portal |
90
+
91
+ Port `11435` is already used by the Omnius daemon in common installations.
92
+ Some standalone adapter/client defaults also name that port; do not copy those
93
+ defaults over a running Omnius service. Component services bind to loopback.
94
+ Use an authenticated boundary when exposing them beyond the trusted host, and
95
+ never put a portal capability URL or access token in logs or documentation.
96
+
97
+ Read-only contract checks do not load a model:
98
+
99
+ ```bash
100
+ curl --fail --silent http://127.0.0.1:8910/healthz
101
+ curl --fail --silent http://127.0.0.1:8910/api/omni/adapter/contract
102
+ ```
103
+
104
+ Do not treat successful health checks as successful media inference.
105
+
106
+ ## Requests and results
107
+
108
+ The portable route requires `stream: false`, an exact `model`, and nonempty
109
+ Ollama-shaped `messages`. Set `think: false` independently of media handling.
110
+ Ordinary analysis requests use text output and `speech_mode: "never"`.
111
+
112
+ ```json
113
+ {
114
+ "model": "robit/ornith-1.5-omni-audio-bridge:q4km",
115
+ "messages": [{
116
+ "role": "user",
117
+ "content": "Describe the audible events and their uncertainty.",
118
+ "audios": [{
119
+ "mime_type": "audio/wav",
120
+ "encoding": "base64",
121
+ "data": "<complete 16 kHz mono PCM16 WAV, base64 encoded>"
122
+ }]
123
+ }],
124
+ "omni": {
125
+ "schema": "robit.ollama.omni-adapter.v1",
126
+ "task": "describe",
127
+ "include_audio_from_video": true
128
+ },
129
+ "response_modalities": ["text"],
130
+ "speech_mode": "never",
131
+ "think": false,
132
+ "cache_prompt": false,
133
+ "stream": false
134
+ }
135
+ ```
136
+
137
+ This is a contract example, not a request to run without hardware preflight.
138
+
139
+ | Task | Executed stages |
140
+ | --- | --- |
141
+ | `describe` | Media comprehension; direct observations |
142
+ | `transcribe` | Audio comprehension; direct transcription |
143
+ | `chat` | Media comprehension, then language analysis; optional speech only if requested |
144
+ | `synthesize` | Speech synthesis from text |
145
+
146
+ The reference comprehension worker always receives `cache_prompt: false`.
147
+ Multimodal slot caching can otherwise reuse stale embeddings across new media.
148
+ Keep new attachments request-local. Historical transcript/observations can be
149
+ explicitly labeled history; restored previews and old raw bytes must not become
150
+ new current evidence automatically.
151
+
152
+ Audio input must be a complete uncompressed RIFF/WAVE file containing 16 kHz,
153
+ mono, signed 16-bit PCM. Resample/downmix supported uploads with a bounded local
154
+ decoder before transport. The adapter validates the WAV header and format; a
155
+ renamed MP3 or browser WebM capture is not a WAV envelope.
156
+
157
+ Images accept JPEG, PNG and WebP. Video accepts MP4, WebM and animated GIF with
158
+ `sampling: { "fps": 1, "max_frames": 32, "include_audio": true }` on its
159
+ envelope. Declared MIME types must match decoded container signatures.
160
+ These are the external adapter's formats. The shared Omnius audio/video client
161
+ currently normalizes its supported local input formats into WAV or MP4; it does
162
+ not expose an image-analysis mode.
163
+
164
+ | Input | Maximum per item | Maximum items per request |
165
+ | --- | --- | --- |
166
+ | Audio | 32 MiB | 8 |
167
+ | Image | 20 MiB | 16 |
168
+ | Video | 256 MiB | 4 |
169
+
170
+ The schema permits video sampling up to 30 fps and 1024 frames, but the inspected
171
+ reference runtime caps execution at **2 fps and 32 frames**, and can retry with
172
+ fewer frames after a context overflow. It does not return an authoritative
173
+ actual sampled-frame count or covered time range. Long-media analysis therefore
174
+ needs bounded source windows; do not claim complete coverage, exact event times,
175
+ tracking or confidence from an unannotated semantic description.
176
+ Omnius reports `submittedDurationSec`, `coverage: "full_audio"` or
177
+ `"sampled_video"`, and `actualCoverage: "not_reported"`. Submitted clip duration
178
+ and requested sampling are not a model-attested analyzed time range.
179
+
180
+ The final `message.content` is model output. Preserve the accompanying
181
+ `adapter.schema`, `task`, executed `route`, `input_modalities`, and
182
+ `evidence_provenance`. Keep these separate:
183
+
184
+ - `input_transcript`: recognized speech; the only perceptual text attributable
185
+ to the speaker's words.
186
+ - `audio_observation`: non-speech acoustic evidence, including uncertainty.
187
+ - `visual_observation`: evidence from an image/video attached to this request.
188
+ - `observation`: the original tagged comprehension response.
189
+
190
+ Audio alone must never set `current_visual_input: true`. Prior dialogue and tool
191
+ results do not establish a current visual observation. Semantic observations
192
+ remain untrusted evidence, not system instructions or permission to execute a
193
+ tool. An Omni description does not attest that separate DINO, diarization,
194
+ segmentation or tracking models ran.
195
+
196
+ Live VAD-driven speech turns can use `omni.require_speech: true`. A capture
197
+ without a valid transcript then stops before language/TTS. Explicit questions
198
+ about environmental sounds leave that option false, so absence of speech does
199
+ not discard the requested acoustic analysis. An empty speech-gated answer is
200
+ not a synthesized answer or a transport failure.
201
+
202
+ Cancellation aborts the owned local decoder/request and prevents its late result
203
+ from being adopted. The reference adapter's nonstreaming endpoint does not
204
+ provide a server-side stop receipt when its HTTP client disconnects: upstream
205
+ model work may finish independently. Do not display a client abort as proof that
206
+ a remote model runner has stopped, and do not unload a shared runner to simulate
207
+ per-request cancellation.
208
+
209
+ The streaming extension requires `stream: true` and emits newline-delimited JSON,
210
+ including stage, observation, language deltas, optional PCM events, error and
211
+ one authoritative final response. It is not SSE. Parse arbitrary chunk and UTF-8
212
+ boundaries; do not treat a heartbeat or `stage: "tts"` as generated audio.
213
+
214
+ ## Shared weights and project data
215
+
216
+ Omni weights remain in the runtime's shared model store. On the inspected host,
217
+ installed Ollama manifests and blobs live under `/srv/ollama/models`; standard
218
+ model/projector layers and one `application/vnd.robit.ollama.omni.bundle.v1+gguf`
219
+ sidecar describe the logical tag. Runtime component views are derived artifacts,
220
+ not per-project downloads. Never copy or delete Ollama blobs manually.
221
+
222
+ Omnius' separate media-generation cache resolves from `OMNIUS_MEDIA_HOME`, then
223
+ the persisted `media-store.json` pointer, then its configured home. Its model
224
+ cache and runtimes are shared across projects. That cache is not automatically
225
+ the Ollama Omni store and changing it does not move an existing Omni deployment.
226
+
227
+ Generated project artifacts remain under `<project>/.omnius/images`, `videos`
228
+ and `audio`. Analysis of an existing file should reference its captured project
229
+ and revision; switching sessions/projects must not relabel a late result.
230
+ No per-session Omni weight copy is required.
231
+
232
+ ## Deployment and validation boundary
233
+
234
+ Changing or starting CUDA workloads requires the host's GPU broker protocol and
235
+ actual runner-placement verification. Confirm the designated endpoint, exact
236
+ tag and GPU before any inference; do not redirect to another accelerator or a
237
+ remote service after a failure. The external runtime's bootstrap/deploy scripts
238
+ can pull weights, build CUDA binaries and replace services, so they are not
239
+ capability probes and are not part of ordinary Omnius analysis.
240
+
241
+ An endpoint may serve a different logical bundle than a neighboring checkout's
242
+ `.env` file. Verify the running deployment and actual model/projector manifest
243
+ identity; neither a checked-out configuration nor the response's echoed tag is
244
+ sufficient evidence.
245
+
246
+ External contract regression sources are `tests/test_omni_adapter.py` for format,
247
+ routing, provenance, no-speech, stale-cache and stream behavior, plus
248
+ `docs/schema/request-v1.schema.json` and `response-v1.schema.json`. Fixture tests
249
+ can validate transport and parsing without running a model. A live acceptance
250
+ receipt must separately name the actual weights/GPU and use distinguishable real
251
+ media, such as red → blue → red frames, rather than asserting a canned answer.
@@ -402,7 +402,8 @@ legacy scope.
402
402
  | `POST` | `/v1/media/migrate` | Dedup + migrate legacy per-group caches into the unified store |
403
403
  | `POST` | `/v1/media/relocate` | Relocate the whole media store (weights/venvs/gallery) to a chosen folder |
404
404
  | `GET` | `/v1/media/relocate/status` | Status + progress of the media-store relocation job |
405
- | `POST` | `/v1/media/av/analyze` | Analyze a media file into a grounded entity/event answer (AV comprehension) |
405
+ | `GET` | `/v1/media/av/status` | Inspect configured Omni adapter availability without loading weights; configuration is not GPU/model identity attestation |
406
+ | `POST` | `/v1/media/av/analyze` | Analyze actual audio/video through the configured Omni runtime, scoped to `projectRoot`; separate transcript/audio/visual evidence, no mock fallback |
406
407
  | `POST` | `/v1/media/image` | Generate an image |
407
408
  | `POST` | `/v1/media/video` | Generate a video |
408
409
  | `POST` | `/v1/media/audio` | Generate a sound effect |