Shav Vimalendiran
BlogWiki ↗
  • The Last MoatsJul 7, 2026
  • The Tech FrontierJul 6, 2026
  • The Trust BarrierJul 4, 2026
  • I Open-Sourced My Coding Agents' MemoryJun 24, 2026
  • How I Gave My Coding Agents Persistent MemoryMar 12, 2026
  • Multi‑Agent Web Exploration with Shared Graph MemoryFeb 19, 2026
  • Our Lessons from Building Production Voice AIJan 11, 2026
  • Reinforcement Learning, Memory and LawDec 10, 2025
  • Automating Secret ManagementOct 23, 2025
  • The Knowledge LayerOct 5, 2025
  • OTel Sidecars on FargateSep 11, 2025
  • Git Disasters and Process DebtSep 7, 2025
  • Is Code Rotting Due To AI?Sep 3, 2025
  • The Integration IllusionAug 30, 2025
  • When MCP FailsAug 26, 2025
  • Context EngineeringAug 22, 2025
  • Stop Email Spoofing with DMARCAug 5, 2025
  • SOTA Embedding Retrieval: Gemini + pgvector for Production ChatJul 21, 2025
  • Agentic Design PatternsJun 21, 2025
  • Building AI Agents for Automated PodcastsJan 1, 2025
  • Rediscovering CursorDec 2, 2024
  • GraphRAG > Traditional Vector RAGAug 8, 2024
  • Cultural Bias in LLMsJul 20, 2024
  • Mapping out the AI Landscape with Topic ModellingJul 7, 2024
  • Sustainable Cloud Computing: Carbon-Aware AIJun 27, 2024
  • Defensive Technology for the Next Decade of AIJun 24, 2024
  • Situational Awareness: The Decade AheadJun 13, 2024
  • Mechanistic Interpretability: A SurveyJun 7, 2024
  • Why I Left UbuntuMay 24, 2024
  • Multi-Agent CollaborationApr 16, 2024
  • Building Better Retrieval SystemsMar 28, 2024
  • Building an Automated Newsletter-to-Summary Pipeline with Zapier AI Actions vs AWS SES & LambdaFeb 3, 2024
  • ›Local AI Image GenerationDec 15, 2023
  • Deploying a Distributed Ray Python Server with Kubernetes, EKS & KubeRayNov 15, 2023
  • Making the Switch to Linux for DevelopmentOct 24, 2023
  • Scaling Options Pricing with RayOct 1, 2023
  • The Async Worker PoolSep 23, 2023
  • Browser Fingerprinting: Introducing My First NPM PackageSep 8, 2023
  • Reading Data from @socket.io/redis-emitter without Using a Socket.io ClientJul 6, 2023
  • Socket.io Middleware for Redux Store IntegrationJul 1, 2023
  • Sharing TypeScript Code Between Microservices: A Guide Using Git SubmodulesApr 21, 2023
  • Efficient Dataset Storage: Beyond CSVsFeb 3, 2023
  • Why I switched from Plain React to Next.js 13Nov 8, 2022
  • Deploy & Scale Socket.io Containers in ECS with ElasticacheNov 3, 2022
  • Implementing TOTP Authentication in Python using PyOTPSep 13, 2022
  • Simplifying Lambda Layer ARNs and Creating Custom Layers in AWSSep 9, 2022
  • TimeScaleDB Deployment: Docker Containers and EC2 SetupJun 23, 2022
  • How to SSH into an EC2 Instance Using PuTTYDec 16, 2021
Loading post…

In This Post

User InterfacesGetting StartedUsing FooocusBeyond Images
Published: December 15, 2023
PreviousNext

Local AI Image Generation

The ability to generate stunning AI images has become accessible to everyone. Remember the days of generative adversarial networks (GANs)? Those models could only produce blurry, small-scale images. Today, we stand at a point where high-resolution, life-like images are available to anyone, thanks to advanced open-source models like Stable Diffusion XL and checkpoints like Juggernaut.

While there are proprietary tools like Midjourney and DALL·E from OpenAI offering image generation services, they come with subscription costs and built-in safety layers. Fortunately, the open-source ecosystem around generative AI offers robust alternatives. The most renowned among these is Stable Diffusion XL, launched in late July 2023.

Creating these images doesn't require vast computing resources from your end. The community has developed various checkpoints - fine-tuned versions of these models using additional specialized training data. These are readily available on platforms like Civit AI, some of which are highly optimized for photorealism.

User Interfaces

The key to using these models lies in user-friendly interfaces. The most well-known option is the Stable Diffusion Web UI - an incredibly powerful tool. There are other options that might be initially less daunting, such as Comfy UI that offers an intuitive drag-and-drop editor similar to Blender or Unreal Engine.

The interface I'm using is Fooocus, which combines ease of use with powerful features. Like many AI UIs, it's built upon the foundational open-source project Gradio.

Getting Started

The README.md is good to read through, but in general, setting up is straightforward:

  1. Clone the repository from GitHub
  2. Create a Python virtual environment and install the required packages
  3. Run the entry script with python entry_with_update.py to automatically download default models (note: these files can be quite large)

Using Fooocus

With Juggernaut XL as the base model, you're now equipped to bring any imaginative concept to life. The UI of Fooocus, similar to Midjourney but free, is highly intuitive. I run it on a modest RTX 2060, and it typically takes about 45 seconds to generate two high-quality images.

Fooocus UI

The advanced tab in Fooocus unlocks a bunch of other features - performance settings, aspect ratio, the number of images to generate, and style variations can all be set here. You can experiment with different artistic styles, such as anime or retro video game aesthetics.

Foocus FaceSwap Feature

You can also generate an image and save this as your base image, then create a new prompt and check the box for input image. This allows for consistency between images. For example, for people, you can use face swap and then write a text prompt to change the setting. Most importantly, we have pretty good continuity between faces.

Beyond Images

The journey doesn't end with still images. Pika Labs recently showcased a groundbreaking text-to-video platform. For open-source enthusiasts, Stability AI has introduced Stable Diffusion Video, opening new horizons in video creation.

As an update in 2024, Google's Lumiere, a space-time diffusion model for video generation, brings AI video closer to real than unreal!


Loading comments...
PreviousBuilding an Automated Newsletter-to-Summary Pipeline with Zapier AI Actions vs AWS SES & LambdaNextDeploying a Distributed Ray Python Server with Kubernetes, EKS & KubeRay

Be the first to share your thoughts!