Live Stream CPU Only Image Generation by FlaskArchitect

AEpochStreamer: PIL AI Director 🚀 Welcome to **EpochStreamer**, a high-performance, Flask-powered "AI Director" designed to orchestrate long-form, frame-by-frame AI video generation. This tool bridges the gap between raw AI generation (via ComfyUI) and cinematic post-processing (via PIL and MoviePy), giving you granular control over the evolution of your digital universe. 🌟 Core Features 1. The Feedback-Loop Render Engine EpochStreamer doesn't just generate images; it cultivates them. By feeding the output of one frame back into the input of the next (using a configurable Denoise value), it creates a coherent, flowing animation that evolves based on your prompts. 2. Teleportation (One-Time Image Injection) 🌌 This is your "Scene Jump" tool. If you have a specific image (like a planet or a new character) that you want to introduce into the stream, the *Teleport* feature allows you to upload it directly. The engine will use that image as the exact starting point for the next frame, effectively "teleporting" the animation to a new location or state without losing continuity. 3. Cinematic Motion Zoom & Pan 🎥 Standard AI video can feel static. EpochStreamer applies a dynamic *Motion Zoom* algorithm that: *Zooms:* Progresses from a `Start Zoom` to an `End Zoom` across the duration of the run. *Pans:* Drifts the camera across the X and Y axes to create a sense of scale and exploration. *Resamples:* Uses high-quality Lanczos resampling to ensure clarity even during deep zooms. 4. Metadata Captioning (The Director's HUD) 🛠️ For the meticulous creator, the *Metadata Caption* feature overlays a "Heads-Up Display" (HUD) on your frames. It burns the following data directly into the corner of each image: *Frame Index:* Tracks exactly where you are in the production. *Generation Parameters:* Seed, Steps, CFG, and the actual Denoise value used. *Motion Data:* The precise Zoom level and Pan coordinates for that specific moment. 5. Organic Space Overlays 🛸 The engine features a built-in *Spaceship Movement* function. It calculates an organic, sinusoidal "drift" for a spaceship asset, moving it right-to-left across your scene with subtle scaling to simulate depth and life in your space-scapes. 6. Keyframe Editor 🎹 Don't settle for one prompt. The *Keyframe Editor* allows you to schedule changes at specific frames: Swap prompts mid-stream. Adjust Denoise values to make the transition smoother or more chaotic. Shift seeds to introduce new "DNA" into the generation. 🚀 Directions for Use Step 1: Configuration Before you hit start, configure your *Engine Config* in the left sidebar: 1. *Select your Model:* Choose your base checkpoint from your ComfyUI library. 2. *Set the Base Prompt:* This is the "soul" of your video. Use LoRAs and descriptive keywords. 3. *Denoise (The Flow Factor):* *0.30 - 0.45:* Good for smooth, stable transitions. *0.50+:* Allows for more "dream-like" evolution and drastic changes. Step 2: Setting the Scene (Motion) Enable *ENABLE ZOOM* and set your start/end points. Tip: Set Zoom Start to `1.0` and Zoom End to `1.05` for a subtle, cinematic forward push. Enable *SHOW METADATA CAPTION* if you want to record your settings for future reference. Step 3: Production Control *New Production:* Starts from Frame 0. *WARNING:* This will overwrite previous frames in the `static/streamer` folder. *Resume Session:* Picks up exactly where you left off, preserving your progress and state. *Pause / Unpause:* Useful for tweaking settings or the Keyframe Editor while the engine is running. Step 4: Using the Teleport 🪐 To use the *Teleport* feature: 1. Locate the "Teleport (One-Time)" section in the right sidebar. 2. Click "Browse" and select your "Planet" or target image. 3. Click **TELEPORT NOW**. 4. The engine (if running) will finish its current frame, then immediately switch to your uploaded image for the next frame. The animation will then continue evolving from that new image. Step 5: Post-Production (Making the Video) Once your frames are rendered: 1. Click the *MAKE VIDEOS* button to open the Sound Stage. 2. Select your generated images (slideshow mode) or a rendered video. 3. Select an MP3 (you can generate one using the built-in TTS tool). 4. Click *PROCESS* to compile your final movie with synchronized audio. 🛠️ Technical Requirements *ComfyUI:* Must be running at the address specified in `COMFY_URL` (Default: `http://192.168.1.41:5001`). *Python Dependencies:* `Flask`, `Pillow`, `requests`, `numpy`, `moviepy`, `pydub`, `icecream`. *FFmpeg:* Must be installed on your system path to compile videos. 📁 Directory Structure `/static/streamer/`: Where all live frames and rendered videos are stored. `/static/assets/`: overlay assets (spaceship, logos) `streamer.json`: The "Brain" of the app. Stores your current state, keyframes, and settings.