feat(playground): image & video generation tabs + real chat metrics
The infosave collection now ships media models (Lumina-Image-2.0, MiniMax-H3 Turbo) that cortiq runs via `imagine`/`animate` CLI, not `cortiq serve`. The gateway grows a media API: local .cmf files are classified by `cortiq info` (chat/image/video, cached), generations run as tracked jobs with step progress parsed from stdout, one at a time, cancellable, outputs under <data>/media. The playground becomes three tabs. Image: width/height/steps/CFG/seed, live progress, result rendered from P6 PPM to a canvas in the browser (PNG export via toBlob). Video: frames/steps/quality/seed plus optional first/last keyframes (rasterized to PPM client-side); the MJPEG+PCM AVI is decoded in JS and played on a canvas synced to the wav — no ffmpeg on either side (mp4 remux happens opportunistically when ffmpeg exists). A metrics card shows resolution, steps, seed, total time, time per step/frame and file size. Chat metrics: the local cortiq server sends no usage chunk in streams, so token counts showed 0/0. tap_stream now injects one OpenAI-shaped usage event ahead of [DONE] with the gateway's ~4-chars/token estimate, flagged `cortiq_estimated`; the UI renders it as "≈ N / M" and adds tok/s and time-to-first-token. Registration skips media packs (a `cortiq serve` entry for a diffusion model would only fail) in both Register and the wizard's Finish. 36 new UI strings translated across all 7 languages.
This commit is contained in:
Vendored
+38
@@ -461,4 +461,42 @@ export default {
|
||||
"onboarding.deleteFile": "Delete the .cmf file from disk",
|
||||
"onboarding.confirmDelete": "Delete '{id}'? The .cmf file will be removed from disk.",
|
||||
"onboarding.unregistered": "Also unregistered: {ids}",
|
||||
|
||||
// playground: media generation + streaming metrics
|
||||
"pg.tab.chat": "Chat",
|
||||
"pg.tab.image": "Image",
|
||||
"pg.tab.video": "Video",
|
||||
"pg.generate": "Generate",
|
||||
"pg.generating": "Generating…",
|
||||
"pg.genFailed": "Generation failed — see the log.",
|
||||
"pg.result": "Result",
|
||||
"pg.genMetrics": "Generation metrics",
|
||||
"pg.imagePromptPlaceholder": "a red fox sitting in snow at sunset, photorealistic, detailed fur",
|
||||
"pg.videoPromptPlaceholder": "a corgi in a chef hat flipping a pancake, sizzling sounds and a cheerful bark",
|
||||
"pg.imageEmpty": "The generated image will appear here.",
|
||||
"pg.videoEmpty": "The generated clip (with audio) will appear here.",
|
||||
"pg.width": "Width",
|
||||
"pg.height": "Height",
|
||||
"pg.steps": "Steps",
|
||||
"pg.seed": "Seed",
|
||||
"pg.randomSeed": "Random seed",
|
||||
"pg.cfgHint": "Guidance scale; ≤ 1 disables CFG and halves the work.",
|
||||
"pg.frames": "Frames",
|
||||
"pg.framesHint": "At 24 fps; snapped to the model's grid.",
|
||||
"pg.quality": "JPEG quality",
|
||||
"pg.videoSizeHint": "Multiples of 32; the trained short edge is 768.",
|
||||
"pg.videoStepsHint": "The Turbo LoRA is trained for 4 steps.",
|
||||
"pg.firstFrame": "First frame (optional)",
|
||||
"pg.lastFrame": "Last frame (optional)",
|
||||
"pg.keyframeHint": "Turns the run into keyframe-to-video.",
|
||||
"pg.resolution": "Resolution",
|
||||
"pg.genTime": "Generation time",
|
||||
"pg.timePerStep": "Per step",
|
||||
"pg.timePerFrame": "Per frame",
|
||||
"pg.fileSize": "File size",
|
||||
"pg.duration": "Duration",
|
||||
"pg.play": "Play",
|
||||
"pg.noMediaModels": "No local {kind} model yet. Download one (e.g. from the infosave collection) in Import:",
|
||||
"pg.tokSpeed": "Speed",
|
||||
"pg.ttft": "First token",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user