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.run endpoint fal-ai/krea-2/turbo/lora (or equivalent). Use async polling. See references/fal-lora-testing.md for the stdlib-only fallback and the exact poll loop, and references/cheonma-fal-batch-notes.md for the brand-local batch CLI and synchronous-response behavior.
- Collect outputs: save image URLs + request IDs locally under
~/cheonma/loratlas_test_runs.json or 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_generate tool is FLUX-only and cannot run custom LoRA weights. Use direct https://fal.run calls instead.
requests is not guaranteed in the session venv. Use urllib.request + polling loop; see references/fal-lora-testing.md for the complete drop-in pattern.
- Some HF links reported broken; verify the
v3b.fal.media/...safetensors URL is present on the style page before testing.
- This endpoint is sometimes synchronous: a completed response can appear as
response.images[0].url while the top-level request_id is 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
.md files, 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>/.env only 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
1---2name: style-lora-research-pipeline3description: Discover, curate, and batch-test external style LoRAs for brand-custom image generation. Covers Loratlas-style libraries, FAL LoRA inference, and async polling patterns.4---5
6# Style LoRA Research Pipeline
7
8Use when: the user wants to mine external style LoRA libraries, curate a brand-aligned shortlist, or batch-test styles against real scene prompts.
9
10## Trigger conditions
11
12- "curate style LoRAs", "test styles on FAL", "batch test LoRAs", "style library", "Loratlas", "Krea 2 LoRAs"
13- User wants to find new visual styles aligned with a brand aesthetic before deciding whether to hybrid-fit locally or inference via API
14
15## Workflow
16
171. **Discover**: load the external library homepage and navigate to the indexed view (Library/All).
182. **Filter by brand DNA**: match palette, lighting, cinematic density, and genre overlap. Use subjective fit ranking, not like-counts alone.
193. **Shortlist tiers rather than one flat list**: core dramatic skin, secondary ornate skin, reserve anime/lighter skin, and mural/old-artwork fallback family.
204. **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.
215. **Author test prompts**: brand-themed subjects, stripped to concrete nouns + minimal action/setting. Never redefine medium; let the LoRA carry it.
226. **Batch-submit via `fal.run` endpoint** `fal-ai/krea-2/turbo/lora` (or equivalent). Use async polling. See `references/fal-lora-testing.md` for the stdlib-only fallback and the exact poll loop, and `references/cheonma-fal-batch-notes.md` for the brand-local batch CLI and synchronous-response behavior.
237. **Collect outputs**: save image URLs + request IDs locally under `~/cheonma/loratlas_test_runs.json` or brand-equivalent path.
248. **Evaluate**: rank tested styles by visual fidelity to brand prompts, not just novelty.
259. **Formalize**: save chosen skins as template files, subject prompts as JSON banks, and generate via a repeatable brand CLI instead of one-off scripts.
26
27## Brand-fit filter rubric
28
29- Palette overlap with brand DNA
30- Cinematic lighting density (chiaroscuro, backlight, golden hour, noir)
31- Depth of field and texture grain behavior
32- Consistency across varied subjects
33- Scalability — can the style survive 1.0–1.3 scale without collapse
34
35## Pitfalls
36
37- Don’t generate before reading the page-level prompt guide — each LoRA has a distinct ideal prompt shape.
38- FAL’s `image_generate` tool is FLUX-only and cannot run custom LoRA weights. Use direct `https://fal.run` calls instead.
39- `requests` is not guaranteed in the session venv. Use `urllib.request` + polling loop; see `references/fal-lora-testing.md` for the complete drop-in pattern.
40- Some HF links reported broken; verify the `v3b.fal.media/...safetensors` URL is present on the style page before testing.
41- This endpoint is sometimes synchronous: a completed response can appear as `response.images[0].url` while the top-level `request_id` is absent. Treat a missing request ID as “read the image from the response directly,” not as a hard failure requiring another submit.
42- Async endpoints need polling — do not treat a 202/queued response as success.
43- **Markdown patch hygiene**: when updating prompt template `.md` files, always inspect the fenced block afterward. Small replace patches can bisect code fences or duplicate headings.
44- **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.
45
46## Environment discovery for FAL auth
47
48Preferred key lookup order:
491. `~/.hermes/.env`
502. `<brand root>/.env`
513. profile-local `~/.hermes/profiles/<name>/.env` only if explicitly configured
524. Do not assume `~/.env`, `/root/.env`, or the active shell’s exports
53
54The fallback script in `references/fal-lora-testing.md` hardcodes `~/.hermes/.env`.
55Override that path only when brand setup explicitly differs.
56
57## Output expectations
58
59- JSON array: one entry per style × subject.
60- Fields: `style`, `subject`, `prompt`, `request_id`, `final_status`, `image_url`.
61- Print summary counts by style at end.
62
63## Session package target
64
65After testing, create one index doc next to `references/fal-lora-testing.md`, e.g. `references/<brand>-style-shortlist.md`, containing:
66- Tiered shortlist
67- Direct style-page URLs
68- Trigger phrases
69- Final style-URL pairs for future hybrid fitting