7517
Cd
clanker-and-the-dev / files
clanker-and-the-dev / README.md
4.5 KB
1# Clanker and the Dev 2 3A Jekyll/GitHub Pages comic-strip blog about developers, AI tools, terminal gremlins, and jokes that compile into neon terminal chaos. 4 5Comic generation is now image-based. The formal entrypoint is the `add-new-comic` agent skill in `.agents/skills/add-new-comic/`, which uses Python, SDXL, IP-Adapter art references, ControlNet layout guides, and Pillow compositing. 6 7## Run locally 8 9Local Jekyll development runs in Docker only, so you do not need to install Ruby gems on your machine. 10 11```bash 12./dev.sh 13``` 14 15Then open: 16 17```txt 18http://localhost:4000 19``` 20 21The Docker container mounts the repo, so edits to posts, layouts, CSS, and generated comics are reflected by Jekyll. 22 23## Generate a comic 24 25Use the `add-new-comic` agent skill. The skill: 26 271. Turns a joke/premise into `comic/specs/<slug>.json`. 282. Runs the SDXL generator through `uv`. 293. Writes generated assets under `assets/comics/<slug>/`. 304. Writes the Jekyll post in `_posts/`. 31 32The generation command used by the skill is: 33 34```bash 35HF_HOME="$PWD/.cache/huggingface" PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True uv run --project .agents/skills/add-new-comic python .agents/skills/add-new-comic/scripts/generate_comic.py comic/specs/<slug>.json 36``` 37 38Generated outputs include: 39 40```txt 41assets/comics/<slug>/control-panel-01.png 42assets/comics/<slug>/raw-panel-01.png 43assets/comics/<slug>/panel-01.png 44assets/comics/<slug>/strip.png 45assets/comics/<slug>/generation.json 46_posts/YYYY-MM-DD-<slug>.md 47``` 48 49`strip.png` is the final panels-only comic image embedded by the post. Page titles, credits, borders, and other surrounding chrome are supplied by Jekyll HTML/CSS, not baked into the PNG. 50 51## Python dependencies 52 53Use `uv` for Python management and package installation. The skill folder contains: 54 55```txt 56.agents/skills/add-new-comic/pyproject.toml 57.agents/skills/add-new-comic/requirements.txt 58``` 59 60Core libraries: 61 62- torch 63- diffusers 64- transformers 65- accelerate 66- safetensors 67- Pillow 68- pydantic 69- opencv-python 70- peft 71 72Default model: 73 74```txt 75stabilityai/stable-diffusion-xl-base-1.0 76``` 77 78Default IP-Adapter: 79 80```txt 81repo: h94/IP-Adapter 82subfolder: sdxl_models 83weight: ip-adapter_sdxl.bin 84reference: art-reference/training-reference.png + art-reference/ip-character-reference.png 85reference crop mode: auto 86scale: 0.82 87``` 88 89The generator crops the clean training reference per panel, crops the two-character IP reference down to character-only anchors, and averages IP-Adapter image embeddings to avoid copying sheet grids/cards. ControlNet is enabled by default with reference-derived `control-panel-XX.png` layout guides: 90 91```txt 92model: diffusers/controlnet-canny-sdxl-1.0 93mode: layout 94scale: 0.88 95start/end: 0.0 / 0.90 96``` 97 98CUDA is expected for generation. Model CPU offload is enabled by default for 12 GB GPUs, and each panel is generated in an isolated worker process to avoid VRAM buildup. The compositor then converts soft SDXL output into crisp terminal line art, clips generated strokes to the reference-derived guide to remove scanlines/blobs, and merges that guide to repair character drift. The first run downloads Hugging Face model weights and may require accepted model terms / Hugging Face credentials in the environment. 99 100## Review and commit a generated comic 101 102After generation, inspect the generated files: 103 104```bash 105git status 106git diff 107``` 108 109Run the site locally if you want to preview the post: 110 111```bash 112./dev.sh 113``` 114 115When it looks good, commit the spec, assets, and post: 116 117```bash 118git add comic/specs assets/comics _posts 119git commit -m "Add my great joke comic" 120``` 121 122## Contribute your own joke 123 124Got a joke about AI coding, burnout, terminals, yak shaving, overconfident bots, or software nonsense? Please send it in. 125 1261. Fork this repo. 1272. Create a branch. 1283. Use the `add-new-comic` skill to generate a comic from your joke. 1294. Commit `comic/specs/<slug>.json`, `assets/comics/<slug>/`, and `_posts/YYYY-MM-DD-<slug>.md`. 1305. Open a pull request. 131 132Small premises are welcome. Half-baked ideas are welcome. If the premise is funny, Clanker can probably ruin it. 133 134## Manual post format 135 136Image comic posts live in `_posts/` and use filenames like: 137 138```txt 139_posts/2026-06-08-my-strip.md 140``` 141 142Basic image post frontmatter/body: 143 144```md 145--- 146layout: post 147title: My Strip 148--- 149 150<div class="comic-strip image-comic"> 151 <img src="{{ '/assets/comics/my-strip/strip.png' | relative_url }}" alt="My Strip comic strip"> 152</div> 153``` 154 155## GitHub Pages 156 157This is a standard Jekyll project. Configure GitHub Pages to build from the repository branch, and GitHub will run Jekyll automatically.