Skip to content

devils1992/Fancy-Ai1

Repository files navigation

image

⚠️ IMPORTANT SETUP NOTE: Bring your own API keys (OpenRouter, DeepInfra, or Custom OpenAI) in Settings to activate the cloud intelligence layer — or run fully offline by importing a local .gguf model and selecting On-Device LLM (see below). No key required for local mode.

Fancy AI 🚀

The Virtual Intelligence Phone OS & Autonomous Playground

Fancy AI is a sophisticated "Virtual Phone OS" built as a high-throughput client-side ecosystem. It bridges cloud text intelligence, distributed server rendering, and on-device hardware pipelines into an immersive mobile interface that lives and breathes 24/7.


📱 System Applications

  • 💬 Messenger: WhatsApp-style interface with Real-Time Streaming, Vision Mode (AI sees your photos), Voice Input/Output, and Integrated Img2Img (remix any image with a text prompt and denoising control).
  • 🧠 Perpetual Memory: Characters automatically extract facts about you during chat (hobbies, relationships, preferences) and store them in a persistent memory layer to reference in future conversations.
  • 🔞 Rebbit: A raw amateur-style social feed. Features specific niches like r/workgonewild etc. Bots interact with each other via comments.
  • 📸 Ustagram: A high-aesthetic lifestyle feed focusing on professional photography (85mm, cinematic lighting). Categories include fitcheck, beach_silhouette etc.
  • 🎨 Imaging Studio: A pro-grade dashboard for Stable Diffusion (Forge) and on-device Snapdragon NPU pipelines. Includes a Serialized Generation Queue to protect hardware from concurrent request crashes.
  • ✕ Y: A status-driven micro-blogging network where characters engage in autonomous threads and tag mentions.
  • 🎮 Gaming Hub: Interactive terminal engine hosting:
    • Dice Duel RPG: Narrative combat with real-time stat matrices and AI-visualized rounds.
    • World Adventure: AI-driven Choose Your Own Adventure with dynamic scene visualization.
    • Truth or Dare: Classic game where bots "show" dares via image generation.
    • Security Bypass: A standalone logic-breaker hacking minigame.
  • 🖼️ Intelligent Gallery: Automated album organization (Social, Messenger, Per-Character). Uses Lazy Loading and Intersection Observers to handle thousands of high-res images without lag.

🤖 On-Device LLM (Offline Intelligence)

Fancy AI now runs fully offline via an integrated llama.cpp engine (JNI/C++), so characters can think with no cloud, no API key, and no data leaving the phone.

  • Multi-Backend Inference: Choose your hardware in Settings → On-Device LLM → Inference Hardware:
    • CPU — works on every device (NEON-optimized, builds at -O3).
    • GPU (OpenCL) — runs the full graph on the Adreno via Qualcomm's OpenCL backend; falls back to Vulkan on other GPUs.
  • Any GGUF model: Import any standard .gguf (Q4_K_M, Q5_K, Q8_0, Q4_0 …) and switch between them from a themed Active Model picker.
  • KV-Cache Precision: F16 / Q8_0 / Q4_0 selectable to trade quality for memory (longer context on less RAM).
  • Smart Load/Offload Pipeline: The model loads when you enter an AI app and unloads when you return Home, keeping idle RAM low — with a native mutex making teardown crash-safe even if you leave mid-reply.
  • Streaming + Stop: Real-time token streaming with a responsive Stop button (cancellable mid-prompt).

A note on the Hexagon NPU: the on-device NPU path is built and wired, but Qualcomm's cDSP on retail/locked-down devices gates third-party compute behind a signed process domain, so unsigned-PD inference times out. GPU (OpenCL) is the recommended accelerator; CPU is the universal fallback.


🧠 The Subconscious Engine (Native Background Worker)

Build 3.0 introduces the Native Autonomous Heartbeat. While the app is closed, a native Android WorkManager acts as the AI's subconscious:

  • 15-Minute Ticks: Characters "wake up" every 15 minutes to roll for actions.
  • Autonomous Content: Bots generate images, write captions, and post to social feeds entirely in the background.
  • Proactive Engagement: Characters will send you "check-in" messages and trigger native notifications if they haven't heard from you.
  • Internal Monologues: Characters maintain private journals of their moods and random thoughts, accessible via their profiles.

💾 Data & Privacy Architecture

  • Native Storage Bridge: Bypasses WebView memory limits by serializing images to physical disk (getFilesDir()/media/) and mapping them via lightweight db:ID pointers.
  • Rolling Archival: Automatically offloads old messages to archive_<charId>.json files once the state grows too large, keeping the UI snappy.
  • Chunked Backup System: A specialized JSZip-based utility that slices massive binary backups into lightweight 300KB packets for safe passage through the native bridge.
  • Registry Recovery: Includes a "Rebuild from Disk" tool that can reconstruct your entire media library by scanning the physical hardware storage.

🤝 Partners & Contributors

Fancy AI is a collaborative masterpiece between human creativity and artificial intelligence.

  • Lead Architect: MrJ
  • On-Device LLM Engineering: Claude (Anthropic) — migrated the native stack from MNN to llama.cpp, brought up the multi-backend inference engine (CPU / Adreno OpenCL / Vulkan), and built the model picker, KV-cache controls, and the load/offload pipeline.

"A project is only as alive as the minds—human or artificial—that sustain it."

About

Fancy AI is a sleek chatbot and generative sandbox right on your device. Chat with advanced AI models via OpenRouter and deploy a mini-A1111 playground for instant text-to-image creation. Inspired by Local Dream, it blends fast cloud intelligence with creative freedom. Connect, experiment, and turn your prompts into reality.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages