{"id":44258617,"url":"https://github.com/mikeknapp/candy-machine","last_synced_at":"2026-02-10T16:38:40.506Z","repository":{"id":239862540,"uuid":"800792283","full_name":"mikeknapp/candy-machine","owner":"mikeknapp","description":"Image Dataset Tagger for Stable Diffusion / Lora / DreamBooth Training","archived":false,"fork":false,"pushed_at":"2025-06-14T00:23:38.000Z","size":3458,"stargazers_count":38,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-14T01:26:58.588Z","etag":null,"topics":["dreambooth","image-dataset","image-tagger","image-tagging","kohya-webui","lora","loras","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeknapp.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":"2024-05-15T02:21:48.000Z","updated_at":"2025-05-13T08:43:21.000Z","dependencies_parsed_at":"2025-06-14T01:33:43.731Z","dependency_job_id":null,"html_url":"https://github.com/mikeknapp/candy-machine","commit_stats":null,"previous_names":["mikeknapp/candy-machine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikeknapp/candy-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeknapp%2Fcandy-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeknapp%2Fcandy-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeknapp%2Fcandy-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeknapp%2Fcandy-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeknapp","download_url":"https://codeload.github.com/mikeknapp/candy-machine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeknapp%2Fcandy-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29307922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dreambooth","image-dataset","image-tagger","image-tagging","kohya-webui","lora","loras","stable-diffusion"],"created_at":"2026-02-10T16:38:39.788Z","updated_at":"2026-02-10T16:38:40.501Z","avatar_url":"https://github.com/mikeknapp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Candy Machine - Manual Image Tagger\n\n_Web-Based Manual Image Tagger for Training Custom Stable Diffusion LORAs \u0026 DreamBooth Models_\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/candy-machine-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/candy-machine.png\"\u003e\n  \u003cimg alt=\"Screenshot of Candy Machine\" src=\"assets/candy-machine.png\"\u003e\n\u003c/picture\u003e\n\nCandy Machine is a nascent image tagger for _manually tagging_ small datasets (\u003c 1k images) with `.txt` caption files:\n\n- **Customizable tag layout** for consistent tagging\n\n- **Placeholder tag templates**: i.e. `{type} clothes`, where `{type}` can be specified when adding a tag\n\n- **In-built image editing** (crop, rotate and flip horizontal)\n\n- **Tag suggestions** using `wd-v1-4-convnext-tagger.v3` when creating a new project\n\n- **Automatic file conversion** to .png from .webp, .avif, .gif, etc\n\n- **Progress % pie chart** - for those times when you wonder _'am I done yet?!'_\n\n- **Keyboard shortcuts** - press '?' for a list\n\n- and more coming soon!\n\nCandy Machine runs entirely on your local machine in \"single player\" mode. No information is transmitted to any\n3rd party system.\n\n## Built-In Image Editor\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/image-editor-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/image-editor.png\"\u003e\n  \u003cimg alt=\"Edit Image Screenshot\" src=\"assets/image-editor.png\"\u003e\n\u003c/picture\u003e\n\n## Why?\n\nI was inspired by [this Reddit post](https://www.reddit.com/r/StableDiffusion/comments/118spz6/captioning_datasets_for_training_purposes/) about how to best tag small image datasets, focusing mainly on consistency.\n\nI've also never loved the \"fiddly\" parts of building a dataset - converting images, renaming them, cropping etc. I want to make building datasets quick, easy and, who knows, maybe even fun!\n\nH/T to [BinaryAlley](https://github.com/BinaryAlley/DatasetTag) also for their prototype.\n\n## Requirements:\n\n- Git\n- Python 3\n\n## Free for Personal, Non-Commercial Use.\n\nThis software is entirely free for personal, non-commercial use. If you're using it in a business context or for commercial use\n(i.e. to make money from it), please contact me to arrange a paid license. This will help support my development costs.\n\n## How to Run on Windows\n\n```console\ngit clone git@github.com:mikeknapp/candy-machine.git\ncd candy-machine\nrun\n```\n\nA browser window should automatically open: `http://127.0.0.1:5000/`\n\n## How to Run on MacOS/Unix\n\n(Note, I haven't tested this yet, there may be bugs!)\n\n```console\ngit clone git@github.com:mikeknapp/candy-machine.git\ncd candy-machine\nchmod +x run.sh\n./run.sh\n```\n\nA browser window should automatically open: `http://127.0.0.1:5000/`\n\n## Using the GPU for Image Tagging\n\nRequires CUDA 12.2 and cuDNN8.x.\n\n1. Activate the Python venv. (Look inside run.bat for clues on how to do that.)\n\n2. Install `onnxruntime-gpu`\n\n```console\npip install onnxruntime-gpu --extra-index-url \\\n    https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/\n```\n\n## Known Issues\n\n- Can't edit a project's tag layout or the default tag layout inside the app. (Workaround: edit `default_categories.json` in the server directory, or a project's `categories.json`. For the latter, be sure not to remove tags that are being actively used, otherwise they will be orphaned at the end of the tag list if you save that image in the future.)\n\n- Can't add more images to a project! (Workaround: create a new project. I know, not ideal.)\n\n- Can't edit the trigger word / synonyms. (Workaround: edit the project's `config.json` and all existing .txt caption files.)\n\n## Feature Pipeline\n\n- Delete tags\n- Sort tags by usage\n- Add more images!\n- Edit trigger word / synonyms\n- Image zoom\n- Color picker -\u003e color name\n- Find and replace tags (across the project)\n- Export wizard to prepare the data and generate recommended settings for [Kohya SS](https://github.com/bmaltais/kohya_ss)\n- Customize tag layout from import analysis\n- Saved presets for tag layouts (i.e. photography, anime, style LORAs etc)\n- Watermark removal (inpainting?)\n- Detection and removal of [Nightshade-poisoned images](https://nightshade.cs.uchicago.edu/whatis.html#) etc from the dataset (to respect the wishes of copyright holders and protect your dataset).\n- Maybe in the future: Automated image search to find more images?\n\n## Want to Contribute?\n\nTech stack:\n\n- Basic Python HTTP server - using virtual env\n- Parcel for building the JS and CSS bundles\n- TypeScript\n- Flowbite React for the UI components\n- Tailwind CSS for styling\n\nBefore spending any time writing code, please open an issue with your proposal so we can discuss. Thanks!\n\n### Virtual Env Setup (Windows):\n\n```console\npython -m venv venv\ncall .\\venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n### Run the UI:\n\nPrerequisites: Node and Yarn.\n\n```console\ncd ui\nyarn start\n```\n\n### Run the Server:\n\n```console\ncd server\npython main.py\n```\n\n## Questions, Comments, Feedback?\n\nPlease send me a message, or open an issue. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeknapp%2Fcandy-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeknapp%2Fcandy-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeknapp%2Fcandy-machine/lists"}