# Repository Briefing: YanNyeinHtet/EggLab
> Source: https://repoforai.com/repo/YanNyeinHtet/EggLab (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/YanNyeinHtet/EggLab
- **Official Docs / Website**: https://github.com/YanNyeinHtet/EggLab/releases/latest
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: JavaScript
- **License**: MIT
- **Engineering Health**: A (84/100 · Maintenance 35/35 · Adoption 9/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.3.60 (2026-12-03) — https://github.com/YanNyeinHtet/EggLab/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Local AI, GPU
- **Momentum**: 85 ★ total (+0 24h / +1 7d) · 5 forks
- **Topics**: `agent`, `ai`, `electron`, `image-generation`, `local-first`, `mit`, `photocraft`, `qwen`, `stable-diffusion`, `windows`
- **When to Use**: Best for: Windows-based PhotoCraft users who want local image generation and reference editing, with results placed directly on the canvas and no node graphs to maintain. Skip if: You need cross-platform support, a different editor, custom node workflows, or a no-egress deployment without separately validating the chat path.

## Overview
```text
### Architecture & Core Mechanics
EggLab is a Windows Electron companion to PhotoCraft, which must be installed separately. The floating panel is the user interface; OpenCode runs the design agent, while stable-diffusion.cpp runs Qwen-Image-2.1 locally. The two paths have distinct responsibilities: the selected OpenCode provider handles chat, while image jobs use the local engine and can place results on the PhotoCraft canvas as layers.

The code layout reflects that split: `egglab.ps1` is the runner for generation, editing, and Turbo jobs; `panel/service/` covers settings, engine management, chat, models, setup, and updates. Agent guidance lives under `panel/skills/` and `panel/references/`, with document templates under `panel/templates/`. Manual and agent-driven renders share the engine configuration. Each job records the actual diffusion file loaded, and a 2.5-second settling window after model changes guards against the first render racing the previous engine's teardown.

### Key Capabilities & Differentiators
EggLab supports text-to-image generation at up to 2048 px, with a 40-step quality mode and an 8-step Turbo LoRA mode. It also supports reference-based editing, multi-reference compositions, and transparent cut-outs. Results can become PhotoCraft layers or be exported as flat or layered files. Chats are scoped to the active PhotoCraft document, and reopening that document restores the last-viewed thread rather than simply the most recently active one.

The diffusion menu is limited to Uncensored FP8, Official Q4_K_M (Beta), and Uncensored Q5_K_M. On an 8 GB RTX 4060 Ti, the Q4_K_M beta took 29 seconds versus 47 seconds for the default FP8 model in one 864×1152 Turbo text-to-image test; it was about 10% faster in a single-reference editing test. Its diffusion weights are 2.9 GB smaller. These figures are workload-specific: the Q4_K_M option also switches to the official checkpoint, so the comparison does not isolate quantization or establish equivalent output quality.

### Trade-offs & Limitations
Compared with ComfyUI, EggLab trades node-level workflow control for a narrower path from prompt to PhotoCraft layer. Local image inference removes the need for a cloud renderer, but shifts setup, storage, and memory pressure to the workstation. It also does not make the whole workflow offline: chat text goes to the selected OpenCode provider, and PhotoCraft remains a required dependency.

On an 8 GB GPU, diffusion weights, the text encoder, and multiple references can compete for VRAM. EggLab resizes reference images to a 768 px long edge by default and cleans up leftover engine processes. It can retry with the encoder in system RAM or at smaller output dimensions, up to 1024×1280 while preserving aspect ratio. Those fallbacks can salvage a job, but may increase runtime or reduce delivered resolution. The installer is unsigned; the published checksum can confirm a file matches the release artifact, but is not a substitute for publisher signing.

### Hardware & Deployment Guide
Deployment targets Windows 10 or 11 x64 with PhotoCraft installed, roughly 25 GB of free disk, and internet access for initial downloads. The unsigned installer downloads a SHA-256-verified engine and can fall back from CUDA to Vulkan to CPU if the download fails. The first-run wizard locates PhotoCraft, detects or downloads OpenCode, and downloads missing model components or reuses existing files. The packaged app requires neither a separate Node installation nor Python; source development uses Node 20+ in `panel/`, with `npm run test:agent` providing a GPU-free agent regression gate.

The engine and default model directory live under `%LOCALAPPDATA%\EggLab`, while chats, settings, logs, and renders live under `%APPDATA%\EggLab`. The installed app checks GitHub Releases for updates and retains those assets across updates. Releases v0.3.58 through v0.3.60 provide comparison links rather than feature-level summaries, so the listed releases do not establish which changes landed in each patch.
```

## Key Capabilities
```text
- Canvas integration: Add generated or edited images directly to PhotoCraft as layers, or export flat or layered files.
- Model selection: Choose Uncensored FP8, Official Q4_K_M (Beta), or Uncensored Q5_K_M; each job records which diffusion file actually loaded.
- Inference backends: NVIDIA CUDA, Vulkan for compatible GPUs, and a slower CPU fallback.
- Memory recovery: Resize references to a 768 px long edge by default, retry with the text encoder in system RAM, or retry at smaller output dimensions.
- Session scope: Conversations are grouped by PhotoCraft document, and reopening a document restores the last-viewed thread.
- Installation reuse: Reference an existing model folder without copying it, map individual model files, or select an existing opencode.exe.
```

## Quick Start / Clone
```bash
cd panel
npm install
npm start          # dev panel (uses the repo checkout layout)
npm run test:agent # agent/tool/config regression gate (no GPU)
npm run dist       # one-click installer in ..\dist
```
