ai-slop-generator: Local Automated Short-Form Video Pipeline
Active build log for ai-slop-generator—an end-to-end local short-form video creation and publishing pipeline on Pop!_OS Linux (RTX 3060 Ti 8GB) combining Gemini API, Ollama, ComfyUI (Wan 2.2), and C2PA provenance signing.
Stack
Overview
ai-slop-generator is my current main workshop build: a fully local, end-to-end automated short-form video creation and publishing pipeline targeting YouTube Shorts, Instagram Reels, and TikTok. Rather than wiring together expensive hosted video APIs, the whole stack runs directly on my Pop!_OS 24.04 Linux workstation (NVIDIA RTX 3060 Ti with 8 GB VRAM and 32 GB system RAM), forcing real systems engineering around memory budgets, deterministic validation, and unattended reliability.
The pipeline takes a concept from initial storyboard generation all the way through multi-scene video synthesis, audio/subtitle assembly, cryptographic C2PA provenance signing, cloud sync, and mobile push notifications—backed by a suite of 348+ automated tests guarding the storyboard schemas and orchestration logic.
Key Takeaways
- Primary storyboarding runs on Gemini API (gemini-3.5-flash-lite) with a seamless --offline fallback to local Ollama (qwen3:14b), feeding structured scene prompts into ComfyUI (Wan 2.2).
- Fitting modern video diffusion (Wan 2.2) alongside local LLMs inside 8 GB VRAM requires explicit model unloading, --disable-pinned-memory tuning, and VRAM health checks between scenes.
- Validating storyboard schemas, locking punchlines, and enforcing speaker/setting rules in Python before touching the GPU avoids wasting hours rendering unusable clips.
- Signing exports with c2patool C2PA manifests, pushing run alerts through ntfy, and syncing artifacts via Drive/rclone turns unattended batch jobs into an observable, debuggable system.
What I’m Building (Current Status)
At its core, ai-slop-generator treats short-form video generation as a deterministic batch pipeline rather than a manual prompt-and-pray workflow. A Python orchestrator drives every stage from script ideation to final container export on Pop!_OS 24.04 Linux, targeting the vertical aspect ratios, pacing, and packaging needed for YouTube Shorts, Instagram Reels, and TikTok.
For storyboarding and scene direction, the pipeline calls gemini-3.5-flash-lite as its primary model because it balances speed, structured JSON adherence, and low cost. Passing --offline switches the same storyboarding contract cleanly to local Ollama running qwen3:14b, allowing completely air-gapped testing and overnight experimentation without external API calls. Once a storyboard clears validation, each scene prompt is dispatched to a local ComfyUI server running Wan 2.2 for video generation, stitched with audio and captions, cryptographically signed with c2patool C2PA provenance manifests, synced out through Drive/rclone, and reported to my phone via ntfy push telemetry.
| Stage | Tool / Runtime | Role in Pipeline |
|---|---|---|
| Storyboarding & Script | Gemini API (gemini-3.5-flash-lite) / Ollama (qwen3:14b) | Generates structured multi-scene scripts, dialogue, and visual prompts with --offline parity |
| Validation & Guardrails | Python + 348+ Automated Tests | Validates JSON schema, speaker rules, copyright filters, and punchline continuity before GPU work |
| Video Rendering | ComfyUI (Wan 2.2) on RTX 3060 Ti 8GB | Executes local diffusion video synthesis across multi-scene shot lists |
| Provenance & Delivery | c2patool (C2PA), rclone / Drive, ntfy | Embeds cryptographic content credentials, syncs finished shorts, and pushes batch telemetry |
8 GB VRAM Memory Management on an RTX 3060 Ti
Running modern diffusion video models like Wan 2.2 on an 8 GB VRAM RTX 3060 Ti—especially when paired with a local Ollama model in --offline mode—leaves almost zero margin for lazy resource cleanup. Early multi-scene runs would render Scene 1 cleanly and then crash halfway into Scene 2 with CUDA out-of-memory errors because cached weights or pinned host buffers lingered across stages.
Fixing that required treating VRAM like a scarce hardware lock with strict lifecycle orchestration. Before handing off to ComfyUI, the pipeline explicitly evicts any loaded Ollama model from GPU memory. ComfyUI itself runs tuned with --disable-pinned-memory and explicit cache-flush calls between multi-scene jobs, and the Python orchestrator queries free GPU memory between scenes so it fails fast or forces cleanup instead of letting a half-hour batch wedge silently overnight.
- Never leave Ollama resident in VRAM while ComfyUI starts a Wan 2.2 render—always trigger an explicit unload and verify free memory first.
- Passing --disable-pinned-memory to ComfyUI reduces allocation pressure on 8 GB cards paired with 32 GB system RAM during weight offloading.
- Checking free VRAM between Scene 1 and Scene 2 catches subtle memory leaks early instead of producing corrupted partial clips.
1. Generate & validate storyboard JSON (Gemini API or Ollama qwen3:14b with --offline).
2. If local Ollama ran, explicitly unload model (keep_alive: 0) and confirm VRAM release.
3. Verify free VRAM threshold before submitting Scene N workflow to ComfyUI (Wan 2.2).
4. Run ComfyUI with --disable-pinned-memory; free ComfyUI caches between Scene 1 -> Scene 2+.
5. Assemble media, sign C2PA manifest via c2patool, sync via rclone, and push ntfy summary.LLM Guardrails & Narrative Consistency
The fastest way to burn GPU hours is letting unvalidated LLM output straight into a video diffusion queue. Left unconstrained, raw LLM storyboards drift in predictable ways: slipping in copyrighted franchise or character names, inventing visual changes that break continuity between cuts, mismatching which character is speaking against who is on camera for lip movement, or wandering off and dropping the comedic punchline by the final scene.
To catch those failures in milliseconds instead of after twenty minutes of GPU rendering, I built strict Python guardrails backed by 348+ automated tests. Every storyboard must pass structural schema validation, copyright/entity blocklists, punchline-locking checks that ensure the payoff survives into the closing beat, and explicit speaker-to-frame rules before a single ComfyUI prompt is queued. Treating prompt generation like a typed compiler front-end has been the single biggest quality multiplier in the project.
- Enforce strict schema validation on every scene object—missing camera cues, empty dialogue beats, or out-of-range durations reject immediately.
- Lock the core comedic punchline and character manifest at the top level of the storyboard so later scenes cannot silently rewrite or drop the payoff.
- Validate explicit speaker-to-visible-subject rules before rendering so dialogue lines align with the character actually facing the camera.
- Reject copyrighted character names and trademarked IP tokens automatically prior to GPU dispatch.
Cryptographic Provenance & Batch Observability
Automated AI video pipelines can quickly turn into opaque black boxes if you only inspect the final MP4. I treat observability and transparent provenance as first-class pipeline stages rather than afterthoughts. Every exported video passes through c2patool to embed a signed C2PA content-credentials manifest directly in the container so provenance travels with the file.
Alongside the video artifact, each run writes full storyboard inputs, validation outcomes, ComfyUI execution logs, and structured failure telemetry before syncing outputs through Drive/rclone. Pushing compact run summaries and error alerts straight to my phone via ntfy means I know immediately whether an overnight batch produced publishable clips or hit a specific guardrail or VRAM snag.
What’s Next (Roadmap)
Now that the local orchestration, VRAM discipline, C2PA signing, and test suite are solid, the next phase is shifting focus from “does the pipeline finish reliably?” to “does every batch look cohesive enough to post with minimal manual curation?” Three concrete upgrades sit at the top of the queue:
- Custom-Trained Style LoRAs: Moving beyond generic prompt-only styling by curating a dedicated 30-image storyboard dataset and fine-tuning custom LoRA weights specifically trained for consistent visual aesthetic and recognizable character identity across cuts.
- Tighter Cross-Scene Character & Setting Continuity: Locking canonical character descriptors, camera framing rules, and scene transition anchors across multi-shot sequences so characters stop shape-shifting or teleporting between cuts.
- Higher Postability & Hands-Off Batch Reliability: Tightening automated post-render quality gates—subtitle timing checks, audio/lip alignment validation, and scene-reset detection—so a much higher percentage of generated shorts pass straight through to scheduled publishing without manual intervention.