From df84c22143ff6a4ab79385ef6931ef44f9de83d3 Mon Sep 17 00:00:00 2001 From: shigongyuan-agent <4846a27a-ba87-49c9-939d-7275f63efcc7@multica.agent> Date: Mon, 28 Sep 2026 09:47:48 +0800 Subject: [PATCH] feat: standalone image/video studio windows + generation tasks page (HEL-612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /image and /video pages (a3/a4): three-column layout — params (connection, workflow, upload slots driven by declared inputs, prompt/negative/seed/ size/duration fields, dynamic params), current-task card with live SSE progress + cancel, result grid with zoom/send-to-img2img/download, video player with custom amber controls + first/last-frame strip, right history with retry/delete and failure reasons - /tasks page: both task classes summarized with source labels (独立生图/独立生视频/Playground/创作流程), filters, retry/cancel/delete - nav: 生图/生视频/生成任务 real pages with active-jobs badge (进行数徽章) - playground generate accepts source (studio-image/studio-video) for origin labeling; api.ts types follow - parseDbTs helper: UTC-naive backend timestamps parse as UTC so elapsed/ ETA/duration math is offset-correct - backend tests: full-chain fake-ComfyUI server — image chain, video chain with frame uploads, retry-after-failure, delete-removes-outputs, tasks listing; i18n zh/en/es/fr/de/ja/ko complete Co-authored-by: multica-agent --- .../src/calliope/routers/playground.py | 10 +- .../tests/test_studio_generation.py | 363 +++ calliope-web/src/lib/api.ts | 9 +- .../src/lib/components/shell/AppShell.svelte | 63 +- .../lib/components/studio/MediaSlot.svelte | 345 +++ .../components/studio/StudioGenerate.svelte | 2105 +++++++++++++++++ calliope-web/src/lib/dbtime.ts | 12 + calliope-web/src/lib/i18n/de.ts | 125 + calliope-web/src/lib/i18n/en.ts | 125 + calliope-web/src/lib/i18n/es.ts | 125 + calliope-web/src/lib/i18n/fr.ts | 125 + calliope-web/src/lib/i18n/ja.ts | 125 + calliope-web/src/lib/i18n/ko.ts | 125 + calliope-web/src/lib/i18n/zh.ts | 125 + calliope-web/src/routes/image/+page.svelte | 9 + calliope-web/src/routes/tasks/+page.svelte | 516 ++++ calliope-web/src/routes/video/+page.svelte | 9 + 17 files changed, 4306 insertions(+), 10 deletions(-) create mode 100644 calliope-backend/tests/test_studio_generation.py create mode 100644 calliope-web/src/lib/components/studio/MediaSlot.svelte create mode 100644 calliope-web/src/lib/components/studio/StudioGenerate.svelte create mode 100644 calliope-web/src/lib/dbtime.ts create mode 100644 calliope-web/src/routes/image/+page.svelte create mode 100644 calliope-web/src/routes/tasks/+page.svelte create mode 100644 calliope-web/src/routes/video/+page.svelte diff --git a/calliope-backend/src/calliope/routers/playground.py b/calliope-backend/src/calliope/routers/playground.py index 4276a282..3d7df63a 100644 --- a/calliope-backend/src/calliope/routers/playground.py +++ b/calliope-backend/src/calliope/routers/playground.py @@ -23,12 +23,18 @@ PLAYGROUND_STATUS = "system" PLAYGROUND_TITLE = "Playground Scratch" +# Where the request came from — recorded on the job payload so the tasks +# page can label origins ("独立生图" vs canvas Playground) without guessing. +PlaygroundSource = Literal["playground", "studio-image", "studio-video"] + + class PlaygroundGenerate(BaseModel): workflow_id: int input_values: dict[str, Any] = Field(default_factory=dict) # Optional target connection; omitted → the workflow's bound connection, # then the active one (resolved in queue_manager.enqueue). endpoint_id: str | None = None + source: PlaygroundSource = "playground" class PlaygroundAttach(BaseModel): @@ -344,13 +350,13 @@ async def generate(payload: PlaygroundGenerate) -> dict[str, Any]: scene_id=None, payload={ "input_values": payload.input_values, - "source": "playground", + "source": payload.source, **({"endpoint_id": payload.endpoint_id} if payload.endpoint_id else {}), }, ) await event_bus.publish( "job.created", - {"job_id": job["id"], "kind": kind, "source": "playground", "project_id": pid}, + {"job_id": job["id"], "kind": kind, "source": payload.source, "project_id": pid}, ) return {"ok": True, "job": _job_public(job)} diff --git a/calliope-backend/tests/test_studio_generation.py b/calliope-backend/tests/test_studio_generation.py new file mode 100644 index 00000000..124f2086 --- /dev/null +++ b/calliope-backend/tests/test_studio_generation.py @@ -0,0 +1,363 @@ +"""独立生图/生视频 full-chain tests (HEL-612): studio window jobs run +through the real playground → queue → ComfyUI HTTP → downloaded-output +path against a fake ComfyUI server (real HTTP round trip), plus the +source label, upload slot flow, retry and delete behaviours.""" + +from __future__ import annotations + +import io +import json +import threading +import time +import uuid +from contextlib import contextmanager +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path + +import pytest + +from calliope.config import settings + +PNG_1PX = bytes.fromhex( + "89504e470d0a1a0a0000000d49484452000000010000000108060000001f15c489" + "0000000d4944415478da63f8cfc0f01f0005000105ab5e30760000000049454e44ae426082" +) + + +class _FakeComfyHandler(BaseHTTPRequestHandler): + """Minimal ComfyUI: /system_stats, /prompt, /history/{id}, /view, /upload/image.""" + + server_version = "FakeComfy/1.0" + + def do_GET(self): + self.server.requests.append(self.path) + if self.path == "/system_stats": + self._json( + 200, + { + "system": {"comfyui_version": "0.3.72-fake", "os": "linux"}, + "devices": [{"name": "FakeGPU", "type": "cuda"}], + }, + ) + return + if self.path.startswith("/history/"): + pid = self.path[len("/history/") :] + entry = self.server.history.get(pid) + if entry is None: + self._json(200, {}) + return + self._json(200, {pid: entry}) + return + if self.path.startswith("/view"): + self._raw(200, PNG_1PX, "image/png") + return + self._json(404, {"error": "not found"}) + + def do_POST(self): + length = int(self.headers.get("Content-Length") or 0) + body = self.rfile.read(length) if length else b"" + self.server.requests.append(self.path) + if self.path == "/prompt": + if self.server.fail_prompt: + self._json(500, {"error": "boom", "node_errors": []}) + return + prompt_id = uuid.uuid4().hex + outputs_key = self.server.outputs_key + out_entry = { + outputs_key: [{"filename": self.server.out_name, "subfolder": "", "type": "output"}] + } + self.server.history[prompt_id] = { + "status": {"status_str": "success", "completed": True}, + "outputs": {"9": out_entry}, + "prompt": [], + } + self.server.prompts.append(json.loads(body.decode("utf-8") or "{}")) + self._json(200, {"prompt_id": prompt_id}) + return + if self.path == "/upload/image": + self.server.uploads.append(body) + self._json(200, {"name": "uploaded-input.png", "subfolder": "calliope"}) + return + self._json(404, {"error": "not found"}) + + def _json(self, status: int, payload: dict) -> None: + data = json.dumps(payload).encode("utf-8") + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + + def _raw(self, status: int, data: bytes, ctype: str) -> None: + self.send_response(status) + self.send_header("Content-Type", ctype) + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + + def log_message(self, format, *args): + pass + + +@pytest.fixture +def fake_comfy(): + server = ThreadingHTTPServer(("127.0.0.1", 0), _FakeComfyHandler) + server.requests = [] + server.prompts = [] + server.uploads = [] + server.history = {} + server.fail_prompt = False + server.out_name = "out-1.png" + server.outputs_key = "images" + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + try: + yield server + finally: + server.shutdown() + server.server_close() + + +def _url(server) -> str: + return f"http://127.0.0.1:{server.server_address[1]}" + + +@contextmanager +def _real_run(client, server, endpoint_name="测试桩连接"): + """One registered connection pointing at the fake server; dry_run off.""" + prev_dry = settings.dry_run + prev_eps = [dict(ep) for ep in (settings.comfyui_endpoints or [])] + prev_active = settings.comfyui_active_id + settings.dry_run = False + r = client.post( + "/api/comfyui/endpoints", + json={"name": endpoint_name, "base_url": _url(server), "auth_type": "none"}, + ) + assert r.status_code == 200, r.text + endpoints = r.json()["endpoints"] + # keep only the new endpoint for deterministic snapshot resolution + settings.comfyui_endpoints = [dict(ep) for ep in endpoints if ep["base_url"] == _url(server)] + settings.comfyui_active_id = settings.comfyui_endpoints[0]["id"] + settings.apply_active_comfyui() + try: + yield settings.comfyui_endpoints[0] + finally: + settings.dry_run = prev_dry + settings.comfyui_endpoints = prev_eps + settings.comfyui_active_id = prev_active + settings.apply_active_comfyui() + + +IMAGE_WORKFLOW = { + "1": { + "class_type": "CLIPTextEncode", + "inputs": {"text": "默认提示词"}, + "_meta": {"title": "(Input:prompt) 正向提示词"}, + }, + "2": { + "class_type": "PrimitiveInt", + "inputs": {"value": 42}, + "_meta": {"title": "(Input:seed) 种子"}, + }, + "9": { + "class_type": "SaveImage", + "inputs": {"images": "x"}, + "_meta": {"title": "(Output:image) 图片输出"}, + }, +} + + +def _video_workflow(first_last: bool) -> dict: + wf = { + "1": { + "class_type": "CLIPTextEncode", + "inputs": {"text": "镜头缓慢推近"}, + "_meta": {"title": "(Input:prompt) 正向提示词"}, + }, + "2": { + "class_type": "PrimitiveFloat", + "inputs": {"value": 6}, + "_meta": {"title": "(Input:duration) 时长"}, + }, + } + if first_last: + wf["3"] = { + "class_type": "LoadImage", + "inputs": {"image": ""}, + "_meta": {"title": "(Input:image) 首帧"}, + } + wf["4"] = { + "class_type": "LoadImage", + "inputs": {"image": ""}, + "_meta": {"title": "(Input:image) 尾帧"}, + } + wf["9"] = { + "class_type": "VHS_VideoCombine", + "inputs": {}, + "_meta": {"title": "(Output:video) 视频输出"}, + } + return wf + + +def _import_workflow(client, name: str, kind: str, workflow: dict) -> int: + r = client.post( + "/api/workflows", + json={"name": name, "kind": kind, "workflow_json": workflow}, + ) + assert r.status_code == 200, r.text + return r.json()["id"] + + +def _wait_done(client, job_id: int, timeout: float = 25.0) -> dict: + deadline = time.time() + timeout + while time.time() < deadline: + jobs = client.get("/api/playground/jobs").json() + for job in jobs: + if job["id"] == job_id: + if job["status"] in ("done", "failed"): + return job + time.sleep(0.4) + pytest.fail(f"job {job_id} did not finish in {timeout}s") + + +def test_studio_image_full_chain(client, fake_comfy): + """独立生图: upload → generate(source=studio-image) → worker → output file.""" + with _real_run(client, fake_comfy): + wf_id = _import_workflow(client, "假·文生图", "image", IMAGE_WORKFLOW) + r = client.post( + "/api/playground/generate", + json={ + "workflow_id": wf_id, + "input_values": {"1": "霓虹灯下的雨夜街道", "2": 7}, + "source": "studio-image", + "endpoint_id": settings.comfyui_active_id, + }, + ) + assert r.status_code == 200, r.text + job_id = r.json()["job"]["id"] + + job = _wait_done(client, job_id) + assert job["status"] == "done", job.get("error") + assert job["kind"] == "image" + assert job["payload"]["source"] == "studio-image" + + # endpoint snapshot: id/name/url only, never a token + snap = job["payload"]["endpoint"] + assert snap["id"] == settings.comfyui_active_id + assert snap["base_url"] == _url(fake_comfy) + assert "token" not in json.dumps(snap) + + # output downloaded into assets and served via /api/file + assert len(job["output_paths"]) == 1 + out = Path(job["output_paths"][0]) + assert out.exists() and out.read_bytes() == PNG_1PX + r = client.get("/api/file", params={"path": str(out)}) + assert r.status_code == 200 + + # the workflow actually reached the fake ComfyUI /prompt + assert any(p.startswith("/prompt") for p in map(str, fake_comfy.requests)) + queued = fake_comfy.prompts[-1]["prompt"] + assert queued["1"]["inputs"]["text"] == "霓虹灯下的雨夜街道" + assert queued["2"]["inputs"]["value"] == 7 + + +def test_studio_video_full_chain_with_frame_uploads(client, fake_comfy): + """独立生视频: first/last frame slots upload to ComfyUI before /prompt.""" + fake_comfy.outputs_key = "videos" + fake_comfy.out_name = "out-clip.mp4" + with _real_run(client, fake_comfy): + wf_id = _import_workflow(client, "假·首尾帧生视频", "video", _video_workflow(True)) + + # two upload-slot files via the playground upload API + paths = [] + for _ in range(2): + r = client.post( + "/api/playground/uploads", + files={"file": ("frame.png", io.BytesIO(PNG_1PX), "image/png")}, + ) + assert r.status_code == 200, r.text + paths.append(r.json()["path"]) + + r = client.post( + "/api/playground/generate", + json={ + "workflow_id": wf_id, + "input_values": {"1": "海上日出延时", "2": 6, "3": paths[0], "4": paths[1]}, + "source": "studio-video", + "endpoint_id": settings.comfyui_active_id, + }, + ) + assert r.status_code == 200, r.text + job = _wait_done(client, r.json()["job"]["id"]) + assert job["status"] == "done", job.get("error") + assert job["payload"]["source"] == "studio-video" + assert job["output_paths"][0].endswith(".mp4") + + # both frames were uploaded to ComfyUI's /upload/image (media slots) + assert len(fake_comfy.uploads) == 2 + queued = fake_comfy.prompts[-1]["prompt"] + assert queued["3"]["inputs"]["image"] == "calliope/uploaded-input.png" + assert queued["4"]["inputs"]["image"] == "calliope/uploaded-input.png" + + +def test_studio_retry_after_failure(client, fake_comfy): + """失败原因进历史 → retry re-queues → success.""" + fake_comfy.fail_prompt = True + with _real_run(client, fake_comfy): + wf_id = _import_workflow(client, "假·文生图(重试)", "image", IMAGE_WORKFLOW) + r = client.post( + "/api/playground/generate", + json={"workflow_id": wf_id, "input_values": {"1": "x"}, "source": "studio-image"}, + ) + job_id = r.json()["job"]["id"] + job = _wait_done(client, job_id) + assert job["status"] == "failed" + assert job["error"] + + fake_comfy.fail_prompt = False + r = client.post(f"/api/jobs/{job_id}/retry") + assert r.status_code == 200, r.text + job = _wait_done(client, job_id) + assert job["status"] == "done" + assert job["retry_count"] >= 1 + + +def test_studio_delete_removes_outputs(client, fake_comfy): + with _real_run(client, fake_comfy): + wf_id = _import_workflow(client, "假·文生图(删除)", "image", IMAGE_WORKFLOW) + r = client.post( + "/api/playground/generate", + json={"workflow_id": wf_id, "input_values": {"1": "y"}, "source": "studio-image"}, + ) + job_id = r.json()["job"]["id"] + job = _wait_done(client, job_id) + assert job["status"] == "done" + out = Path(job["output_paths"][0]) + assert out.exists() + + r = client.delete(f"/api/playground/jobs/{job_id}") + assert r.status_code == 200, r.text + assert not out.exists() + jobs = client.get("/api/playground/jobs").json() + assert all(j["id"] != job_id for j in jobs) + + +def test_studio_jobs_listed_on_tasks_api(client, fake_comfy): + """/api/jobs (生成任务页) carries both studio kinds with payload.source.""" + with _real_run(client, fake_comfy): + img_wf = _import_workflow(client, "假·文生图A", "image", IMAGE_WORKFLOW) + fake_comfy.outputs_key = "videos" + fake_comfy.out_name = "v.mp4" + vid_wf = _import_workflow(client, "假·生视频A", "video", _video_workflow(False)) + for wf_id, source in ((img_wf, "studio-image"), (vid_wf, "studio-video")): + r = client.post( + "/api/playground/generate", + json={"workflow_id": wf_id, "input_values": {"1": "z"}, "source": source}, + ) + assert r.status_code == 200, r.text + _wait_done(client, r.json()["job"]["id"]) + + jobs = client.get("/api/jobs").json() + sources = {j["payload"].get("source"): j["kind"] for j in jobs} + assert sources.get("studio-image") == "image" + assert sources.get("studio-video") == "video" diff --git a/calliope-web/src/lib/api.ts b/calliope-web/src/lib/api.ts index 40999e9c..9d4588cd 100644 --- a/calliope-web/src/lib/api.ts +++ b/calliope-web/src/lib/api.ts @@ -450,7 +450,14 @@ export interface PlaygroundUploadListItem { export const playgroundApi = { project: () => api('/api/playground/project'), jobs: () => api('/api/playground/jobs'), - generate: (payload: { workflow_id: number; input_values?: Record }) => + generate: (payload: { + workflow_id: number; + input_values?: Record; + /** Target connection; omitted → workflow binding → active (backend). */ + endpoint_id?: string | null; + /** Origin recorded on the job payload (tasks page labels). */ + source?: 'playground' | 'studio-image' | 'studio-video'; + }) => api<{ ok: boolean; job: Job }>('/api/playground/generate', { method: 'POST', body: JSON.stringify(payload), diff --git a/calliope-web/src/lib/components/shell/AppShell.svelte b/calliope-web/src/lib/components/shell/AppShell.svelte index b8ab4613..534e628c 100644 --- a/calliope-web/src/lib/components/shell/AppShell.svelte +++ b/calliope-web/src/lib/components/shell/AppShell.svelte @@ -3,7 +3,7 @@ import LanguageSwitcher from '$lib/components/LanguageSwitcher.svelte'; import Icon from '$lib/components/ui/Icon.svelte'; import type { IconName } from '$lib/components/ui/icons'; - import { settings } from '$lib/api'; + import { settings, jobsApi } from '$lib/api'; import { t } from '$lib/i18n.svelte'; /** @@ -39,9 +39,9 @@ const NAV: NavItem[] = [ { id: 'projects', labelKey: 'shell.navProjects', icon: 'home', href: '/' }, { id: 'workbench', labelKey: 'shell.navWorkbench', icon: 'story', href: '/canvas' }, - { id: 'image', labelKey: 'shell.navImage', icon: 'image', wip: true }, - { id: 'video', labelKey: 'shell.navVideo', icon: 'film', wip: true }, - { id: 'tasks', labelKey: 'shell.navTasks', icon: 'queue', wip: true }, + { id: 'image', labelKey: 'shell.navImage', icon: 'image', href: '/image' }, + { id: 'video', labelKey: 'shell.navVideo', icon: 'film', href: '/video' }, + { id: 'tasks', labelKey: 'shell.navTasks', icon: 'queue', href: '/tasks' }, { id: 'agents', labelKey: 'shell.navAgents', icon: 'sparkle', href: '/agents' }, { id: 'connections', labelKey: 'shell.navConnections', icon: 'link', href: '/connections' }, { id: 'models', labelKey: 'shell.navModels', icon: 'assets', href: '/models' }, @@ -67,6 +67,20 @@ staleTime: 60_000, }); + // 生成任务 badge: how many jobs are queued or running right now + // (spec §3 — 进行数徽章). Polled lightly; SSE-driven pages keep + // their own faster cadence. + const activeJobsQuery = createQuery({ + queryKey: ['jobs', 'active-count'], + queryFn: () => jobsApi.list(), + refetchInterval: 8_000, + staleTime: 5_000, + }); + const activeJobs = $derived( + ($activeJobsQuery.data ?? []).filter((j) => j.status === 'pending' || j.status === 'running') + .length, + ); + // The ACTIVE ComfyUI connection from settings (HEL-611). The dot stays // neutral — a passing test is only claimed on the connections page, // where it comes from a real server-side probe. @@ -115,9 +129,12 @@ href={item.href} aria-current={active === item.id ? 'page' : undefined} > - - {t(item.labelKey)} - + + {t(item.labelKey)} + {#if item.id === 'tasks' && activeJobs > 0} + {activeJobs} + {/if} + {:else} @@ -275,6 +292,21 @@ white-space: nowrap; } + /* 进行数徽章 (spec §3): accent-dim capsule with amber count */ + .nav-badge { + margin-left: auto; + min-width: 20px; + padding: 1px 7px; + border-radius: 999px; + background: var(--accent-dim); + color: var(--accent); + font-size: 10.5px; + font-weight: 600; + font-variant-numeric: tabular-nums; + text-align: center; + line-height: 1.5; + } + .side-foot { margin-top: auto; display: flex; @@ -410,6 +442,23 @@ .wip-pill { display: none; } + /* icon-only rail: the tasks badge collapses to a small amber dot */ + .nav-item { + position: relative; + } + .nav-badge { + position: absolute; + top: 3px; + right: 5px; + min-width: 6px; + width: 6px; + height: 6px; + padding: 0; + border-radius: 50%; + background: var(--accent); + font-size: 0; + line-height: 0; + } /* icon-only rail: a small dot marks unbuilt entries */ .nav-item.disabled .nav-icon { position: relative; diff --git a/calliope-web/src/lib/components/studio/MediaSlot.svelte b/calliope-web/src/lib/components/studio/MediaSlot.svelte new file mode 100644 index 00000000..893e3fbf --- /dev/null +++ b/calliope-web/src/lib/components/studio/MediaSlot.svelte @@ -0,0 +1,345 @@ + + +
+
+ {label} + {#if hint}{hint}{/if} +
+ + { + const f = e.currentTarget.files?.[0]; + if (f) onFile(f); + }} + /> + + {#if value && !broken} +
+
+ {#if kind === 'image'} + {label} (broken = true)} /> + {:else if kind === 'video'} + + + {:else} + + {/if} +
+
+ {baseName(value)} +
+ {#if allowFromResults && onFromResults} + + {/if} + +
+
+
+ {:else} + + {#if allowFromResults && onFromResults} + + {/if} + {/if} + {#if error}{error}{/if} +
+ + diff --git a/calliope-web/src/lib/components/studio/StudioGenerate.svelte b/calliope-web/src/lib/components/studio/StudioGenerate.svelte new file mode 100644 index 00000000..8d870872 --- /dev/null +++ b/calliope-web/src/lib/components/studio/StudioGenerate.svelte @@ -0,0 +1,2105 @@ + + +
+ +
+ {#if !$settingsQuery.isLoading && !endpoints.length} +
+ +

{t('studio.errNoConn')}

+ {t('studio.connManage')} +
+ {:else if !kindWorkflows.length} +
+ +

{t('studio.wfEmptyTitle', { kind: kind === 'image' ? t('studio.kindImageText') : t('studio.kindVideoText') })}

+ {t('studio.wfEmptyGo')} +
+ {:else} +
+ + {t('studio.connLabel')} + + {#if connRec?.ok} + + {t('studio.connOk', { ms: connRec.ms ?? '?' })} + {:else if connRec?.ok === false} + + {t('studio.connFail')} + {:else} + + {t('studio.connUntested')} + {/if} + · {t('studio.connQueue', { n: queueCount })} + + + + {#if showErrors && errors.conn}{errors.conn}{/if} +
+ +
+ + {t('studio.wfLabel')} + {#if currentWorkflow} + + {t('studio.wfParams', { n: currentWorkflow.input_schema?.length ?? 0 })} · + {#if currentWorkflow.endpoint_id} + {t('studio.wfBindTo', { + name: endpoints.find((e) => e.id === currentWorkflow.endpoint_id)?.name ?? '?', + })} + {:else} + {t('studio.wfFollowActive')} + {/if} + + {/if} + + +
+ + {#if mediaSlots.length} +
+ {#each mediaSlots as s (s.inp.nodeId)} + {#if s.inp.kind === 'video' || s.inp.kind === 'audio'} +
+ slotFile(s.inp.nodeId, f)} + onClear={() => setVal(s.inp.nodeId, '')} + /> +
+ {:else} +
+ slotFile(s.inp.nodeId, f)} + onFromResults={() => openPicker(s.inp.nodeId)} + onClear={() => setVal(s.inp.nodeId, '')} + /> +
+ {/if} + {/each} +
+ {#if showErrors && errors[`${mediaSlots.find((s) => /first|start|首帧/.test(hay(s.inp)))?.inp.nodeId ?? ''}|${mediaSlots.find((s) => /last|end|尾帧/.test(hay(s.inp)))?.inp.nodeId ?? ''}`]} + + {errors[`${mediaSlots.find((s) => /first|start|首帧/.test(hay(s.inp)))?.inp.nodeId ?? ''}|${mediaSlots.find((s) => /last|end|尾帧/.test(hay(s.inp)))?.inp.nodeId ?? ''}`]} + + {/if} + {/if} + + {#if promptInp} + + {/if} + +
+ {#if negInp} + + {/if} + {#if seedInp} + + {/if} +
+ + {#if kind === 'image'} + {#if widthInp || heightInp || batchInp} +
+ {#if widthInp && heightInp} +
+ {t('studio.sizeLabel')} +
+ numVal(widthInp.nodeId, e.currentTarget.value)} + /> + × + numVal(heightInp.nodeId, e.currentTarget.value)} + /> +
+
+ {/if} + {#if batchInp} + + {/if} +
+ {/if} + {#if stepsInp || cfgInp} +
+ {#if stepsInp} + + {/if} + {#if cfgInp} + + {/if} +
+ {/if} + {:else} + {#if durationInp || fpsInp} +
+ {#if durationInp} + + {/if} + {#if fpsInp} + + {/if} +
+ {/if} + {/if} + + {#if restInputs.length} +
+
{t('studio.paramsTitle')}
+ {#each restInputs as inp (inp.nodeId)} + + {/each} +
+ {/if} + +
+ {t('studio.etaHint')} + +
+ {/if} +
+ + +
+ {#if !kindWorkflows.length} +
+

{t('studio.wfEmptyTitle', { kind: kind === 'image' ? t('studio.kindImageText') : t('studio.kindVideoText') })}

+

{t('studio.wfEmptyBody', { kind: kind === 'image' ? t('studio.kindImageText') : t('studio.kindVideoText') })}

+

+ {kind === 'image' ? t('studio.missingQwen') : t('studio.missingFirstLast')} +

+ +
+ {:else} +
+
+ + {kind === 'image' ? t('studio.kindImageText') : t('studio.kindVideoText')} + + {activeJob ? wfName(activeJob) : t('studio.noActiveTask')} + {#if activeJob && (activeJob.status === 'pending' || activeJob.status === 'running')} + + {/if} +
+ {#if activeJob} +
+ {#if activeJob.status === 'pending'} +
—
+
+ {t('studio.taskQueued')} · + {t('studio.queuedBehind', { n: kindJobs.filter((j) => j.status === 'pending').indexOf(activeJob) })} +
+ {:else} +
{Math.round(progress)}%
+
+
+
+
+ {#if kind === 'video' && frameTotal} + {t('studio.renderFrames', { + done: Math.round((progress / 100) * frameTotal), + total: frameTotal, + })} · + {:else if stepsInp && values[stepsInp.nodeId]} + {t('studio.stepsShort', { v: values[stepsInp.nodeId] })} · + {/if} + {t('studio.usedShort', { v: elapsedOf(activeJob) })} + {#if etaSec != null} · {t('studio.etaShort', { v: fmtDur(etaSec) })}{/if} + · {t('studio.targetShort', { name: endpointName })} +
+ {/if} +
+ {/if} +
+ + {#if kind === 'image'} +
+
+

{t('studio.resultsTitle')}

+ {#if doneEntries.length}{doneEntries.length}{/if} +
+ {#if doneEntries.length} +
+ {#each doneEntries as entry (entry.key)} + + {/each} +
+ {#if selectedEntry} +
+ {summaryOf(selectedEntry.job)} + + + + + + {t('studio.download')} + + +
+ {/if} + {:else} +

+ {kind === 'image' ? t('studio.historyEmptyImage') : t('studio.historyEmptyVideo')} +

+ {/if} +
+ {:else} +
+
+

{t('studio.resultsTitle')}

+
+ {#if selectedEntry} +
+ + {#if !playing} + + {/if} + {#if durSec} + {fmtClock(durSec)} + {/if} +
+ +
+
+
+ {fmtClock(curSec)} / {fmtClock(durSec)} + +
+
+ {#if selectedFrames.length} +
+ {t('studio.videoRefStrip')} + {#each selectedFrames as fr (fr.path)} +
+ {fr.label} + {fr.label} +
+ {/each} +
+ {/if} +
+ {summaryOf(selectedEntry.job)} + + + + + + {t('studio.downloadMp4')} + + +
+ {:else} +

{t('studio.historyEmptyVideo')}

+ {/if} +
+ {/if} + {/if} +
+ + + +
+ + assetUrl(e.path) ?? '')} + index={Math.max(0, doneEntries.findIndex((e) => e.key === selectedEntry?.key))} + onClose={() => (lightboxOpen = false)} +/> + + (pickerFor = null)}> + {#if imageResults.length} +
+ {#each imageResults as entry (entry.path)} + + {/each} +
+ {:else} +

{t('studio.pickerEmpty')}

+ {/if} +
+ + { + deleteJobId = null; + deleteOpen = false; + }} +/> + + diff --git a/calliope-web/src/lib/dbtime.ts b/calliope-web/src/lib/dbtime.ts new file mode 100644 index 00000000..0949d29c --- /dev/null +++ b/calliope-web/src/lib/dbtime.ts @@ -0,0 +1,12 @@ +/** + * Backend timestamps are SQLite UTC-naive strings ("2026-09-28 01:44:28"). + * `Date.parse` treats those as LOCAL time, shifting every elapsed/duration + * computation by the local UTC offset. Parse them as UTC instead; strings + * that already carry a timezone marker pass through unchanged. + */ +export function parseDbTs(raw: string | null | undefined): number { + if (!raw) return NaN; + const s = raw.trim(); + if (/[zZ]$|[+-]\d{2}:?\d{2}$/.test(s)) return Date.parse(s); + return Date.parse(s.endsWith('Z') ? s : `${s.replace(' ', 'T')}Z`); +} diff --git a/calliope-web/src/lib/i18n/de.ts b/calliope-web/src/lib/i18n/de.ts index e12553a6..e2a399b1 100644 --- a/calliope-web/src/lib/i18n/de.ts +++ b/calliope-web/src/lib/i18n/de.ts @@ -1365,4 +1365,129 @@ export const de: Dict = { 'conn.wfDeleted': 'Workflow gelöscht', 'conn.missingMaterial': 'Ein dediziertes Qwen Image 2.1-Workflow-JSON fehlt noch im Repo: aus ComfyUI exportieren und hier importieren — der generische Importweg steht bereit.', + // --- Eigenständige Bild-/Videogenerierung (a3/a4, HEL-612) --- + 'studio.image.title': 'Bild', + 'studio.image.subtitle': 'Bilder mit importierten Workflows erzeugen · Verbindungen & Warteschlange gemeinsam mit ComfyUI-Verbindungen', + 'studio.video.title': 'Video', + 'studio.video.subtitle': 'Videos mit importierten Workflows erzeugen · Verbindungen & Warteschlange gemeinsam mit ComfyUI-Verbindungen', + 'studio.kindImageText': 'Bild', + 'studio.kindVideoText': 'Video', + 'studio.loading': 'Lädt…', + 'studio.connLabel': 'Verbindung', + 'studio.connQueue': 'Warteschlange {n}', + 'studio.connUntested': 'Ungetestet', + 'studio.connOk': 'Letzter Test OK · {ms} ms', + 'studio.connFail': 'Letzter Test fehlgeschlagen', + 'studio.connManage': 'Verbindungen verwalten', + 'studio.wfLabel': 'Workflow', + 'studio.wfParams': '{n} ausfüllbare Parameter', + 'studio.wfBindTo': 'Gebunden an {name}', + 'studio.wfFollowActive': 'Folgt der Standardverbindung', + 'studio.promptLabel': 'Positiver Prompt', + 'studio.promptPh': 'Bild beschreiben: Motiv, Umgebung, Licht, Stil…', + 'studio.negLabel': 'Negativer Prompt', + 'studio.seedLabel': 'Seed', + 'studio.sizeLabel': 'Größe', + 'studio.batchLabel': 'Stapel', + 'studio.durationLabel': 'Dauer (s)', + 'studio.fpsLabel': 'Bildrate', + 'studio.stepsLabel': 'Schritte', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': 'Workflow-Parameter', + 'studio.chars': '{n} Zeichen', + 'studio.insertStyle': 'Stilwörter einfügen', + 'studio.styleSoon': 'Die Skill-Bibliothek kommt mit dem Agenten-Feature', + 'studio.generateN': 'Generieren · {n} Bilder', + 'studio.generate': 'Generieren', + 'studio.submitting': 'Übermitteln…', + 'studio.etaHint': 'Die tatsächliche Zeit hängt von Zielverbindung und Workflow ab', + 'studio.errNoConn': 'Zuerst eine Generierungsverbindung wählen', + 'studio.errConnDown': 'Diese Verbindung ist nicht verfügbar (letzter Test fehlgeschlagen um {time}); wechseln oder unter ComfyUI-Verbindungen reparieren', + 'studio.errPrompt': 'Bitte den Prompt ausfüllen', + 'studio.errPromptLong': 'Prompt überschreitet 2000 Zeichen — bitte kürzen', + 'studio.errRefImage': 'Bild-zu-Bild braucht ein Referenzbild', + 'studio.errFirstLast': 'Erster/letzter Frame braucht beide Frames', + 'studio.errUpload': 'Bitte {label} hochladen', + 'studio.errFill': 'Bitte {label} ausfüllen', + 'studio.slotRef': 'Referenzbild', + 'studio.slotRefN': 'Referenz {n}', + 'studio.slotMask': 'Maske', + 'studio.slotFirst': 'Erster Frame', + 'studio.slotLast': 'Letzter Frame', + 'studio.slotRefVideo': 'Referenzvideo', + 'studio.slotAudio': 'Referenzaudio', + 'studio.slotPick': 'Klicken oder Datei ziehen', + 'studio.slotFromResults': 'Aus Bildergebnissen wählen', + 'studio.taskCurrent': 'Aktuelle Aufgabe', + 'studio.taskQueued': 'In Warteschlange', + 'studio.taskRunning': 'Generiert', + 'studio.taskCancel': 'Aufgabe abbrechen', + 'studio.queuedBehind': '{n} Aufgabe(n) davor', + 'studio.stepsShort': 'Schritte {v}', + 'studio.usedShort': 'Verstrichen {v}', + 'studio.etaShort': 'Restzeit {v}', + 'studio.targetShort': 'Ziel {name}', + 'studio.renderFrames': 'Frame {done}/{total}', + 'studio.noActiveTask': 'Keine aktive Aufgabe · links Parameter setzen und Generieren drücken', + 'studio.resultsTitle': 'Neueste Ergebnisse', + 'studio.selectHint': 'Ausgewählt', + 'studio.sendToImg2Img': 'Zu img2img senden', + 'studio.zoom': 'Vergrößern', + 'studio.download': 'Herunterladen', + 'studio.downloadMp4': 'MP4 herunterladen', + 'studio.copyPrompt': 'Prompt kopieren', + 'studio.copiedToast': 'Kopiert — in Bild-/Videogenerierung einfügen', + 'studio.sentToImg2ImgToast': 'Als Referenzbild eingetragen — Parameter prüfen und generieren', + 'studio.noImg2ImgWf': 'Noch kein Bild-Workflow mit Referenzbild-Eingabe — zuerst einen img2img-Workflow in ComfyUI-Verbindungen importieren', + 'studio.videoRefStrip': 'Referenz erster / letzter Frame', + 'studio.historyTitle': 'Verlauf', + 'studio.historyEmptyImage': 'Noch keine Bildgenerierungen — links Parameter setzen und Generieren drücken', + 'studio.historyEmptyVideo': 'Noch keine Videogenerierungen — links Parameter setzen und Generieren drücken', + 'studio.jobName': 'Aufgabe #{id}', + 'studio.retryLink': 'Erneut versuchen', + 'studio.retryQueuedToast': 'Aufgabe wieder eingereiht', + 'studio.retryFailedToast': 'Erneut Einreihen fehlgeschlagen: {detail}', + 'studio.cancelToast': 'Abbruch angefordert', + 'studio.deleteBtn': 'Löschen', + 'studio.delTitle': 'Aufgabeneintrag löschen', + 'studio.delConfirm': 'Die Ergebnisdateien werden mitgelöscht. Löschen?', + 'studio.wfEmptyTitle': 'Noch keine {kind}-Workflows', + 'studio.wfEmptyBody': 'Entwicklermodus in ComfyUI aktivieren, Workflow als API-JSON exportieren und auf der Seite ComfyUI-Verbindungen als {kind} importieren.', + 'studio.wfEmptyGo': 'In ComfyUI-Verbindungen importieren', + 'studio.missingQwen': 'Dedizierte Qwen-Image-2.1-JSONs (t2i / img2img / Maske) fehlen noch — der generische Importweg steht bereit; aus ComfyUI exportieren und importieren.', + 'studio.missingFirstLast': 'Das dedizierte MiniMax-H3-JSON für ersten/letzten Frame fehlt noch — die mitgelieferten t2v-/r2v-Beispiele können inzwischen importiert werden.', + 'studio.pickerTitle': 'Bildergebnis wählen', + 'studio.pickerEmpty': 'Noch keine Bildergebnisse verfügbar', + 'studio.pickerPick': 'Verwenden', + 'studio.uploadFailedToast': 'Upload fehlgeschlagen: {detail}', + 'studio.playAria': 'Wiedergabe', + 'studio.pauseAria': 'Pause', + 'studio.fullscreenAria': 'Vollbild', + + // --- Generierungsaufgaben-Seite (HEL-612) --- + 'tasks.title': 'Generierungsaufgaben', + 'tasks.subtitle': 'Alle Bild-/Videoaufgaben — eigenständige Fenster und Kreativfluss', + 'tasks.filterAll': 'Alle', + 'tasks.filterImage': 'Bilder', + 'tasks.filterVideo': 'Videos', + 'tasks.count': '{n} Aufgaben · {m} aktiv', + 'tasks.empty': 'Noch keine Aufgaben. Reiche die erste in Bild oder Video ein.', + 'tasks.goGenerate': 'Bild öffnen', + 'tasks.sourceStudioImage': 'Eigenständiges Bild', + 'tasks.sourceStudioVideo': 'Eigenständiges Video', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': 'Kreativfluss', + 'tasks.sourceOther': 'Generierung', + 'tasks.queued': 'Warteschlange', + 'tasks.running': 'Läuft', + 'tasks.done': 'Fertig', + 'tasks.failed': 'Fehlgeschlagen', + 'tasks.retry': 'Erneut', + 'tasks.cancel': 'Abbrechen', + 'tasks.delete': 'Löschen', + 'tasks.delTitle': 'Aufgabe löschen', + 'tasks.delConfirm': 'Die Ergebnisdateien werden mitgelöscht. Löschen?', + 'tasks.outputs': '{n} Ergebnisse', + + }; diff --git a/calliope-web/src/lib/i18n/en.ts b/calliope-web/src/lib/i18n/en.ts index be62c4d9..b1d1f78e 100644 --- a/calliope-web/src/lib/i18n/en.ts +++ b/calliope-web/src/lib/i18n/en.ts @@ -1364,6 +1364,131 @@ export const en = { 'conn.wfJsonPh': 'Paste the ComfyUI API-format JSON here, or pick a file', 'conn.wfDeleted': 'Workflow deleted', 'conn.missingMaterial': 'A dedicated Qwen Image 2.1 workflow JSON is not in the repo yet: export it from ComfyUI and import it here — the generic import path is ready.', + // --- Standalone image / video generation (a3/a4, HEL-612) --- + 'studio.image.title': 'Image', + 'studio.image.subtitle': 'Generate images with imported workflows · shares connections & queue with ComfyUI Connections', + 'studio.video.title': 'Video', + 'studio.video.subtitle': 'Generate videos with imported workflows · shares connections & queue with ComfyUI Connections', + 'studio.kindImageText': 'image', + 'studio.kindVideoText': 'video', + 'studio.loading': 'Loading…', + 'studio.connLabel': 'Connection', + 'studio.connQueue': 'Queue {n}', + 'studio.connUntested': 'Untested', + 'studio.connOk': 'Last test passed · {ms} ms', + 'studio.connFail': 'Last test failed', + 'studio.connManage': 'Manage connections', + 'studio.wfLabel': 'Workflow', + 'studio.wfParams': '{n} fillable params', + 'studio.wfBindTo': 'Bound to {name}', + 'studio.wfFollowActive': 'Follows the default connection', + 'studio.promptLabel': 'Positive prompt', + 'studio.promptPh': 'Describe the shot: subject, setting, light, style…', + 'studio.negLabel': 'Negative prompt', + 'studio.seedLabel': 'Seed', + 'studio.sizeLabel': 'Size', + 'studio.batchLabel': 'Batch', + 'studio.durationLabel': 'Duration (s)', + 'studio.fpsLabel': 'Frame rate', + 'studio.stepsLabel': 'Steps', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': 'Workflow params', + 'studio.chars': '{n} chars', + 'studio.insertStyle': 'Insert style words', + 'studio.styleSoon': 'Skill word library arrives with the Agents feature', + 'studio.generateN': 'Generate · {n} images', + 'studio.generate': 'Generate', + 'studio.submitting': 'Submitting…', + 'studio.etaHint': 'Actual time depends on the target connection and workflow', + 'studio.errNoConn': 'Select a generation connection first', + 'studio.errConnDown': "This connection is unavailable (last test failed at {time}) — switch to another or fix it in ComfyUI Connections", + 'studio.errPrompt': 'Please fill in the prompt', + 'studio.errPromptLong': 'Prompt exceeds 2000 characters — please trim it', + 'studio.errRefImage': 'Image-to-image needs a reference image', + 'studio.errFirstLast': 'First/last-frame video needs both the first and the last frame', + 'studio.errUpload': 'Please upload {label}', + 'studio.errFill': 'Please fill in {label}', + 'studio.slotRef': 'Reference image', + 'studio.slotRefN': 'Reference {n}', + 'studio.slotMask': 'Mask', + 'studio.slotFirst': 'First frame', + 'studio.slotLast': 'Last frame', + 'studio.slotRefVideo': 'Reference video', + 'studio.slotAudio': 'Reference audio', + 'studio.slotPick': 'Click or drop a file', + 'studio.slotFromResults': 'Pick from image results', + 'studio.taskCurrent': 'Current task', + 'studio.taskQueued': 'Queued', + 'studio.taskRunning': 'Generating', + 'studio.taskCancel': 'Cancel task', + 'studio.queuedBehind': '{n} task(s) ahead', + 'studio.stepsShort': 'Steps {v}', + 'studio.usedShort': 'Elapsed {v}', + 'studio.etaShort': 'ETA {v}', + 'studio.targetShort': 'Target {name}', + 'studio.renderFrames': 'Frame {done}/{total}', + 'studio.noActiveTask': 'No active task · set the parameters on the left and press Generate', + 'studio.resultsTitle': 'Recent results', + 'studio.selectHint': 'Selected', + 'studio.sendToImg2Img': 'Send to img2img', + 'studio.zoom': 'Zoom', + 'studio.download': 'Download', + 'studio.downloadMp4': 'Download MP4', + 'studio.copyPrompt': 'Copy prompt', + 'studio.copiedToast': 'Copied — paste it into image/video generation', + 'studio.sentToImg2ImgToast': 'Filled in as the reference image — check the params and generate', + 'studio.noImg2ImgWf': 'No image workflow declares a reference-image input yet — import an img2img workflow in ComfyUI Connections first', + 'studio.videoRefStrip': 'First / last frame reference', + 'studio.historyTitle': 'History', + 'studio.historyEmptyImage': 'No image generations yet — set the parameters on the left and press Generate', + 'studio.historyEmptyVideo': 'No video generations yet — set the parameters on the left and press Generate', + 'studio.jobName': 'Task #{id}', + 'studio.retryLink': 'Retry', + 'studio.retryQueuedToast': 'Task re-queued', + 'studio.retryFailedToast': 'Re-queue failed: {detail}', + 'studio.cancelToast': 'Cancel requested', + 'studio.deleteBtn': 'Delete', + 'studio.delTitle': 'Delete task record', + 'studio.delConfirm': 'The result files will be removed together with the record. Delete it?', + 'studio.wfEmptyTitle': 'No {kind} workflows yet', + 'studio.wfEmptyBody': "Enable ComfyUI's developer mode, export the workflow as API JSON, then import it on the ComfyUI Connections page as {kind}.", + 'studio.wfEmptyGo': 'Import in ComfyUI Connections', + 'studio.missingQwen': 'Dedicated Qwen Image 2.1 (t2i / img2img / mask) JSONs are still missing — the generic import path is ready; export from ComfyUI and import.', + 'studio.missingFirstLast': 'The dedicated MiniMax H3 first/last-frame JSON is still missing — the bundled t2v / reference-to-video examples can be imported meanwhile.', + 'studio.pickerTitle': 'Pick an image result', + 'studio.pickerEmpty': 'No image results available yet', + 'studio.pickerPick': 'Use', + 'studio.uploadFailedToast': 'Upload failed: {detail}', + 'studio.playAria': 'Play', + 'studio.pauseAria': 'Pause', + 'studio.fullscreenAria': 'Fullscreen', + + // --- Generation tasks page (HEL-612) --- + 'tasks.title': 'Generation tasks', + 'tasks.subtitle': 'All image / video tasks — standalone windows and the creation flow', + 'tasks.filterAll': 'All', + 'tasks.filterImage': 'Images', + 'tasks.filterVideo': 'Videos', + 'tasks.count': '{n} tasks · {m} active', + 'tasks.empty': 'No generation tasks yet. Submit the first one in Image or Video.', + 'tasks.goGenerate': 'Open Image', + 'tasks.sourceStudioImage': 'Standalone image', + 'tasks.sourceStudioVideo': 'Standalone video', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': 'Creation flow', + 'tasks.sourceOther': 'Generation', + 'tasks.queued': 'Queued', + 'tasks.running': 'Running', + 'tasks.done': 'Done', + 'tasks.failed': 'Failed', + 'tasks.retry': 'Retry', + 'tasks.cancel': 'Cancel', + 'tasks.delete': 'Delete', + 'tasks.delTitle': 'Delete task', + 'tasks.delConfirm': 'The result files will be removed together with the task. Delete it?', + 'tasks.outputs': '{n} outputs', + + }; export type Dict = typeof en; diff --git a/calliope-web/src/lib/i18n/es.ts b/calliope-web/src/lib/i18n/es.ts index fb59356a..72441a91 100644 --- a/calliope-web/src/lib/i18n/es.ts +++ b/calliope-web/src/lib/i18n/es.ts @@ -1365,4 +1365,129 @@ export const es: Dict = { 'conn.wfDeleted': 'Flujo eliminado', 'conn.missingMaterial': 'Aún falta en el repo un JSON dedicado de Qwen Image 2.1: expórtalo desde ComfyUI e impórtalo aquí; la vía genérica ya está lista.', + // --- Generación independiente de imagen / vídeo (a3/a4, HEL-612) --- + 'studio.image.title': 'Imagen', + 'studio.image.subtitle': 'Genera imágenes con flujos importados · conexiones y cola compartidas con Conexiones ComfyUI', + 'studio.video.title': 'Vídeo', + 'studio.video.subtitle': 'Genera vídeos con flujos importados · conexiones y cola compartidas con Conexiones ComfyUI', + 'studio.kindImageText': 'imagen', + 'studio.kindVideoText': 'vídeo', + 'studio.loading': 'Cargando…', + 'studio.connLabel': 'Conexión', + 'studio.connQueue': 'Cola {n}', + 'studio.connUntested': 'Sin probar', + 'studio.connOk': 'Última prueba OK · {ms} ms', + 'studio.connFail': 'Última prueba fallida', + 'studio.connManage': 'Gestionar conexiones', + 'studio.wfLabel': 'Flujo', + 'studio.wfParams': '{n} parámetros rellenables', + 'studio.wfBindTo': 'Vinculado a {name}', + 'studio.wfFollowActive': 'Sigue la conexión por defecto', + 'studio.promptLabel': 'Prompt positivo', + 'studio.promptPh': 'Describe la imagen: sujeto, entorno, luz, estilo…', + 'studio.negLabel': 'Prompt negativo', + 'studio.seedLabel': 'Semilla', + 'studio.sizeLabel': 'Tamaño', + 'studio.batchLabel': 'Lote', + 'studio.durationLabel': 'Duración (s)', + 'studio.fpsLabel': 'Fotogramas/s', + 'studio.stepsLabel': 'Pasos', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': 'Parámetros del flujo', + 'studio.chars': '{n} car.', + 'studio.insertStyle': 'Insertar palabras de estilo', + 'studio.styleSoon': 'La biblioteca de Skills llegará con la función Agentes', + 'studio.generateN': 'Generar · {n} imágenes', + 'studio.generate': 'Generar', + 'studio.submitting': 'Enviando…', + 'studio.etaHint': 'El tiempo real depende de la conexión y del flujo', + 'studio.errNoConn': 'Selecciona primero una conexión de generación', + 'studio.errConnDown': 'Esta conexión no está disponible (última prueba fallida a las {time}); cambia de conexión o arréglala en Conexiones ComfyUI', + 'studio.errPrompt': 'Rellena el prompt', + 'studio.errPromptLong': 'El prompt supera los 2000 caracteres; recórtalo', + 'studio.errRefImage': 'Imagen-a-imagen necesita una imagen de referencia', + 'studio.errFirstLast': 'El vídeo primer/último fotograma necesita ambos fotogramas', + 'studio.errUpload': 'Sube {label}', + 'studio.errFill': 'Rellena {label}', + 'studio.slotRef': 'Imagen de referencia', + 'studio.slotRefN': 'Referencia {n}', + 'studio.slotMask': 'Máscara', + 'studio.slotFirst': 'Primer fotograma', + 'studio.slotLast': 'Último fotograma', + 'studio.slotRefVideo': 'Vídeo de referencia', + 'studio.slotAudio': 'Audio de referencia', + 'studio.slotPick': 'Haz clic o arrastra', + 'studio.slotFromResults': 'Elegir de resultados de imagen', + 'studio.taskCurrent': 'Tarea actual', + 'studio.taskQueued': 'En cola', + 'studio.taskRunning': 'Generando', + 'studio.taskCancel': 'Cancelar tarea', + 'studio.queuedBehind': '{n} tarea(s) por delante', + 'studio.stepsShort': 'Pasos {v}', + 'studio.usedShort': 'Transcurrido {v}', + 'studio.etaShort': 'Restante {v}', + 'studio.targetShort': 'Destino {name}', + 'studio.renderFrames': 'Fotograma {done}/{total}', + 'studio.noActiveTask': 'Sin tarea activa · ajusta los parámetros y pulsa Generar', + 'studio.resultsTitle': 'Resultados recientes', + 'studio.selectHint': 'Elegida', + 'studio.sendToImg2Img': 'Enviar a img2img', + 'studio.zoom': 'Ampliar', + 'studio.download': 'Descargar', + 'studio.downloadMp4': 'Descargar MP4', + 'studio.copyPrompt': 'Copiar prompt', + 'studio.copiedToast': 'Copiado; pégalo en generación de imagen/vídeo', + 'studio.sentToImg2ImgToast': 'Añadido como referencia; revisa los parámetros y genera', + 'studio.noImg2ImgWf': 'Ningún flujo de imagen declara una entrada de referencia todavía; importa antes un flujo img2img en Conexiones ComfyUI', + 'studio.videoRefStrip': 'Referencia primer / último fotograma', + 'studio.historyTitle': 'Historial', + 'studio.historyEmptyImage': 'Aún no hay generaciones de imagen; ajusta los parámetros y pulsa Generar', + 'studio.historyEmptyVideo': 'Aún no hay generaciones de vídeo; ajusta los parámetros y pulsa Generar', + 'studio.jobName': 'Tarea #{id}', + 'studio.retryLink': 'Reintentar', + 'studio.retryQueuedToast': 'Tarea vuelta a la cola', + 'studio.retryFailedToast': 'Error al reencolar: {detail}', + 'studio.cancelToast': 'Cancelación solicitada', + 'studio.deleteBtn': 'Eliminar', + 'studio.delTitle': 'Eliminar registro de tarea', + 'studio.delConfirm': 'Los archivos de resultados se eliminarán junto con el registro. ¿Eliminar?', + 'studio.wfEmptyTitle': 'Aún no hay flujos de {kind}', + 'studio.wfEmptyBody': 'Activa el modo desarrollador de ComfyUI, exporta el flujo como JSON API e impórtalo en Conexiones ComfyUI como {kind}.', + 'studio.wfEmptyGo': 'Importar en Conexiones ComfyUI', + 'studio.missingQwen': 'Faltan los JSON dedicados de Qwen Image 2.1 (t2i / img2img / máscara): la vía de importación genérica está lista; expórtalos desde ComfyUI.', + 'studio.missingFirstLast': 'Falta el JSON dedicado de MiniMax H3 primer/último fotograma; los ejemplos incluidos de t2v / r2v pueden usarse mientras tanto.', + 'studio.pickerTitle': 'Elige un resultado de imagen', + 'studio.pickerEmpty': 'Aún no hay resultados de imagen', + 'studio.pickerPick': 'Usar', + 'studio.uploadFailedToast': 'Subida fallida: {detail}', + 'studio.playAria': 'Reproducir', + 'studio.pauseAria': 'Pausar', + 'studio.fullscreenAria': 'Pantalla completa', + + // --- Página de tareas de generación (HEL-612) --- + 'tasks.title': 'Tareas de generación', + 'tasks.subtitle': 'Todas las tareas de imagen / vídeo: ventanas independientes y flujo de creación', + 'tasks.filterAll': 'Todas', + 'tasks.filterImage': 'Imágenes', + 'tasks.filterVideo': 'Vídeos', + 'tasks.count': '{n} tareas · {m} activas', + 'tasks.empty': 'Aún no hay tareas. Envía la primera en Imagen o Vídeo.', + 'tasks.goGenerate': 'Abrir Imagen', + 'tasks.sourceStudioImage': 'Imagen independiente', + 'tasks.sourceStudioVideo': 'Vídeo independiente', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': 'Flujo de creación', + 'tasks.sourceOther': 'Generación', + 'tasks.queued': 'En cola', + 'tasks.running': 'Ejecutando', + 'tasks.done': 'Hecho', + 'tasks.failed': 'Fallido', + 'tasks.retry': 'Reintentar', + 'tasks.cancel': 'Cancelar', + 'tasks.delete': 'Eliminar', + 'tasks.delTitle': 'Eliminar tarea', + 'tasks.delConfirm': 'Los archivos de resultados se eliminarán junto con la tarea. ¿Eliminar?', + 'tasks.outputs': '{n} resultados', + + }; diff --git a/calliope-web/src/lib/i18n/fr.ts b/calliope-web/src/lib/i18n/fr.ts index 0a7f72d5..cbdbbe83 100644 --- a/calliope-web/src/lib/i18n/fr.ts +++ b/calliope-web/src/lib/i18n/fr.ts @@ -1365,4 +1365,129 @@ export const fr: Dict = { 'conn.wfDeleted': 'Workflow supprimé', 'conn.missingMaterial': 'Un JSON de workflow Qwen Image 2.1 dédié manque encore au dépôt : exportez-le depuis ComfyUI et importez-le ici — le chemin d\'import générique est prêt.', + // --- Génération indépendante image / vidéo (a3/a4, HEL-612) --- + 'studio.image.title': 'Image', + 'studio.image.subtitle': 'Générez des images avec les workflows importés · connexions et file partagées avec Connexions ComfyUI', + 'studio.video.title': 'Vidéo', + 'studio.video.subtitle': 'Générez des vidéos avec les workflows importés · connexions et file partagées avec Connexions ComfyUI', + 'studio.kindImageText': 'image', + 'studio.kindVideoText': 'vidéo', + 'studio.loading': 'Chargement…', + 'studio.connLabel': 'Connexion', + 'studio.connQueue': 'File {n}', + 'studio.connUntested': 'Non testée', + 'studio.connOk': 'Dernier test OK · {ms} ms', + 'studio.connFail': 'Dernier test échoué', + 'studio.connManage': 'Gérer les connexions', + 'studio.wfLabel': 'Workflow', + 'studio.wfParams': '{n} paramètres remplissables', + 'studio.wfBindTo': 'Lié à {name}', + 'studio.wfFollowActive': 'Suit la connexion par défaut', + 'studio.promptLabel': 'Prompt positif', + 'studio.promptPh': 'Décrivez l’image : sujet, décor, lumière, style…', + 'studio.negLabel': 'Prompt négatif', + 'studio.seedLabel': 'Graine', + 'studio.sizeLabel': 'Dimensions', + 'studio.batchLabel': 'Lot', + 'studio.durationLabel': 'Durée (s)', + 'studio.fpsLabel': 'Images/s', + 'studio.stepsLabel': 'Étapes', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': 'Paramètres du workflow', + 'studio.chars': '{n} car.', + 'studio.insertStyle': 'Insérer des mots de style', + 'studio.styleSoon': 'La bibliothèque de Skills arrivera avec la fonction Agents', + 'studio.generateN': 'Générer · {n} images', + 'studio.generate': 'Générer', + 'studio.submitting': 'Envoi…', + 'studio.etaHint': 'Le temps réel dépend de la connexion et du workflow', + 'studio.errNoConn': 'Sélectionnez d’abord une connexion de génération', + 'studio.errConnDown': 'Cette connexion est indisponible (dernier test échoué à {time}) ; changez de connexion ou corrigez-la dans Connexions ComfyUI', + 'studio.errPrompt': 'Remplissez le prompt', + 'studio.errPromptLong': 'Le prompt dépasse 2000 caractères ; raccourcissez-le', + 'studio.errRefImage': 'Image-vers-image nécessite une image de référence', + 'studio.errFirstLast': 'La vidéo premier/dernier cadre exige les deux cadres', + 'studio.errUpload': 'Téléversez {label}', + 'studio.errFill': 'Remplissez {label}', + 'studio.slotRef': 'Image de référence', + 'studio.slotRefN': 'Référence {n}', + 'studio.slotMask': 'Masque', + 'studio.slotFirst': 'Premier cadre', + 'studio.slotLast': 'Dernier cadre', + 'studio.slotRefVideo': 'Vidéo de référence', + 'studio.slotAudio': 'Audio de référence', + 'studio.slotPick': 'Cliquez ou déposez', + 'studio.slotFromResults': 'Choisir parmi les résultats d’image', + 'studio.taskCurrent': 'Tâche en cours', + 'studio.taskQueued': 'En file', + 'studio.taskRunning': 'Génération', + 'studio.taskCancel': 'Annuler la tâche', + 'studio.queuedBehind': '{n} tâche(s) devant', + 'studio.stepsShort': 'Étapes {v}', + 'studio.usedShort': 'Écoulé {v}', + 'studio.etaShort': 'Restant {v}', + 'studio.targetShort': 'Cible {name}', + 'studio.renderFrames': 'Frame {done}/{total}', + 'studio.noActiveTask': 'Aucune tâche active · réglez les paramètres puis lancez Générer', + 'studio.resultsTitle': 'Résultats récents', + 'studio.selectHint': 'Choisie', + 'studio.sendToImg2Img': 'Envoyer vers img2img', + 'studio.zoom': 'Agrandir', + 'studio.download': 'Télécharger', + 'studio.downloadMp4': 'Télécharger MP4', + 'studio.copyPrompt': 'Copier le prompt', + 'studio.copiedToast': 'Copié ; collez-le dans la génération image/vidéo', + 'studio.sentToImg2ImgToast': 'Ajouté comme référence ; vérifiez les paramètres et lancez', + 'studio.noImg2ImgWf': 'Aucun workflow image ne déclare d’entrée de référence ; importez d’abord un workflow img2img dans Connexions ComfyUI', + 'studio.videoRefStrip': 'Référence premier / dernier cadre', + 'studio.historyTitle': 'Historique', + 'studio.historyEmptyImage': 'Aucune génération d’image ; réglez les paramètres puis lancez Générer', + 'studio.historyEmptyVideo': 'Aucune génération de vidéo ; réglez les paramètres puis lancez Générer', + 'studio.jobName': 'Tâche #{id}', + 'studio.retryLink': 'Réessayer', + 'studio.retryQueuedToast': 'Tâche remise en file', + 'studio.retryFailedToast': 'Échec de la remise en file : {detail}', + 'studio.cancelToast': 'Annulation demandée', + 'studio.deleteBtn': 'Supprimer', + 'studio.delTitle': 'Supprimer la tâche', + 'studio.delConfirm': 'Les fichiers de résultats seront supprimés avec la tâche. Supprimer ?', + 'studio.wfEmptyTitle': 'Pas encore de workflows {kind}', + 'studio.wfEmptyBody': 'Activez le mode développeur de ComfyUI, exportez le workflow en JSON API, puis importez-le dans Connexions ComfyUI comme {kind}.', + 'studio.wfEmptyGo': 'Importer dans Connexions ComfyUI', + 'studio.missingQwen': 'Les JSON dédiés Qwen Image 2.1 (t2i / img2img / masque) manquent encore ; la voie d’import générique est prête — exportez-les depuis ComfyUI.', + 'studio.missingFirstLast': 'Le JSON dédié MiniMax H3 premier/dernier cadre manque encore ; les exemples t2v / r2v fournis peuvent être importés en attendant.', + 'studio.pickerTitle': 'Choisir un résultat d’image', + 'studio.pickerEmpty': 'Aucun résultat d’image disponible', + 'studio.pickerPick': 'Utiliser', + 'studio.uploadFailedToast': 'Échec du téléversement : {detail}', + 'studio.playAria': 'Lecture', + 'studio.pauseAria': 'Pause', + 'studio.fullscreenAria': 'Plein écran', + + // --- Page des tâches de génération (HEL-612) --- + 'tasks.title': 'Tâches de génération', + 'tasks.subtitle': 'Toutes les tâches image / vidéo : fenêtres indépendantes et flux de création', + 'tasks.filterAll': 'Toutes', + 'tasks.filterImage': 'Images', + 'tasks.filterVideo': 'Vidéos', + 'tasks.count': '{n} tâches · {m} actives', + 'tasks.empty': 'Aucune tâche. Lancez la première dans Image ou Vidéo.', + 'tasks.goGenerate': 'Ouvrir Image', + 'tasks.sourceStudioImage': 'Image indépendante', + 'tasks.sourceStudioVideo': 'Vidéo indépendante', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': 'Flux de création', + 'tasks.sourceOther': 'Génération', + 'tasks.queued': 'En file', + 'tasks.running': 'En cours', + 'tasks.done': 'Terminé', + 'tasks.failed': 'Échec', + 'tasks.retry': 'Réessayer', + 'tasks.cancel': 'Annuler', + 'tasks.delete': 'Supprimer', + 'tasks.delTitle': 'Supprimer la tâche', + 'tasks.delConfirm': 'Les fichiers de résultats seront supprimés avec la tâche. Supprimer ?', + 'tasks.outputs': '{n} résultats', + + }; diff --git a/calliope-web/src/lib/i18n/ja.ts b/calliope-web/src/lib/i18n/ja.ts index 72be6159..3f2220ea 100644 --- a/calliope-web/src/lib/i18n/ja.ts +++ b/calliope-web/src/lib/i18n/ja.ts @@ -1365,4 +1365,129 @@ export const ja: Dict = { 'conn.wfDeleted': 'ワークフローを削除しました', 'conn.missingMaterial': 'Qwen Image 2.1 専用のワークフロー JSON はまだリポジトリにありません。ComfyUI から書き出してここで取り込んでください。汎用の取り込み経路は用意済みです。', + // --- 独立画像/動画生成(a3/a4、HEL-612)--- + 'studio.image.title': '画像生成', + 'studio.image.subtitle': '取り込んだ画像ワークフローで生成 · 接続とキューは「ComfyUI 接続」と共通', + 'studio.video.title': '動画生成', + 'studio.video.subtitle': '取り込んだ動画ワークフローで生成 · 接続とキューは「ComfyUI 接続」と共通', + 'studio.kindImageText': '画像', + 'studio.kindVideoText': '動画', + 'studio.loading': '読み込み中…', + 'studio.connLabel': '生成接続', + 'studio.connQueue': 'キュー {n}', + 'studio.connUntested': '未テスト', + 'studio.connOk': '前回テスト成功 · {ms} ms', + 'studio.connFail': '前回テスト失敗', + 'studio.connManage': '接続を管理', + 'studio.wfLabel': 'ワークフロー', + 'studio.wfParams': '入力可能パラメータ {n} 件', + 'studio.wfBindTo': '{name} にバインド済み', + 'studio.wfFollowActive': 'デフォルト接続に従う', + 'studio.promptLabel': 'ポジティブプロンプト', + 'studio.promptPh': '被写体・環境・光・スタイルを記述…', + 'studio.negLabel': 'ネガティブプロンプト', + 'studio.seedLabel': 'シード', + 'studio.sizeLabel': 'サイズ', + 'studio.batchLabel': 'バッチ', + 'studio.durationLabel': '長さ(秒)', + 'studio.fpsLabel': 'フレームレート', + 'studio.stepsLabel': 'ステップ', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': 'ワークフローパラメータ', + 'studio.chars': '{n} 字', + 'studio.insertStyle': 'スタイル語を挿入', + 'studio.styleSoon': 'スキル語彙は「エージェント」機能とともに提供予定', + 'studio.generateN': '生成開始 · {n} 枚', + 'studio.generate': '生成開始', + 'studio.submitting': '送信中…', + 'studio.etaHint': '実際の所要時間は接続とワークフロー次第', + 'studio.errNoConn': '生成接続を先に選んでください', + 'studio.errConnDown': 'この接続は利用できません(前回 {time} にテスト失敗)。切り替えるか「ComfyUI 接続」で修復してください', + 'studio.errPrompt': 'プロンプトを入力してください', + 'studio.errPromptLong': 'プロンプトが 2000 字を超えています。短くしてください', + 'studio.errRefImage': 'img2img には参照画像が必要です', + 'studio.errFirstLast': '始端/終端フレーム生成には両方のフレームが必要です', + 'studio.errUpload': '{label} をアップロードしてください', + 'studio.errFill': '{label} を入力してください', + 'studio.slotRef': '参照画像', + 'studio.slotRefN': '参照 {n}', + 'studio.slotMask': 'マスク', + 'studio.slotFirst': '始端フレーム', + 'studio.slotLast': '終端フレーム', + 'studio.slotRefVideo': '参照動画', + 'studio.slotAudio': '参照音声', + 'studio.slotPick': 'クリックまたはドロップ', + 'studio.slotFromResults': '画像結果から選ぶ', + 'studio.taskCurrent': '現在のタスク', + 'studio.taskQueued': '待機中', + 'studio.taskRunning': '生成中', + 'studio.taskCancel': 'タスクをキャンセル', + 'studio.queuedBehind': '前に {n} 件', + 'studio.stepsShort': 'ステップ {v}', + 'studio.usedShort': '経過 {v}', + 'studio.etaShort': '残り {v}', + 'studio.targetShort': '接続先 {name}', + 'studio.renderFrames': 'フレーム {done}/{total}', + 'studio.noActiveTask': '実行中のタスクはありません · 左でパラメータを設定して生成開始', + 'studio.resultsTitle': '最近の結果', + 'studio.selectHint': '選択中', + 'studio.sendToImg2Img': 'img2img へ送る', + 'studio.zoom': '拡大', + 'studio.download': 'ダウンロード', + 'studio.downloadMp4': 'MP4 をダウンロード', + 'studio.copyPrompt': 'プロンプトをコピー', + 'studio.copiedToast': 'コピーしました。画像/動画生成に貼り付けできます', + 'studio.sentToImg2ImgToast': '参照画像として設定しました。パラメータを確認して生成してください', + 'studio.noImg2ImgWf': '参照画像入力を持つ画像ワークフローがまだありません。先に「ComfyUI 接続」で img2img を取り込んでください', + 'studio.videoRefStrip': '始端 / 終端フレーム参照', + 'studio.historyTitle': '履歴', + 'studio.historyEmptyImage': '画像生成の記録がありません。左でパラメータを設定して生成開始', + 'studio.historyEmptyVideo': '動画生成の記録がありません。左でパラメータを設定して生成開始', + 'studio.jobName': 'タスク #{id}', + 'studio.retryLink': '再試行', + 'studio.retryQueuedToast': 'タスクを再びキューに入れました', + 'studio.retryFailedToast': '再キュー失敗:{detail}', + 'studio.cancelToast': 'キャンセルを要求しました', + 'studio.deleteBtn': '削除', + 'studio.delTitle': 'タスク記録を削除', + 'studio.delConfirm': '結果ファイルも一緒に削除され、履歴は復元できません。削除しますか?', + 'studio.wfEmptyTitle': '{kind}ワークフローがまだありません', + 'studio.wfEmptyBody': 'ComfyUI の開発者モードで API 形式 JSON を書き出し、「ComfyUI 接続」ページで{kind}として取り込んでください。', + 'studio.wfEmptyGo': '「ComfyUI 接続」で取り込む', + 'studio.missingQwen': 'Qwen Image 2.1(t2i / img2img / マスク)専用 JSON はまだありません。汎用取り込みは利用可能なので、ComfyUI から書き出して取り込んでください。', + 'studio.missingFirstLast': 'MiniMax H3 始端/終端フレーム専用 JSON はまだありません。同梱の t2v / 参照動画サンプルを先用できます。', + 'studio.pickerTitle': '画像結果を選ぶ', + 'studio.pickerEmpty': '利用できる画像結果がまだありません', + 'studio.pickerPick': '使用する', + 'studio.uploadFailedToast': 'アップロード失敗:{detail}', + 'studio.playAria': '再生', + 'studio.pauseAria': '一時停止', + 'studio.fullscreenAria': '全画面', + + // --- 生成タスクページ(HEL-612)--- + 'tasks.title': '生成タスク', + 'tasks.subtitle': '独立画像・独立動画・創作フロー内の画像/動画タスクをまとめて表示', + 'tasks.filterAll': 'すべて', + 'tasks.filterImage': '画像', + 'tasks.filterVideo': '動画', + 'tasks.count': '{n} 件 · 実行中 {m} 件', + 'tasks.empty': '生成タスクがまだありません。「画像生成」「動画生成」から最初のタスクを送信してください。', + 'tasks.goGenerate': '画像生成を開く', + 'tasks.sourceStudioImage': '独立画像', + 'tasks.sourceStudioVideo': '独立動画', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': '創作フロー', + 'tasks.sourceOther': '生成', + 'tasks.queued': '待機', + 'tasks.running': '実行中', + 'tasks.done': '完了', + 'tasks.failed': '失敗', + 'tasks.retry': '再試行', + 'tasks.cancel': 'キャンセル', + 'tasks.delete': '削除', + 'tasks.delTitle': 'タスクを削除', + 'tasks.delConfirm': '結果ファイルも一緒に削除されます。削除しますか?', + 'tasks.outputs': '結果 {n} 件', + + }; diff --git a/calliope-web/src/lib/i18n/ko.ts b/calliope-web/src/lib/i18n/ko.ts index c7b948ce..ed5999c4 100644 --- a/calliope-web/src/lib/i18n/ko.ts +++ b/calliope-web/src/lib/i18n/ko.ts @@ -1365,4 +1365,129 @@ export const ko: Dict = { 'conn.wfDeleted': '워크플로가 삭제되었습니다', 'conn.missingMaterial': 'Qwen Image 2.1 전용 워크플로 JSON이 아직 저장소에 없습니다. ComfyUI에서 내보내 여기서 가져오세요. 범용 가져오기 경로는 준비되어 있습니다.', + // --- 독립 이미지/비디오 생성 (a3/a4, HEL-612) --- + 'studio.image.title': '이미지 생성', + 'studio.image.subtitle': '가져온 이미지 워크플로로 생성 · 연결과 큐는 ComfyUI 연결과 공유', + 'studio.video.title': '비디오 생성', + 'studio.video.subtitle': '가져온 비디오 워크플로로 생성 · 연결과 큐는 ComfyUI 연결과 공유', + 'studio.kindImageText': '이미지', + 'studio.kindVideoText': '비디오', + 'studio.loading': '불러오는 중…', + 'studio.connLabel': '생성 연결', + 'studio.connQueue': '대기열 {n}', + 'studio.connUntested': '미테스트', + 'studio.connOk': '마지막 테스트 통과 · {ms} ms', + 'studio.connFail': '마지막 테스트 실패', + 'studio.connManage': '연결 관리', + 'studio.wfLabel': '워크플로', + 'studio.wfParams': '채울 수 있는 매개변수 {n}개', + 'studio.wfBindTo': '{name}에 바인딩됨', + 'studio.wfFollowActive': '기본 연결을 따름', + 'studio.promptLabel': '긍정 프롬프트', + 'studio.promptPh': '피사체·환경·빛·스타일을 묘사…', + 'studio.negLabel': '부정 프롬프트', + 'studio.seedLabel': '시드', + 'studio.sizeLabel': '크기', + 'studio.batchLabel': '배치', + 'studio.durationLabel': '길이(초)', + 'studio.fpsLabel': '프레임 레이트', + 'studio.stepsLabel': '스텝', + 'studio.cfgLabel': 'CFG', + 'studio.paramsTitle': '워크플로 매개변수', + 'studio.chars': '{n}자', + 'studio.insertStyle': '스타일 단어 삽입', + 'studio.styleSoon': 'Skill 단어장은 에이전트 기능과 함께 제공됩니다', + 'studio.generateN': '생성 시작 · {n}장', + 'studio.generate': '생성 시작', + 'studio.submitting': '제출 중…', + 'studio.etaHint': '실제 소요 시간은 대상 연결과 워크플로에 따라 다릅니다', + 'studio.errNoConn': '먼저 생성 연결을 선택하세요', + 'studio.errConnDown': '이 연결을 사용할 수 없습니다(마지막 테스트 {time} 실패). 다른 연결로 바꾸거나 ComfyUI 연결에서 수정하세요', + 'studio.errPrompt': '프롬프트를 입력하세요', + 'studio.errPromptLong': '프롬프트가 2000자를 넘습니다. 줄여 주세요', + 'studio.errRefImage': 'img2img에는 참조 이미지가 필요합니다', + 'studio.errFirstLast': '첫/마지막 프레임 생성에는 두 프레임이 모두 필요합니다', + 'studio.errUpload': '{label}을(를) 업로드하세요', + 'studio.errFill': '{label}을(를) 입력하세요', + 'studio.slotRef': '참조 이미지', + 'studio.slotRefN': '참조 {n}', + 'studio.slotMask': '마스크', + 'studio.slotFirst': '첫 프레임', + 'studio.slotLast': '마지막 프레임', + 'studio.slotRefVideo': '참조 비디오', + 'studio.slotAudio': '참조 오디오', + 'studio.slotPick': '클릭하거나 끌어다 놓기', + 'studio.slotFromResults': '이미지 결과에서 선택', + 'studio.taskCurrent': '현재 작업', + 'studio.taskQueued': '대기 중', + 'studio.taskRunning': '생성 중', + 'studio.taskCancel': '작업 취소', + 'studio.queuedBehind': '앞에 {n}건', + 'studio.stepsShort': '스텝 {v}', + 'studio.usedShort': '경과 {v}', + 'studio.etaShort': '남음 {v}', + 'studio.targetShort': '대상 {name}', + 'studio.renderFrames': '프레임 {done}/{total}', + 'studio.noActiveTask': '진행 중인 작업 없음 · 왼쪽에서 매개변수를 설정하고 생성 시작', + 'studio.resultsTitle': '최근 결과', + 'studio.selectHint': '선택됨', + 'studio.sendToImg2Img': 'img2img로 보내기', + 'studio.zoom': '확대', + 'studio.download': '다운로드', + 'studio.downloadMp4': 'MP4 다운로드', + 'studio.copyPrompt': '프롬프트 복사', + 'studio.copiedToast': '복사됨 — 이미지/비디오 생성에 붙여넣으세요', + 'studio.sentToImg2ImgToast': '참조 이미지로 채웠습니다 — 매개변수를 확인하고 생성하세요', + 'studio.noImg2ImgWf': '참조 이미지 입력을 선언한 이미지 워크플로가 아직 없습니다. 먼저 ComfyUI 연결에서 img2img 워크플로를 가져오세요', + 'studio.videoRefStrip': '첫 / 마지막 프레임 참조', + 'studio.historyTitle': '기록', + 'studio.historyEmptyImage': '이미지 생성 기록이 없습니다. 왼쪽에서 매개변수를 설정하고 생성 시작', + 'studio.historyEmptyVideo': '비디오 생성 기록이 없습니다. 왼쪽에서 매개변수를 설정하고 생성 시작', + 'studio.jobName': '작업 #{id}', + 'studio.retryLink': '재시도', + 'studio.retryQueuedToast': '작업이 다시 대기열에 들어갔습니다', + 'studio.retryFailedToast': '재대기열 실패: {detail}', + 'studio.cancelToast': '취소를 요청했습니다', + 'studio.deleteBtn': '삭제', + 'studio.delTitle': '작업 기록 삭제', + 'studio.delConfirm': '결과 파일도 함께 삭제되며 기록은 복구할 수 없습니다. 삭제할까요?', + 'studio.wfEmptyTitle': '{kind} 워크플로가 아직 없습니다', + 'studio.wfEmptyBody': 'ComfyUI 개발자 모드를 켜고 API 형식 JSON으로 내보낸 뒤, ComfyUI 연결 페이지에서 {kind}(으)로 가져오세요.', + 'studio.wfEmptyGo': 'ComfyUI 연결에서 가져오기', + 'studio.missingQwen': 'Qwen Image 2.1(t2i / img2img / 마스크) 전용 JSON이 아직 없습니다. 범용 가져오기 경로는 준비되어 있으니 ComfyUI에서 내보내 가져오세요.', + 'studio.missingFirstLast': 'MiniMax H3 첫/마지막 프레임 전용 JSON이 아직 없습니다. 함께 제공되는 t2v / 참조 비디오 예제를 먼저 사용할 수 있습니다.', + 'studio.pickerTitle': '이미지 결과 선택', + 'studio.pickerEmpty': '사용할 수 있는 이미지 결과가 아직 없습니다', + 'studio.pickerPick': '사용', + 'studio.uploadFailedToast': '업로드 실패: {detail}', + 'studio.playAria': '재생', + 'studio.pauseAria': '일시정지', + 'studio.fullscreenAria': '전체 화면', + + // --- 생성 작업 페이지 (HEL-612) --- + 'tasks.title': '생성 작업', + 'tasks.subtitle': '독립 이미지·독립 비디오·창작 흐름의 이미지/비디오 작업 모아 보기', + 'tasks.filterAll': '전체', + 'tasks.filterImage': '이미지', + 'tasks.filterVideo': '비디오', + 'tasks.count': '{n}건 · 진행 중 {m}건', + 'tasks.empty': '생성 작업이 아직 없습니다. 이미지/비디오 생성에서 첫 작업을 제출하세요.', + 'tasks.goGenerate': '이미지 생성 열기', + 'tasks.sourceStudioImage': '독립 이미지', + 'tasks.sourceStudioVideo': '독립 비디오', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': '창작 흐름', + 'tasks.sourceOther': '생성', + 'tasks.queued': '대기', + 'tasks.running': '진행 중', + 'tasks.done': '완료', + 'tasks.failed': '실패', + 'tasks.retry': '재시도', + 'tasks.cancel': '취소', + 'tasks.delete': '삭제', + 'tasks.delTitle': '작업 삭제', + 'tasks.delConfirm': '결과 파일도 함께 삭제됩니다. 삭제할까요?', + 'tasks.outputs': '결과 {n}개', + + }; diff --git a/calliope-web/src/lib/i18n/zh.ts b/calliope-web/src/lib/i18n/zh.ts index a1349743..9d695f27 100644 --- a/calliope-web/src/lib/i18n/zh.ts +++ b/calliope-web/src/lib/i18n/zh.ts @@ -1364,4 +1364,129 @@ export const zh: Dict = { 'conn.wfJsonPh': '在此粘贴 ComfyUI 导出的 API 格式 JSON,或点右侧按钮选择文件', 'conn.wfDeleted': '工作流已删除', 'conn.missingMaterial': 'Qwen Image 2.1 的专用工作流 JSON 仓库中暂缺:请从 ComfyUI 导出后在此导入,通用导入通道已就绪。', + // --- 独立生图 / 生视频(a3/a4,HEL-612)--- + 'studio.image.title': '生图', + 'studio.image.subtitle': '用已导入的图片工作流生成图片 · 连接与队列和「ComfyUI 连接」共用', + 'studio.video.title': '生视频', + 'studio.video.subtitle': '用已导入的视频工作流生成视频 · 连接与队列和「ComfyUI 连接」共用', + 'studio.kindImageText': '图片', + 'studio.kindVideoText': '视频', + 'studio.loading': '正在加载…', + 'studio.connLabel': '生成连接', + 'studio.connQueue': '队列 {n}', + 'studio.connUntested': '未测试', + 'studio.connOk': '上次测试通过 · {ms} ms', + 'studio.connFail': '上次测试失败', + 'studio.connManage': '管理连接', + 'studio.wfLabel': '工作流', + 'studio.wfParams': '{n} 个可填参数', + 'studio.wfBindTo': '已绑定 {name}', + 'studio.wfFollowActive': '跟随默认连接', + 'studio.promptLabel': '正向提示词', + 'studio.promptPh': '描述画面:主体、环境、光线、风格…', + 'studio.negLabel': '负面提示词', + 'studio.seedLabel': '种子', + 'studio.sizeLabel': '尺寸', + 'studio.batchLabel': '批次', + 'studio.durationLabel': '时长(秒)', + 'studio.fpsLabel': '帧率', + 'studio.stepsLabel': '步数', + 'studio.cfgLabel': '引导 CFG', + 'studio.paramsTitle': '工作流参数', + 'studio.chars': '{n} 字', + 'studio.insertStyle': '插入风格词', + 'studio.styleSoon': 'Skill 词库将随「智能体」功能开放后接入', + 'studio.generateN': '开始生成 · {n} 张', + 'studio.generate': '开始生成', + 'studio.submitting': '提交中…', + 'studio.etaHint': '实际耗时以目标连接与工作流为准', + 'studio.errNoConn': '请先选择生成连接', + 'studio.errConnDown': '该连接当前不可用(最后测试 {time} 失败),请更换或到「ComfyUI 连接」修复', + 'studio.errPrompt': '请填写提示词', + 'studio.errPromptLong': '提示词超出 2000 字,请精简', + 'studio.errRefImage': '图生图需要上传参考图', + 'studio.errFirstLast': '首尾帧生视频需要同时上传首帧和尾帧', + 'studio.errUpload': '请上传{label}', + 'studio.errFill': '请填写{label}', + 'studio.slotRef': '参考图', + 'studio.slotRefN': '参考图 {n}', + 'studio.slotMask': '遮罩', + 'studio.slotFirst': '首帧', + 'studio.slotLast': '尾帧', + 'studio.slotRefVideo': '参考视频', + 'studio.slotAudio': '参考音频', + 'studio.slotPick': '点击或拖入', + 'studio.slotFromResults': '从生图结果选择', + 'studio.taskCurrent': '当前任务', + 'studio.taskQueued': '排队中', + 'studio.taskRunning': '生成中', + 'studio.taskCancel': '取消任务', + 'studio.queuedBehind': '前面还有 {n} 个任务', + 'studio.stepsShort': '步数 {v}', + 'studio.usedShort': '已用 {v}', + 'studio.etaShort': '预计剩余 {v}', + 'studio.targetShort': '目标 {name}', + 'studio.renderFrames': '渲染帧 {done}/{total}', + 'studio.noActiveTask': '没有进行中的任务 · 填好左侧参数点「开始生成」', + 'studio.resultsTitle': '最近结果', + 'studio.selectHint': '已选', + 'studio.sendToImg2Img': '发送到图生图', + 'studio.zoom': '放大', + 'studio.download': '下载', + 'studio.downloadMp4': '下载 MP4', + 'studio.copyPrompt': '复制提示词', + 'studio.copiedToast': '已复制,可直接粘贴到生图/生视频', + 'studio.sentToImg2ImgToast': '已填入为参考图,请检查参数后生成', + 'studio.noImg2ImgWf': '还没有声明参考图输入的图片工作流,请先在「ComfyUI 连接」导入图生图工作流', + 'studio.videoRefStrip': '首帧 / 尾帧参考', + 'studio.historyTitle': '历史', + 'studio.historyEmptyImage': '还没有生图记录,从左边填好参数点「开始生成」', + 'studio.historyEmptyVideo': '还没有生视频记录,从左边填好参数点「开始生成」', + 'studio.jobName': '任务 #{id}', + 'studio.retryLink': '重试', + 'studio.retryQueuedToast': '任务已重新排队', + 'studio.retryFailedToast': '重新排队失败:{detail}', + 'studio.cancelToast': '已发送取消请求', + 'studio.deleteBtn': '删除', + 'studio.delTitle': '删除任务记录', + 'studio.delConfirm': '删除后该任务的结果文件会一并移除,历史不可恢复。确定删除?', + 'studio.wfEmptyTitle': '还没有{kind}工作流', + 'studio.wfEmptyBody': '在 ComfyUI 里启用开发者模式,用「导出(API 格式)」得到 JSON,再到「ComfyUI 连接」页导入并分类为{kind}。', + 'studio.wfEmptyGo': '去「ComfyUI 连接」导入', + 'studio.missingQwen': 'Qwen Image 2.1 文生图 / 图生图 / 遮罩专用 JSON 暂缺:通用导入通道已就绪,请从 ComfyUI 导出后导入。', + 'studio.missingFirstLast': 'MiniMax H3 首尾帧生视频专用 JSON 暂缺:仓库自带文生视频 / 参考生视频示例,可先导入使用。', + 'studio.pickerTitle': '选择生图结果', + 'studio.pickerEmpty': '还没有可用的生图结果', + 'studio.pickerPick': '选用', + 'studio.uploadFailedToast': '上传失败:{detail}', + 'studio.playAria': '播放', + 'studio.pauseAria': '暂停', + 'studio.fullscreenAria': '全屏', + + // --- 生成任务页(HEL-612)--- + 'tasks.title': '生成任务', + 'tasks.subtitle': '汇总独立生图、独立生视频与创作流程内的图片 / 视频任务', + 'tasks.filterAll': '全部', + 'tasks.filterImage': '图片', + 'tasks.filterVideo': '视频', + 'tasks.count': '{n} 个任务 · {m} 个进行中', + 'tasks.empty': '还没有生成任务。到「生图」「生视频」提交第一个任务。', + 'tasks.goGenerate': '去生图', + 'tasks.sourceStudioImage': '独立生图', + 'tasks.sourceStudioVideo': '独立生视频', + 'tasks.sourcePlayground': 'Playground', + 'tasks.sourceFlow': '创作流程', + 'tasks.sourceOther': '生成任务', + 'tasks.queued': '排队', + 'tasks.running': '生成中', + 'tasks.done': '完成', + 'tasks.failed': '失败', + 'tasks.retry': '重试', + 'tasks.cancel': '取消', + 'tasks.delete': '删除', + 'tasks.delTitle': '删除任务', + 'tasks.delConfirm': '删除后该任务的结果文件会一并移除。确定删除?', + 'tasks.outputs': '{n} 个结果', + + }; diff --git a/calliope-web/src/routes/image/+page.svelte b/calliope-web/src/routes/image/+page.svelte new file mode 100644 index 00000000..e0af4c2a --- /dev/null +++ b/calliope-web/src/routes/image/+page.svelte @@ -0,0 +1,9 @@ + + + + + diff --git a/calliope-web/src/routes/tasks/+page.svelte b/calliope-web/src/routes/tasks/+page.svelte new file mode 100644 index 00000000..270ed325 --- /dev/null +++ b/calliope-web/src/routes/tasks/+page.svelte @@ -0,0 +1,516 @@ + + + + {#snippet actions()} + {t('tasks.count', { n: genJobs.length, m: activeCount })} + {/snippet} + +
+
+ {#each [['all', t('tasks.filterAll')], ['image', t('tasks.filterImage')], ['video', t('tasks.filterVideo')]] as [value, label] (value)} + + {/each} +
+ + {#if !shown.length} +
+ +

{t('tasks.empty')}

+ {t('tasks.goGenerate')} +
+ {:else} +
+ {#each shown as job (job.id)} + {@const st = stInfo(job)} +
+ + + +
+ {#if job.output_paths?.[0]} + {#if job.kind === 'image'} + {wfName(job)} + {:else} + + {/if} + {/if} +
+
+
{wfName(job)}
+
+ {sourceLabel(job)} · {timeOf(job)} + {#if (job.output_paths?.length ?? 0) > 0} + · {t('tasks.outputs', { n: job.output_paths.length })} + {/if} +
+ {#if job.status === 'failed' && job.error} +
{job.error}
+ {/if} +
+
+ {#if job.output_paths?.length} +
+ {#each job.output_paths.slice(0, 3) as p (p)} + + {#if job.kind === 'image'} + + {:else} + + {/if} + + {/each} +
+ {/if} +
+ {st.label} + + {#if job.status === 'failed'} + + {/if} + {#if job.status === 'pending' || job.status === 'running'} + + {/if} + {#if job.payload?.source === 'studio-image' || job.payload?.source === 'studio-video' || job.payload?.source === 'playground'} + + {/if} + +
+ {/each} +
+ {/if} +
+
+ + { + deleteJobId = null; + deleteOpen = false; + }} +/> + + diff --git a/calliope-web/src/routes/video/+page.svelte b/calliope-web/src/routes/video/+page.svelte new file mode 100644 index 00000000..e9cfeade --- /dev/null +++ b/calliope-web/src/routes/video/+page.svelte @@ -0,0 +1,9 @@ + + + + +