Project briefing illustration for local ai workflow: a flat tactical intelligence sheet in the style of Star Fox Assault.
PROJECT JOURNEY / AI infrastructure

Open WebUI and ComfyUI Video Generation

I connected a GPU-backed chat environment to a ComfyUI video workflow, then used a later repair pass to make image retrieval, input limits and concurrent jobs more explicit.

OllamaOpen WebUIComfyUIPythonSecurityGPU

I set out to connect a complete interaction

I started this project to connect local GPU inference, a browser chat interface, and a ComfyUI media graph. My September 2026 goal was one coherent interaction: attach reference images in chat, request a clip, prepare the graph, queue the work, and return usable media links.

I directed requirements, configured the environment, integrated components, and reported tests. The preserved integration header credits OpenAI as the code author; my contribution was shaping and operating the combined system.

On September 10, I recorded two RTX 3060 12 GB GPUs visible inside an unprivileged container. An Ollama run of qwen3.5:9b used 100 percent GPU placement with an 8,192-token context setting and approximately 6.5 GiB VRAM on one GPU. That observation established a working configuration at that time; I did not treat it as a throughput or quality benchmark.

I established direct inference before testing retrieval

The diagnostic order I use starts below the browser: check the intended device, send a direct model request, and record the model identifier and placement. Connecting the chat interface and starting a fresh ordinary conversation comes after that. It separates driver and inference-service questions from frontend behavior.

That distinction proved useful here. Direct inference and a fresh Open WebUI chat answered on September 11, but adding a knowledge collection produced the Jinja error “No user query found.” I had a working ordinary chat path in that test and an unresolved retrieval path. The interface being up did not establish a complete private-document assistant.

The environment also made me distinguish model files, UI persistence and generated outputs in recovery planning. An account-settings backup would not necessarily preserve the model library or finished media. My recovery plan needs to identify those inventories and what each backup can restore independently.

I gave ComfyUI one process owner

ComfyUI became an enabled system service. Later manual startup attempts failed because another process already held its database and port. I treated that as a process-ownership issue: memory flags could not free an occupied listener. The useful investigation was to inspect the systemd-managed instance before launching another copy and establish one service owner.

For a fresh setup, my acceptance sequence is to use one service manager consistently, inspect startup logs, check the intended listener and queue a small known graph. An active service establishes that a process exists; loading its models and finishing a generation are separate checks.

I reported an H3 workflow working on September 23. Its saved JSON provided a concrete graph with two explicit image inputs, and the Python integration extended it dynamically to as many as nine references. I also confirmed the v3.1 tool working with more than two references. That supports the practical multi-reference result without claiming a nine-reference field test.

I translated ordered attachments into graph inputs

I needed the attachment order to survive every step of the integration. The tool selects explicit image references first; otherwise it uses the most recent user message with recognized image blocks, then supported file records. Picture one needs to remain the first reference after upload.

For each job, the tool deep-copies the workflow template, uploads the prepared images and creates LoadImage nodes numbered from 9000. It connects the returned input names to ref_image_0 through ref_image_8. Copying the template per job prevents one invocation's references from contaminating the next.

The controls set the prompt, aspect ratio, resolution target, duration and seed. The preserved full path uses 20 steps and the turbo path uses four. An identity-preservation option changes the graph's reference-image sizing mode, but its name is not a measured identity-fidelity result or a guarantee about generated people.

The execution path submits to /prompt, polls /history/{prompt_id}, then builds /view links for returned media. I keep preparation, upload, graph validation, execution and retrieval as separate failure stages. A prompt identifier tells me the job was queued; it does not yet tell me a video exists.

I kept media timing and storage checks explicit

The preserved artifacts contain a timing discrepancy I still need to resolve with an output measurement. The saved JSON exports at 30 FPS while its duration expression uses 24 FPS; the embedded Python template uses 24 FPS output. My acceptance check needs the actual file's frame count, rate and duration. Changing a template value alone would not establish a measured fix.

I apply the same discipline to storage. September records describe roughly 179 GB of models across 88 files, a copy-verification confirmation and later startup using the new search path. They do not establish a completed generation after the move. I would retain the old copy until a known workflow succeeds from the new location and make cleanup a separate decision.

THE CHALLENGE

A later review exposed a credential-boundary problem

PROJECT STEPS

From an image reference to a media result

Project briefing illustration for local ai workflow: a flat tactical intelligence sheet in the style of Star Fox Assault.
STEP 01 OF 05
Select references

I preserve reference order between chat and ComfyUI, the media-workflow tool, choosing explicit inputs first and otherwise recognized images from the latest relevant user message or supported file records. I keep picture one as the first workflow reference after upload so the chosen order survives the handoff. I have historical success with more than two references, but that does not establish a real nine-reference test.

Select a step to follow the project.
Read all step descriptions
  1. Select references

    I preserve reference order between chat and ComfyUI, the media-workflow tool, choosing explicit inputs first and otherwise recognized images from the latest relevant user message or supported file records. I keep picture one as the first workflow reference after upload so the chosen order survives the handoff. I have historical success with more than two references, but that does not establish a real nine-reference test.

  2. Prepare bounded images

    In the separately dated October repair, I restrict network image retrieval to a configured trusted origin, the approved scheme, host, and port, and a narrow file-content route, while rejecting redirects. I check each image’s size, declared media type, and identifying file bytes, and allow credentials only across the matching boundary. My tests used simulated network responses; identifying bytes and time limits that depend on operations yielding control do not establish safe image decoding or the health of a live deployment.

  3. Build the graph

    I use a complete independent copy of the ComfyUI workflow for each job and connect its numbered LoadImage steps to the ordered references. The repaired path also uses unique upload-name prefixes and disables overwriting, helping keep one job’s images from entering another and preserve the original template. I checked the workflow structure and coordination, while how faithfully the output preserves reference identity remains a separate, unmeasured question.

  4. Queue and monitor

    I send the prepared workflow to /prompt and follow its returned identifier through /history, separating upload, workflow-validation, execution, and retrieval failures. I treat an identifier as evidence that the job was queued rather than proof that a video exists. I also need one owner for the ComfyUI process, because a running service alone does not show that its models can complete generation.

  5. Retrieve and verify

    I build /view links for the returned media and would use a staging environment to check access, reference order, concurrent jobs, frame count, frame rate, and actual duration. I still need to measure a timing discrepancy in the saved templates. My October tests simulated every HTTP network interaction, so generation after moving model storage remains a separate open checkpoint.

Integration model: validate references and credentials before following the job through generation and media retrieval.

The October 1 review exposed a separate issue in the image downloader: it copied incoming authorization and cookies into image requests without checking the destination's origin. With authenticated request context present, an external image URL could receive credentials intended for the chat service. No exploitation or actual disclosure was demonstrated, but the source behavior gave the repair a concrete target.

I kept the historical source intact and treated the repaired copy as a separately dated result. It requires an explicitly configured trusted origin before network image retrieval is enabled. Relative file paths resolve only against that origin, and absolute URLs must match its scheme, hostname and effective port. The permitted file route is deliberately narrow: /api/v1/files/{id}/content.

The repair rejects redirects, ambiguous paths and unrelated routes. Credentials are attached only after the injected request origin also matches, and cookies are omitted unless specific names are configured. Fresh transport sessions disable environment-derived proxy and authentication behavior while keeping HTTPS verification enabled. I accepted narrower compatibility here because an unknown deployment should not silently expand the trusted destination boundary.

I bounded image inputs and separated concurrent jobs

The repaired image handling defaults to a 10 MiB limit per image. It checks encoded and decoded data sizes, streams network responses, counts bytes and accepts supported MIME types only when signatures agree. That prevents a login page from being accepted merely because its URL resembles an image path.

I keep the limits of those checks explicit. Signatures do not establish safe decoding or prevent decompression bombs, and per-image limits do not cap a whole inbound request. The cooperative 30-second download budget is also not a hard cutoff for every blocking network operation.

The repair addresses orchestration defects as well. Explicit-reference splitting could break paths containing the letter n and split data URLs at their required comma. Each job now gets a unique upload prefix with overwrite disabled so queued jobs do not share fixed filenames. Safe error messages also avoid returning raw backend responses into chat.

What the historical runs and October tests establish

On October 1, 2026, the repaired source passed 218 offline tests under Python 3.12.14. Coverage exercised 369 of 369 executable statements and 186 of 186 branch destinations. Compilation passed, the original source checksum stayed unchanged, and a regression check confirmed exact preservation of the workflow template. I attribute those results to the October repair, not to the original September integration.

Every HTTP interaction in that suite was mocked, with real network activity blocked. The result validates exercised code paths, not a live model installation or an absence of vulnerabilities. My staging acceptance still needs a harmless original image, authorization-denial checks, reference-order verification, concurrent jobs, a completed generation and accessible output with measured media properties. Retrieval repair and generation after the storage move remain separate open checkpoints. The project taught me to explain progress at the same level of precision as the test that supports it.

PROJECT WALKTHROUGH

Historical chat and H3 generation successes are supported. The October repaired copy passed 218 mocked tests; retrieval and live post-move generation remain unverified.

Validation & limitations

  • Historical chat and H3 generation successes are supported. The October repaired copy passed 218 mocked tests; retrieval and live post-move generation remain unverified.

Project records

  • Project artifacts and historical records, September 10–24, 2026; separate repair on October 1, 2026
  • Restoration and public documentation, October 1, 2026
END OF PROJECT FILE RETURN TO ARCHIVE