Packs / image-video-lora-public
prepare-lora-image-dataset
Get an image LoRA dataset ready before paying for GPU time: every image captioned with the trigger word, minimum size met, duplicates removed. Stdlib checker reads PNG, JPEG and WebP.
Install
logicpacks pack use image-video-lora-public/prepare-lora-image-datasetget_pack image-video-lora-public/prepare-lora-image-datasetThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
python-stdlib - Checks: 2 in
outcome/checks.yaml - Code:
check_dataset.pymake_dataset.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A folder of 15-40 images with matching .txt captions that all contain a rare trigger word, ready for any LoRA trainer.
Steps
- Collect 15-40 varied images of the subject/style (angles, light, backgrounds) that we have rights to.
- Crop/resize so the short side is >= 512 (1024 for SDXL/FLUX quality).
- Pick a rare trigger token (e.g. zxq) and caption each image: trigger + what changes (pose, setting).
python3 code/check_dataset.py dataset --trigger zxquntil 0 problems.
Edge cases
- Style LoRA: caption the content, not the style.
- Near-duplicates (same shot, tiny crop) are not caught: remove by eye.
Don'ts
- Don't use scraped photos of real people without consent.
- Don't use a common word as the trigger.