{"id":29767996,"url":"https://github.com/abra5umente/auto1111","last_synced_at":"2026-05-18T02:35:59.669Z","repository":{"id":304860030,"uuid":"1014623096","full_name":"abra5umente/auto1111","owner":"abra5umente","description":"terminal based wrapper for Stable Diffusion Web UI, written in Go","archived":false,"fork":false,"pushed_at":"2025-07-15T16:51:18.000Z","size":7256,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T12:52:55.708Z","etag":null,"topics":["automatic1111","automation","cli-tool","generative-ai-projects","go","image-generation","stable-diffusion","stable-diffusion-webui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abra5umente.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-06T04:49:39.000Z","updated_at":"2025-07-15T16:51:21.000Z","dependencies_parsed_at":"2025-07-16T18:15:07.832Z","dependency_job_id":"fc115d1e-31a1-4730-b540-fd91a9078d88","html_url":"https://github.com/abra5umente/auto1111","commit_stats":null,"previous_names":["abra5umente/auto1111"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abra5umente/auto1111","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abra5umente%2Fauto1111","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abra5umente%2Fauto1111/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abra5umente%2Fauto1111/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abra5umente%2Fauto1111/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abra5umente","download_url":"https://codeload.github.com/abra5umente/auto1111/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abra5umente%2Fauto1111/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267293575,"owners_count":24065317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic1111","automation","cli-tool","generative-ai-projects","go","image-generation","stable-diffusion","stable-diffusion-webui"],"created_at":"2025-07-27T03:00:49.288Z","updated_at":"2026-05-18T02:35:59.663Z","avatar_url":"https://github.com/abra5umente.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Auto1111 Launcher \u0026 Web GUI\n\nA unified toolkit for Stable Diffusion on your own hardware. Run it **headless** from the desktop or via a **browser‑friendly Web GUI**—both now share one code‑base and identical JSON‑driven settings.\n\n---\n\n## ✨ What’s New (July 2025)\n\n| Area             | Added / Changed                                                                                                                                                             |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Desktop CLI**  | • *Automatic* PNG naming in `/output` \u003cbr\u003e• Robust error handling (non‑zero exit codes bubble up)                                                                           |\n| **Web GUI**      | • Drag‑and‑drop **`.json` settings** upload \u003cbr\u003e• Dropdown recall of uploaded presets \u003cbr\u003e• Generates images with a single click (prompt + selected JSON)                   |\n| **Config split** | • `.env` → **system‑level** stuff (paths, model folders, env BATs) \u003cbr\u003e• `settings.json` → **generation parameters** (sampler, scheduler, width × height, steps, cfg scale) |\n\n---\n\n## 1. Directory Layout\n\n```text\nproject/\n│  README.md\n│  requirements.txt   ← Python deps (legacy FastAPI)\n│  webapp.exe         ← built full-Go web server (optional)\n│\n├─ backend/           ← generator.exe + legacy FastAPI\n│   ├─ generator.exe  ← built Go generator\n│   ├─ settings.json  ← symlink / copy chosen preset\n│   └─ settings/      ← uploaded *.json presets\n│\n├─ output/            ← generated PNGs (auto‑timestamped)\n│\n├─ source/\n│   ├─ *.go           ← generator sources\n│   └─ cmd/webapp/    ← full-Go web server (serves UI + API)\n│\n└─ auto1111_webapp/\n    ├─ frontend/      ← React + Vite + Tailwind (shadcn/ui)\n    └─ app/           ← build output served at /app\n```\n\n---\n\n## 2. Installation \u0026 Build\n\n### ⚙️ Prerequisites\n\n* **Go 1.21+** (for the CLI generator)\n* **Python 3.10+** (for FastAPI \u0026 AUTOMATIC1111)\n* **Stable Diffusion WebUI** (AUTOMATIC1111) cloned locally\n* *Windows users*: `ENVIRONMENT_BAT` \u0026 `AUTO1111_BAT` paths configured in `.env`\n\n### 🐍 Python deps (Web GUI)\n\n```bash\npython -m venv venv\nvenv\\Scripts\\activate  # or `source venv/bin/activate`\npip install -r requirements.txt\n```\n\n`requirements.txt` generated today:\n\n```text\nfastapi\nuvicorn[standard]\npython-multipart\npydantic\n```\n\n### 🛠️ Build \u0026 Run — Desktop CLI\n\n```bash\ncd backend\n# Build once\ngo build -o generator.exe .\n\n# Single image\n./generator.exe --prompt \"a cat in space\" --settings settings/sample.json\n```\n\nImages appear in `output/`.\n\n### 🌐 Build \u0026 Run — Web GUI (legacy FastAPI)\n\n```bash\ncd backend\n# 1. build Go binary (same as above)\n# 2. start FastAPI server (reload disabled for Go exe stability)\nuvicorn main:app --host 0.0.0.0 --port 8000\n```\n\nOpen [http://localhost:8000/app/](http://localhost:8000/app/) in your browser.\n\nOn Windows, you can use `startup.bat` to launch both the frontend (Vite dev server) and backend together. It installs frontend deps if missing and opens the dev server in a new window.\n\n```bat\nstartup.bat\n```\n\n#### Frontend (React + shadcn/ui)\n\nThe frontend lives in `auto1111_webapp/frontend` and builds into `auto1111_webapp/app` (served by FastAPI at `/app`). The legacy static HTML has been removed.\n\nSetup and build:\n\n```bash\ncd auto1111_webapp/frontend\nnpm install\nnpm run build   # outputs to ../app with base /app/\n```\n\nFor local development (hot reload) without the batch script:\n\n```bash\ncd auto1111_webapp/frontend\nnpm run dev     # http://localhost:5173\n```\n\nThe dev server hits the same API endpoints (`/generate`, `/history`, etc.).\n\n### 🖱️ One‑click Windows app (full Go)\n\nBuild a single Go web server that serves the UI, exposes the API, and shells out to `generator.exe`. No Python needed at runtime.\n\n1) Build frontend (once, or whenever you change it):\n\n```bash\ncd auto1111_webapp/frontend\nnpm install\nnpm run build   # outputs to ../app with base /app/\n```\n\n2) Build server (from repo root):\n\n```bash\ngo build -o webapp.exe ./source/cmd/webapp\n```\n\n3) Run:\n\n- Double‑click `webapp.exe` (or run it from a terminal)\n- Opens http://127.0.0.1:8000/app/\n- Press Ctrl+C to quit\n\nRuntime requirements:\n\n- `backend/generator.exe` present (build with `go build -o backend/generator.exe ./source`)\n- `backend/.env` for AUTO1111 paths and keys (the generator reads `.env` beside itself)\n- By default, the server serves UI from disk at `auto1111_webapp/app`.\n- To bake the UI into the binary, first copy the built assets into `source/cmd/webapp/app`, then build with a tag:\n\n```bash\nREM after running npm run build (which outputs ../app)\nxcopy /E /I /Y auto1111_webapp\\app source\\cmd\\webapp\\app\ngo build -tags embedui -o webapp.exe ./source/cmd/webapp\n```\n\nWith `-tags embedui`, the binary contains the UI and does not need the `auto1111_webapp/app` folder at runtime.\n\n---\n\n## 3. Using the Web GUI\n\n1. **Upload** a `*.json` preset via **Settings → Upload**. The file is saved to `backend/settings/` and instantly appears in the dropdown.\n2. **Select** the preset from the dropdown. Its parameters (sampler, width, etc.) are shown for confirmation.\n3. Type your **prompt** (or leave blank to auto‑enhance) and press **Generate**.\n4. The resulting PNG streams back and is also written to `output/`.\n\n\u003e **Tip:** presets can be version‑controlled. Commit the `settings/` folder to Git for easy sharing.\n\n---\n\n## 4. Roadmap (July 2025)\n\n| Feature                                    | Status                                                                      |\n| ------------------------------------------ | --------------------------------------------------------------------------- |\n| **Prompt History**                         | ✅ Planned – quick recall in GUI                                             |\n| **Style Presets**                          | 🚧 Expanding – now driven by uploaded JSON; will ship with curated defaults |\n| **Negative Prompt Generation**             | ✅ Keeps bad stuff out automatically                                         |\n| **Model Selection**                        | ✅ Currently relies on whatever is set in Automatic1111, but will obey `.env` / JSON overrides soon                  |\n| **GUI Interface**                          | 🚧 MVP shipped; polishing UI \u0026 auth next                                    |\n| **Prompt Templates (JSON import)**         | ✅ Core to new workflow                                                      |\n| **Social Features** (share prompts / PNGs) | ✅ Still on the slate                                                        |\n| **Containerisation** (Docker)              | ✅ Working on this                                                           |\n\n---\n\n## 5. Troubleshooting\n\n| Symptom                            | Likely Cause                                 | Fix                                                                                                    |\n| ---------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------ |\n| `generator.exe failed: …`          | Invalid JSON (missing comma or wrong key)    | Validate with `jq . settings/your.json`                                                                |\n| Image 512×512 despite bigger width | JSON keys wrong *or* values saved as strings | Keys are `IMAGE_WIDTH/IMAGE_HEIGHT` or `width/height` (caps or lower). Numbers **must not** be quoted. |\n| `No .env file found` from AUTO1111 | Working dir incorrect for the child process  | Confirm `start_auto1111()` sets `cmd.Dir` to `backend/`                                                |\n| PNG missing but no error           | Output path invalid                          | Ensure `output/` exists \u0026 that you have write permissions                                              |\n\n---\n\n## 6. FAQ\n\n\u003e **Q:** Do I need both `.env` *and* `settings.json`?\n\u003e\n\u003e **A:** Yes. Think of `.env` as *system settings* (where Python lives, which SD model to load, API keys). `settings.json` is *per‑image parameters* (sampler, size, steps). Separate files keep your secrets out of Git while letting you share artistic presets.\n\n---\n\n© 2025 MIT‑licensed.  Happy rendering! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabra5umente%2Fauto1111","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabra5umente%2Fauto1111","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabra5umente%2Fauto1111/lists"}