Creative Tools · ICUNI Labs
Vishin
Exploring the execution layer behind local visual-generation workflows.
The build story 9 minute read
Vishin: Give Local Image and Video Generation a Job You Can Follow
At a glance
- Purpose
- Exploring the execution layer behind local visual-generation workflows.
- The build
- A local FastAPI sidecar persists media jobs, checks model eligibility and runs one execution lane. Restart recovery and progress streams describe execution state without presenting queued work as completed output.
In this story
By Menelek Makonnen
Vishin gives creative tools a local execution service for image and short-video generation, with a specific job identity and state to follow while the GPU works. Orchestra supplies the creative plan; Vishin attempts the chosen request through supported upstream model routes.
That is useful when generation belongs inside a larger production. The authoring tool needs more than a spinner: was the request accepted, which model route is running, did it fail and where is the candidate to inspect? I built Vishin to give expensive local inference that operational shape.
The active service uses Wan2. 1 routes for text-to-video and Diffusers adapters for Stable Diffusion v1. 5 and Segmind Vega images.
“Generate” is a tiny button for a request that may occupy a GPU and several billion parameters. Encouragement is lovely, but my hardware has never once accepted a pep talk as a scheduling policy. A recorded job is something the rest of the system can actually use.
Put the creative decision in the request
A creator's plan becomes an explicit request: work type, prompt, seed, quality and supported settings, with metadata and an idempotency key for the caller to track. Bounds on prompt length, guidance, steps, duration and dimensions catch obviously unsuitable inputs before they become an argument deep inside the model call. That keeps planning errors closer to the tool that can explain them.
The active service supports text-to-video through Wan2.1 routes and text-to-image through Diffusers adapters for Stable Diffusion v1.5 and Segmind Vega. The README’s video emphasis is narrower than the current API, while the development screen still submits video. I keep the executor’s capability distinct from what that older screen exposes.
Image-to-video and extension return explicit unsupported responses in the active routes. Prompt enhancement is only whitespace normalization with no added facts. That matters because an executor should not quietly become a second author, embellishing a grounded prompt after the authoring tool has already made its decisions. If the specification is insufficient, the planning side needs to improve it.
Imagine an authoring tool requesting a short abstract background for a synthetic scene. It should submit the chosen description and model settings, receive a stable job identity, and follow that job through its lifecycle. Vishin should not invent a new scene, claim an unavailable operation or borrow confidence from a placeholder method left elsewhere in the code.
Admission is a decision, not a finished artifact
Before accepting new work, Vishin checks whether execution is enabled, CUDA is available and the requested model route is eligible. Video inventory checks the configured model type so an incompatible control checkpoint is not silently treated as a text-to-video checkpoint. The authored VRAM thresholds are eligibility rules, not measured guarantees that every card at the threshold will finish every valid request.
Image availability can include a first-use download requirement. The adapter pins upstream model revisions and records a marker after loading; a matching marker enables local-files-only use. That is useful cache bookkeeping, but it is not an exhaustive audit of every weight file. “Installed” needs a specific definition in a local inference service, especially when a directory and a complete, compatible cache are not necessarily the same thing.
An accepted submission returns a stable UUID and queued state. Reusing an existing idempotency key returns the earlier job before repeating hardware checks. The current key handling is not bound to a request fingerprint: reuse the key with a different prompt and the service still returns the original job. A caller must therefore treat the key as identifying the original request, rather than assuming a changed payload will receive an explicit conflict.
The development UI generates a fresh key for each click. That means separate clicks are separate submissions, not magically deduplicated intent. These details are worth getting right because the GPU cannot infer that the second click was merely someone checking whether the first click had feelings.

One execution lane, two model paths
An asyncio worker takes queued jobs, publishes state and runs the blocking model call in a thread. A heartbeat reports liveness and elapsed time. It should not be mistaken for measured denoising-step progress in the video route. A service can be alive while the expensive operation is still working on the same stage.
For video, the engine lazily loads the Wan graph, selects a fast or quality route and retains its selected pipeline for reuse. It uses CPU placement and model offload as part of the memory strategy. The two routes have fixed output-size choices and compatible frame counts, with caps of 49 or 81 frames at 16 frames per second. A request schema that accepts a longer duration therefore does not mean the adapter delivers that duration: the caps amount to roughly three or five seconds.
There is another meaningful difference between accepted settings and executed settings. The video adapter accepts a negative prompt but does not forward it into the generation call. I do not list that input as an effective video control. The image path does forward its negative prompt, dimensions, steps, guidance and seed into the selected pipeline, using pinned revisions, reduced-precision weights, slicing and CPU offload.
These are integration decisions around existing inference libraries. They can make work addressable and repeatable without proving that a resulting frame is attractive, faithful to the prompt or even useful to the scene. That judgment belongs after generation, where the artifact can answer for itself.
Restart means requeue, not resume a thought
Published transitions write the complete local job ledger through a temporary file and replacement. The record includes the specification, metadata, timestamps, paths and cancellation intent. On startup, valid records rebuild the job collection and idempotency index. Interrupted queued or running work can return to the queue at zero progress.
That is regeneration after restart. It is not resuming a partially denoised tensor from the precise point where the process stopped. A job can preserve its logical identity while the expensive computation starts again. Keeping those two meanings separate helps a caller decide whether a recovered job is still the operation it wanted to pay for in time and resources.
Previously completed records whose output files are missing become failed. Invalid ledger JSON does not trigger an automatic backup restoration; recovery starts from an empty valid set and logs the problem. The current ledger has no fsync, cross-process lock or retention bound in this path, and it is not encrypted. Persistent local state is useful, but I describe the mechanism rather than giving the word “durable” unlimited powers.
Cancellation has a similar distinction. A queued job can be marked canceled before execution. For running work, Vishin records the request and waits for the adapter call to return; it does not interrupt denoising through a cancellation callback. An output may have been written before the job becomes terminal canceled. A successful cancellation response therefore cannot be used as proof that the GPU stopped immediately.
A file exists; now find out what it contains
Successful execution checks for the result path and publishes completion. The image adapter also checks non-zero bytes. Those checks establish presence within their scope. They do not decode a video, verify its duration, measure dimensions, hash the artifact or approve its creative content. The development screen’s “verified output” wording should be read within that narrow check, not as a quality certificate.
Output discovery also has route-specific limits. Image output uses the root-derived directory, while the video adapter writes relative to its process working directory. The documented launch convention aligns them, but a different working directory can produce a video outside the download root. The older gallery lists MP4 files; PNG work is found through job records. These are concrete integration gaps, not reasons to invent a single polished library that the current screen does not provide.
Per-job WebSockets send the current record and later updates. Global pipeline and log streams expose broader activity. A robust caller should stay attached to its own job identity, particularly when more than one authoring client uses the executor. The local launcher uses loopback and a CORS list, but the endpoints do not enforce a per-user approval token. Approval remains a caller responsibility in this implementation.
A development screen has a different job
The React screen shows GPU and backend health, generation controls, a pipeline display and a bottom system monitor. Dark charcoal, cyan and violet give it an appropriately technical mood. The monitor really can be dragged vertically and collapsed, which makes long output easier to inspect without losing the generation controls.
It is still a development interface. Its global stream can replace the displayed active job with another caller’s event; reconnection does not restore a previously selected job from local storage. Some newer backend stages do not align with its older pipeline labels. The backend terminal streams messages, while the frontend-console area and rendered Clear/Copy controls do not provide the same implemented behaviour.
I treat these as specific interface lessons: bind controls to the job the person owns, make recovery visible and let capability readiness describe the exact requested route. A backend with stronger job persistence does not automatically give its older screen the same recovery contract.
What the executor contributes
Building Vishin brought API design, asynchronous scheduling, model eligibility, persistence and GPU lifecycle decisions together around the waiting person. A job identity lets Orchestra follow one request, explain its state and find a candidate without becoming the inference engine itself. That separation makes it easier to improve the creative plan and the execution machinery independently.
The work also made the next engineering priorities unusually clear: bind idempotency to payloads, align output roots, tighten job ownership in the UI and add stronger artifact acceptance beyond file existence. Those improvements have precise targets because the lifecycle is already expressed as records and transitions. I can improve the contract without pretending the present implementation has already passed those future checks.

The existing custom favicon asset is used as the header identity; the development HTML currently still points to the Vite favicon.
Give the waiting a useful shape
Vishin helps a creative system ask for a supported local generation, follow the particular job and find a result to inspect. Its records survive as logical jobs across restart, even when interrupted computation must begin again rather than resume mid-denoising.
The present limits are concrete: payload-bound idempotency, aligned output roots, stronger UI job ownership and artifact checks beyond presence are still work to improve. Those boundaries matter when the resource is expensive and the output needs judgement.
The GPU remains immune to moral support. At least the creator can have a job record instead of a small theological crisis.
Back to the story’s beginning ↑Project details
A local GPU sidecar with persistent media jobs, model eligibility checks, one execution lane, restart recovery and progress streams.
Design and technical decisions
A local FastAPI sidecar persists media jobs, checks model eligibility and runs one execution lane. Restart recovery and progress streams describe execution state without presenting queued work as completed output.
Inside the workflow
A local GPU sidecar with persistent media jobs, model eligibility checks, one execution lane, restart recovery and progress streams.
Have something in mind?
Bring the problem, the audience and what you want to make possible.
Discuss your project