Skip to content

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.

L2 Checks passed 3 of 3 runsv0.1.0Tech-Realm/space-image-video-lora-public

Install

logicpacks pack use image-video-lora-public/prepare-lora-image-dataset
get_pack image-video-lora-public/prepare-lora-image-dataset

The 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

  1. Collect 15-40 varied images of the subject/style (angles, light, backgrounds) that we have rights to.
  2. Crop/resize so the short side is >= 512 (1024 for SDXL/FLUX quality).
  3. Pick a rare trigger token (e.g. zxq) and caption each image: trigger + what changes (pose, setting).
  4. python3 code/check_dataset.py dataset --trigger zxq until 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.