Style LoRA Research Pipeline
Use when: the user wants to mine external style LoRA libraries, curate a brand-aligned shortlist, or batch-test styles against real scene prompts.
Trigger conditions
- "curate style LoRAs", "test styles on FAL", "batch test LoRAs", "style library", "Loratlas", "Krea 2 LoRAs"
- User wants to find new visual styles aligned with a brand aesthetic before deciding whether to hybrid-fit locally or inference via API
Workflow
- Discover: load the external library homepage and navigate to the indexed view (Library/All).
- Filter by brand DNA: match palette, lighting, cinematic density, and genre overlap. Use subjective fit ranking, not like-counts alone.
- Shortlist tiers rather than one flat list: core dramatic skin, secondary ornate skin, reserve anime/lighter skin, and mural/old-artwork fallback family.
- Deep-dive each page: extract the trigger phrase, the Hugging Face weight path, and the developer-call prompt template. Pause before generating — read the page’s prompt guide first.
- Author test prompts: brand-themed subjects, stripped to concrete nouns + minimal action/setting. Never redefine medium; let the LoRA carry it.
- Batch-submit via
fal.runendpointfal-ai/krea-2/turbo/lora(or equivalent). Use async polling. Seereferences/fal-lora-testing.mdfor the stdlib-only fallback and the exact poll loop, andreferences/cheonma-fal-batch-notes.mdfor the brand-local batch CLI and synchronous-response behavior. - Collect outputs: save image URLs + request IDs locally under
~/cheonma/loratlas_test_runs.jsonor brand-equivalent path. - Evaluate: rank tested styles by visual fidelity to brand prompts, not just novelty.
- Formalize: save chosen skins as template files, subject prompts as JSON banks, and generate via a repeatable brand CLI instead of one-off scripts.
Brand-fit filter rubric
- Palette overlap with brand DNA
- Cinematic lighting density (chiaroscuro, backlight, golden hour, noir)
- Depth of field and texture grain behavior
- Consistency across varied subjects
- Scalability — can the style survive 1.0–1.3 scale without collapse
Pitfalls
- Don’t generate before reading the page-level prompt guide — each LoRA has a distinct ideal prompt shape.
- FAL’s
image_generatetool is FLUX-only and cannot run custom LoRA weights. Use directhttps://fal.runcalls instead. requestsis not guaranteed in the session venv. Useurllib.request+ polling loop; seereferences/fal-lora-testing.mdfor the complete drop-in pattern.- Some HF links reported broken; verify the
v3b.fal.media/...safetensorsURL is present on the style page before testing. - This endpoint is sometimes synchronous: a completed response can appear as
response.images[0].urlwhile the top-levelrequest_idis absent. Treat a missing request ID as “read the image from the response directly,” not as a hard failure requiring another submit. - Async endpoints need polling — do not treat a 202/queued response as success.
- Markdown patch hygiene: when updating prompt template
.mdfiles, always inspect the fenced block afterward. Small replace patches can bisect code fences or duplicate headings. - Subject bank sizing: 4–8 entries per archetype is too few for a recurring weekly feed. Formalize step should expand each bank to 12–15 concrete noun prompts before treating the template system production-ready.
Environment discovery for FAL auth
Preferred key lookup order:
~/.hermes/.env<brand root>/.env- profile-local
~/.hermes/profiles/<name>/.envonly if explicitly configured - Do not assume
~/.env,/root/.env, or the active shell’s exports
The fallback script in references/fal-lora-testing.md hardcodes ~/.hermes/.env.
Override that path only when brand setup explicitly differs.
Output expectations
- JSON array: one entry per style × subject.
- Fields:
style,subject,prompt,request_id,final_status,image_url. - Print summary counts by style at end.
Session package target
After testing, create one index doc next to references/fal-lora-testing.md, e.g. references/<brand>-style-shortlist.md, containing:
- Tiered shortlist
- Direct style-page URLs
- Trigger phrases
- Final style-URL pairs for future hybrid fitting