DEV Community

Cover image for I Built a Ghost That Shows You Your Future as a Comic Book (100% on My Laptop, Wi-Fi Off) ๐ŸŽƒ๐Ÿ•ฏ๏ธ
Ankita
Ankita

Posted on AI-assisted

I Built a Ghost That Shows You Your Future as a Comic Book (100% on My Laptop, Wi-Fi Off) ๐ŸŽƒ๐Ÿ•ฏ๏ธ

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission ๐Ÿ‘ป๐ŸŒผ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

On Dรญa de los Muertos, we build an ofrenda for the people we miss. I wondered what it would look like to build one for a future that hasn't happened yet.

What I Built

Ofrenda of Maybe turns a wish into a comic book, entirely on my own laptop.

You whisper a future you hope for ("I have a big garden full of sunflowers and a small cottage in the hills"), and the app gives you:

  • ๐Ÿ“– A 4-panel comic page. Three panels tell your wish as a cheerful cartoon story.
  • ๐Ÿ‘ป A ghost panel. The ghost is you, from that future. It remembers the very first small step that started it all.
  • ๐Ÿ•ฏ๏ธ The ghost's offering: one small, real thing you can do today. My favorite so far: "Buy one sunflower seed today."
  • ๐ŸŽฌ A narrated film of the same story, with four narrator voices (including a ghostly whisper).
  • ๐ŸŽƒ A Halloween UI: cobwebs, a dangling spider, a flickering title, and a ghost that may jump out while you type (you can switch it off in Settings).

I took the theme two ways at once. Halloween is the spooky wrapper (the ghost, the webs, the jump scare). Dรญa de los Muertos is the heart: an offering, a way of remembering, but pointed at the future instead of the past. The "ghost in the machine" here is a friendly one, a future you living inside a model on your own GPU.

Demo

Everything in the video runs on one laptop with the Wi-Fi turned off.

Main page

The comic page

A shot of the video

Code

GitHub logo Ankita562 / ofrenda-of-maybe

Describe a future you hope for. A friendly ghost turns it into a candlelit animated story, entirely on your own laptop with open models.

๐ŸŽƒ Ofrenda of Maybe

Whisper a future you hope for. A friendly ghost from that future turns it into a short cartoon film, entirely on your own laptop.

Built for the Hacktoberfest Open-Source AI Challenge, Week 4: Ghost in the Machine.

How it works

flowchart LR
    subgraph L["๐Ÿ’ป Your laptop (no cloud, works offline)"]
        direction LR
        A["๐Ÿ’ญ Your wish"] --> B["๐Ÿง  Gemma<br/>writes 4 scenes"]
        B --> C["๐ŸŽจ SD-Turbo<br/>draws them"]
        C --> D["๐ŸŽ™๏ธ Piper<br/>narrates"]
        D --> E["๐ŸŽฌ Cartoon film"]
        B --> F["๐Ÿ•ฏ๏ธ The ghost's offering:<br/>one small first step"]
    end
Loading

Scenes 1-3 tell your wish as a cheerful story. Scene 4 is the ghost: your future self, who remembers the first small step that started it all. That step also appears as its own card, so a daydream becomes something you can do today.

Features

  • ๐ŸŽฌ 4-scene cartoon film with captions and slow zoom
  • ๐Ÿ•ฏ๏ธ "The ghost's offering": oneโ€ฆ

How I Built It

 ๐Ÿ’ญ your wish
    โ”‚
    โ–ผ
 ๐Ÿง  Gemma 3 (4B, via Ollama) โ”€โ”€ writes 4 scenes + the "first small step" (JSON)
    โ”‚
    โ–ผ
 ๐ŸŽจ SD-Turbo (diffusers) โ”€โ”€โ”€โ”€โ”€โ”€ draws one cartoon picture per scene
    โ”‚              โ”‚
    โ–ผ              โ–ผ
 ๐ŸŽ™๏ธ Piper TTS     ๐Ÿ“– Pillow โ”€โ”€โ”€ lays out the comic page (captions, speech bubble)
    โ”‚
    โ–ผ
 ๐ŸŽฌ MoviePy โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ narrated film
Enter fullscreen mode Exit fullscreen mode
  • Gemma 3 4B (through Ollama) writes the storyboard. I force a JSON schema, so it always returns exactly the fields I need: scenes, narration, image prompts and the first step.
  • SD-Turbo (๐Ÿค— diffusers) paints each scene. Gemma is unloaded from the GPU before the image model runs, which is how the whole thing fits in 4 GB of VRAM (RTX 3050 Laptop).
  • Piper gives the narration, locally, with a voice picker.
  • Pillow draws the comic page and MoviePy builds the film. Gradio is the UI.

What broke along the way

  1. A version mismatch. AttributeError: module 'torch' has no attribute 'accelerator'. The newest diffusers wanted a newer PyTorch than the CUDA 12.1 build I had installed. Moving to the cu126 build fixed it.
  2. My own prompt leaked. I had written "the bakery, the pastries" as examples in the system prompt. A 4B model copied them, so my famous singer ended up performing in a bakery. Deleting the examples fixed it.
  3. Crowds became blobs. SD-Turbo can't draw an audience, so "cheering crowd" turned into round circles, and my first "ghost" was just a round blob. I now tell Gemma to avoid crowds, faces and hands, and I describe the ghost as "a cartoon ghost made of a white bedsheet".
  4. The ghost had no point. Version one just repeated the story. I changed it into your future self, who remembers the first small step, and gave that step its own card.

Why Does Open Innovation Matter?

  • Your hopes stay yours. People type very personal wishes. With local models they never touch a server.
  • It works with the Wi-Fi off. I filmed the demo that way. No API key, no account.
  • It's free to run, and the pieces are swappable: the storyboard model is one line (LLM = "gemma3:4b"), the art style is a prompt string, and new narrator voices are just downloaded files.
  • Control over memory. On a 4 GB GPU, being able to load and unload models myself is what made this possible at all. A closed API wouldn't let me.

The Spirit of It

My favorite moment came from the sunflower wish. The ghost didn't repeat the story back to me. It said, "I remember when you planted that first seed," and handed me a step I could take that same day: "Buy one sunflower seed today."

That's the idea behind an ofrenda: an offering that keeps something alive. This one just keeps a future alive.

Your turn: what future would you ask the ghost about? Drop a wish in the comments and I'll run it and reply with the ghost's first small step. ๐Ÿ•ฏ๏ธ

Prize Categories

  • ๐Ÿ”ฎ Best Use of Gemma: Gemma 3 4B runs locally through Ollama and writes the storyboard, the narration lines and the first small step as structured JSON.
  • ๐Ÿ”Š Best Use of ElevenLabs: the voice-over in my demo video was generated with ElevenLabs. (The app itself narrates with local Piper.)

Top comments (0)