Restore stable PromptStyler node

This commit is contained in:
Nid All
2026-03-07 12:56:41 +01:00
parent d3e3da791d
commit 60e84c559c
13 changed files with 3051 additions and 257 deletions
+2
View File
@@ -20,3 +20,5 @@ jobs:
run: python tools/validate_styles.py
- name: Audit styles
run: python tools/audit_styles.py
- name: Runtime regression tests
run: python -m unittest discover -s tests
+9 -3
View File
@@ -8,15 +8,21 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
### Added
- Search-based style resolution, color-grade overlays, style strength controls, and JSON debug metadata on the main node.
- `PromptStyler: Advanced Prompt -> Conditioning` for search-based style resolution, color-grade overlays, style strength controls, and JSON debug metadata.
- Shared `style_library.py` used by the runtime node and maintainer tooling.
- CI checks for version sync, style validation, and style audit.
- CI checks for version sync, style validation, style audit, and runtime regression tests.
- `tools/sync_legacy_styles.py` and `tools/version_sync.py` for compatibility snapshot and release metadata maintenance.
- New medium-first style packs: `styles/packs/32_print_reprographic.json`, `styles/packs/42_decorative_arts_material_processes.json`, and `styles/packs/43_digital_craft.json`.
- Expanded `styles/packs/36_mixed_media.json` to deepen the mixed-media family with 18 new tactile/process-driven styles.
- `STYLE_TAXONOMY.md` documenting pack purpose, target size, and routing rules for future additions.
- Runtime regression coverage for legacy prompt composition and conditioning validation.
### Changed
- `PromptStyler: Prompt -> Conditioning (Style Picker)` now uses the narrow legacy-compatible prompt-to-conditioning contract again for stability.
- Broken or non-finite conditioning now raises an explicit node error instead of silently returning a malformed output.
- `styles/styles_v1.json` is now treated as a generated compatibility snapshot of merged packs.
- README and maintainer documentation now describe the current search/composition behavior instead of hardcoded implementation details.
- README and maintainer documentation now describe the stable/advanced node split.
## [0.3.1] - 2026-01-31
+46 -73
View File
@@ -1,41 +1,24 @@
# ComfyUI PromptStyler
PromptStyler is a custom ComfyUI node that applies a curated style template to your positive prompt and outputs `CONDITIONING` for KSampler.
PromptStyler is a custom ComfyUI node pack for applying curated style templates to a positive prompt and returning `CONDITIONING` for KSampler.
The node stays lightweight in graphs, but it now supports three ways to resolve a style:
This release intentionally splits the runtime surface into a stable default node and an opt-in advanced node.
- dropdown selection
- direct `id` lookup
- offline search across style id, name, category, and tags
## Nodes
It also supports an optional color-grade overlay, search hints, and debug metadata without changing the existing node name or the first two outputs.
## Node
ComfyUI display name:
Stable node:
- `PromptStyler: Prompt -> Conditioning (Style Picker)`
- outputs: `positive`, `styled_prompt`
- behavior: legacy-compatible prompt composition and direct conditioning output
Outputs:
Advanced node:
- `positive` (`CONDITIONING`)
- `styled_prompt` (`STRING`)
- `resolved_style_id` (`STRING`)
- `resolved_style_meta` (`STRING`, JSON)
- `PromptStyler: Advanced Prompt -> Conditioning`
- outputs: `positive`, `styled_prompt`, `resolved_style_id`, `resolved_style_meta`
- behavior: search, overlays, stronger filtering controls, and JSON debug metadata
## What It Does
1. You enter a subject prompt.
2. PromptStyler resolves a base style from the dropdown, a style id, or a search query.
3. It applies the style to your prompt.
4. Optionally, it appends one `Color Grade*` overlay style.
5. It tokenizes the final prompt with the connected text encoder and returns `CONDITIONING`.
The default behavior remains compatible with older graphs:
- the node name is unchanged
- `style_id_override` still works in saved workflows
- default strength is `strong`, which preserves the prior full-style application behavior
Use the stable node unless you specifically need the advanced controls.
## Recommended Wiring
@@ -49,60 +32,45 @@ Connect:
- your text source -> `PromptStyler.prompt`
- `PromptStyler.positive` -> `KSampler.positive`
Use `styled_prompt` and `resolved_style_meta` for debugging when a style is not resolving the way you expect.
`styled_prompt` is the exact text that was encoded.
## Inputs
Core inputs:
## Stable Node Inputs
- `prompt`: your positive prompt
- `apply_style`: bypass styling while still encoding the prompt
- `style`: main dropdown entry in `Category | Name | id` format
- `template_variant`: `default` or any model-specific variant present in the style packs
- `style_id_override`: direct id selection, mainly useful with newly-added user styles
- `style`: dropdown entry in `Category | Name | id` format
- `template_variant`: `default` or any model-specific variant present in the packs
- `style_id_override`: direct id selection for newly-added or scripted styles
- `text_encoder`: connect from your checkpoint/model loader
Selection controls:
Stable node rules:
- `style_id_override` takes precedence over the dropdown when set
- `default` uses legacy comma-phrase composition and de-dupe behavior
- model-specific variants use their explicit variant text and otherwise fall back to `default`
- malformed conditioning now raises an explicit node error instead of silently returning a broken output
## Advanced Node Inputs
Core inputs are the same as the stable node, plus:
- `selection_mode`: `dropdown`, `search`, or `id`
- `style_search`: free-text style lookup used by `selection_mode=search`
- `style_search`: free-text search used by `selection_mode=search`
- `category_hint`: optional substring filter applied before search scoring
- `tag_hint`: optional comma-separated tag filter applied before search scoring
- `on_missing_style`: `error` or `passthrough`
Composition controls:
- `style_strength`: `subtle`, `normal`, or `strong`
- `dedupe_mode`: `smart` or `off`
- `overlay_style_id`: optional secondary style id, restricted to categories starting with `Color Grade`
- `on_missing_style`: `error` or `passthrough`
### Selection Behavior
Advanced node outputs:
- `dropdown`: uses the selected dropdown entry
- `id`: uses `style_id_override`
- `search`: scores exact id matches first, then exact name, then token matches across id, name, category, and tags
- `category_hint` and `tag_hint` narrow the candidate pool before scoring
- ambiguous searches fail with the top candidates listed in the error
### Composition Model
Recommended mental model:
- base style
- optional color-grade overlay
- optional search-based style resolution
`style_strength` only affects the default phrase-based variant:
- `subtle`: first 3 unique prefix phrases and first 3 unique suffix phrases
- `normal`: first 6 unique prefix phrases and first 6 unique suffix phrases
- `strong`: all phrases
`dedupe_mode=smart` only removes duplicate style-added phrases. It does not rewrite or collapse repeated phrases inside the user prompt.
- `resolved_style_id`: the final base style id that was resolved
- `resolved_style_meta`: JSON payload describing resolution inputs and composition details
## Style Library
Styles are loaded from JSON packs in filename order:
Primary runtime source:
- `styles/packs/*.json`
@@ -110,7 +78,7 @@ Compatibility snapshot:
- `styles/styles_v1.json`
Pack file naming uses numeric prefixes for merge order. Example:
Pack filenames use numeric prefixes for merge order, for example:
- `10_cinema.json`
- `96_color_grades.json`
@@ -187,16 +155,21 @@ Check release/version metadata consistency:
C:\Comfyui\python_embeded\python.exe .\tools\version_sync.py check
```
Run runtime regression tests:
```powershell
python -m unittest discover -s tests
```
## Troubleshooting
- Node does not appear:
- verify the folder is `ComfyUI/custom_nodes/ComfyUI_PromptStyler/`
- restart ComfyUI or reload custom nodes
- Search fails unexpectedly:
- Stable node returns an error instead of an image:
- inspect `styled_prompt`
- confirm the connected `text_encoder` matches the active model family
- if the error mentions invalid conditioning, compare the same `styled_prompt` through stock `CLIPTextEncode`
- Advanced search fails unexpectedly:
- relax `category_hint` and `tag_hint`
- use the `resolved_style_meta` output to inspect the resolution inputs and applied variant
- A saved graph should keep running while you edit packs:
- use `on_missing_style=passthrough` if you want the node to fall back to the raw prompt during live pack edits
- inspect `resolved_style_meta`
- Styles look stale:
- rerun `tools/sync_legacy_styles.py` or `tools/generate_style_packs.py`
- reload custom nodes in ComfyUI
@@ -209,4 +182,4 @@ Version metadata is managed from `VERSION`.
- `.release-please-manifest.json` should be synced from `VERSION` with `tools/version_sync.py write`
- `CHANGELOG.md` follows Keep a Changelog
See `RELEASING.md` for the maintainer flow.
See `RELEASING.md` for the maintainer flow.
+50
View File
@@ -0,0 +1,50 @@
# Style Taxonomy
This document defines how curated packs should be organized and expanded.
## Pack Policy
- Default organization is medium/process/material first.
- Target size per pack is 15-25 styles.
- Split a pack when it grows past about 30 styles or starts mixing unrelated subfamilies.
- Preserve existing style ids and visible category labels unless a migration is explicitly planned.
- Extend an existing pack when the new styles share the same medium or production logic.
- Create a new pack only when a coherent process family would otherwise become a grab bag inside an unrelated pack.
## Current Curated Packs
| Pack | Purpose | Categories Covered | Target Range |
| --- | --- | --- | --- |
| `10_cinema.json` | Film still, cinematography, and cinematic look packages | `Cinema` | 15-25 |
| `20_photography.json` | General photographic genres, techniques, and perspective looks | `Photography` | 25-35 |
| `21_photography_alt_process.json` | Darkroom and historical photographic chemistry/process looks | `Photography/Alt Process` | 15-25 |
| `30_illustration.json` | General hand-drawn, painted, manga, vector, pixel, and technical illustration styles | `Illustration`, `Anime/Manga`, `Pixel Art`, `Vector`, `Technical` | 25-35 |
| `31_printmaking_expanded.json` | Historical and fine-art printmaking processes | `Printmaking/Expanded` | 20-30 |
| `32_print_reprographic.json` | Mechanical duplication, proofing, repro, and press-surface looks | `Printmaking/Expanded`, `Photography/Alt Process`, `Graphic Design` | 14-22 |
| `34_fine_art_artists.json` | Artist-reference fine art styles | `Fine Art/Artists` | 20-30 |
| `35_fine_art.json` | Movement and material-led fine art styles | `Fine Art` | 25-35 |
| `36_mixed_media.json` | Layered, tactile, composite-media processes | `Mixed Media` | 20-30 |
| `37_street_art.json` | Street-applied paint, poster, and wall-surface styles | `Street Art` | 12-20 |
| `38_decorative_arts.json` | Core decorative crafts and surface-rich artisan media | `Decorative Arts` | 12-20 |
| `39_internet_aesthetics.json` | Mood-first internet aesthetic families | `Aesthetics/*` | 30-45 |
| `40_graphic_design.json` | Posters, layouts, branding, and print-graphic looks | `Graphic Design` | 25-35 |
| `41_decorative_arts_textiles.json` | Textile, fiber, and woven decorative processes | `Decorative Arts/Textiles` | 20-30 |
| `42_decorative_arts_material_processes.json` | Glass, ceramic, metal, cast, etched, and inlay process styles | `Decorative Arts` | 15-25 |
| `43_digital_craft.json` | Diagrammatic, vector, and constrained-color digital craft styles | `Technical`, `Vector`, `Pixel Art` | 12-20 |
| `50_3d_cg.json` | 3D, render, miniature-set, and CG material looks | `3D/CG` | 15-25 |
| `60_architecture_interior.json` | Architecture and interior presentation looks | `Architecture/Interior` | 15-25 |
| `70_fashion.json` | Fashion/editorial looks | `Fashion` | 12-20 |
| `80_product.json` | Product and commercial object presentation looks | `Product` | 10-18 |
| `90_nature.json` | Landscape and nature presentation looks | `Nature` | 12-20 |
| `95_experimental.json` | Abstract, prismatic, and process-bending visual styles | `Experimental` | 12-20 |
| `96_color_grades.json` | General color grade overlays | `Color Grade` | 15-25 |
| `97_color_grade_film_lab.json` | Film-lab process, scan, and stock-behavior overlays | `Color Grade/Film Lab` | 20-30 |
## Routing Rules For New Styles
- Add tactile layered work to `36_mixed_media.json` before considering any new mixed-media pack.
- Add glass, ceramic, metal, lacquer, and inlay surfaces to the decorative arts family before using `Fine Art` as a fallback.
- Add repro, proofing, duplication, and press artifacts to `32_print_reprographic.json` instead of scattering them across `Graphic Design` or `Experimental`.
- Add `Technical`, `Vector`, and `Pixel Art` growth to `43_digital_craft.json` so those categories stop living as incidental outliers inside the broad illustration pack.
- Use `39_internet_aesthetics.json` only when a style is fundamentally mood/subculture driven rather than process driven.
- Prefer extending an existing process family over creating a new pack with fewer than about 12 coherent styles.
+1
View File
@@ -17,6 +17,7 @@ Maintainer tooling:
- `tools/generate_style_packs.py`: curated pack generation plus legacy snapshot refresh
- `tools/sync_legacy_styles.py`: regenerate `styles/styles_v1.json` from merged packs
- `tools/version_sync.py`: check or write release metadata derived from `VERSION`
- `STYLE_TAXONOMY.md`: pack purpose, target size, and routing rules for future style additions
Data sources:
+226 -109
View File
@@ -1,67 +1,228 @@
from __future__ import annotations
from typing import Any, Dict, Tuple
try:
from .style_library import (
DEFAULT_VARIANT,
LOAD_POLICY_LENIENT,
StyleLibraryError,
StyleTemplate,
compose_prompt,
get_cached_style_library,
make_style_meta,
resolve_overlay_style,
resolve_style,
)
except ImportError:
from style_library import (
DEFAULT_VARIANT,
LOAD_POLICY_LENIENT,
StyleLibraryError,
StyleTemplate,
compose_prompt,
get_cached_style_library,
make_style_meta,
resolve_overlay_style,
resolve_style,
)
import json
import os
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Sequence, Tuple
def load_styles() -> Tuple[StyleTemplate, ...]:
return get_cached_style_library(load_policy=LOAD_POLICY_LENIENT).styles
_HERE = os.path.dirname(os.path.realpath(__file__))
_STYLES_PATH = os.path.join(_HERE, "styles", "styles_v1.json")
_STYLE_PACKS_DIR = os.path.join(_HERE, "styles", "packs")
def _norm_space(s: str) -> str:
return " ".join((s or "").replace("\r", " ").replace("\n", " ").split())
def _split_phrases(s: str, sep: str) -> List[str]:
s = _norm_space(s)
if not s:
return []
parts = [p.strip() for p in s.split(sep)]
return [p for p in parts if p]
def _dedupe_phrases(phrases: List[str]) -> List[str]:
# Stable de-dupe (case-insensitive) while preserving first occurrence.
seen = set()
out: List[str] = []
for p in phrases:
k = p.casefold()
if k in seen:
continue
seen.add(k)
out.append(p)
return out
@dataclass(frozen=True)
class StyleTemplate:
id: str
name: str
category: str
prefix: str
suffix: str
flux_prefix: str = ""
flux_suffix: str = ""
tags: Tuple[str, ...] = ()
_STYLE_CACHE_SIG: Optional[Tuple[Tuple[str, float, int], ...]] = None
_STYLE_CACHE_STYLES: Tuple[StyleTemplate, ...] = ()
_STYLE_CACHE_BY_ID: Dict[str, StyleTemplate] = {}
_STYLE_CACHE_CHOICES: List[str] = []
def _file_sig(path: str) -> Tuple[str, float, int]:
try:
st = os.stat(path)
return (path, float(st.st_mtime), int(st.st_size))
except OSError:
return (path, -1.0, -1)
def _iter_pack_paths() -> List[str]:
if not os.path.isdir(_STYLE_PACKS_DIR):
return []
out: List[str] = []
for name in sorted(os.listdir(_STYLE_PACKS_DIR)):
if name.lower().endswith(".json"):
out.append(os.path.join(_STYLE_PACKS_DIR, name))
return out
def _style_sources_sig(path: str = _STYLES_PATH) -> Tuple[Tuple[str, float, int], ...]:
pack_paths = _iter_pack_paths()
# Include the legacy file in the signature even when packs exist, since we
# may fall back to it if packs are empty/broken.
sources = (pack_paths + [path]) if pack_paths else [path]
return tuple(_file_sig(p) for p in sources)
def _load_styles_file(path: str) -> List[Dict[str, Any]]:
with open(path, "r", encoding="utf-8") as f:
data = json.load(f) or {}
if not isinstance(data, dict):
return []
styles = data.get("styles", []) or []
if not isinstance(styles, list):
return []
return [s for s in styles if isinstance(s, dict)]
def _load_style_sources(path: str = _STYLES_PATH) -> List[Dict[str, Any]]:
# Supports either a single monolithic JSON (styles_v1.json) or multiple packs
# in styles/packs/*.json. If packs exist, they are merged (in filename order).
pack_paths = _iter_pack_paths()
if not pack_paths:
try:
return _load_styles_file(path)
except Exception as e:
print(f"PromptStyler: ERROR: unable to read styles file: {path} ({e})")
return []
merged: List[Dict[str, Any]] = []
for p in pack_paths:
try:
part = _load_styles_file(p)
except Exception as e:
print(f"PromptStyler: WARN: unable to read style pack: {p} ({e})")
continue
if not part:
# Empty packs are allowed; keep going.
continue
merged.extend(part)
# If packs exist but none were usable, fall back to the legacy file so the node still loads.
if not merged:
try:
legacy = _load_styles_file(path)
except Exception as e:
print(
f"PromptStyler: ERROR: no usable style packs found and unable to read legacy file: {path} ({e})"
)
return []
if legacy:
print(f"PromptStyler: WARN: no styles loaded from packs; falling back to legacy file: {path}")
return legacy
return merged
def _get_style_library(path: str = _STYLES_PATH) -> Tuple[Tuple[StyleTemplate, ...], Dict[str, StyleTemplate], List[str]]:
global _STYLE_CACHE_SIG, _STYLE_CACHE_STYLES, _STYLE_CACHE_BY_ID, _STYLE_CACHE_CHOICES
sig = _style_sources_sig(path)
if sig == _STYLE_CACHE_SIG:
return _STYLE_CACHE_STYLES, _STYLE_CACHE_BY_ID, _STYLE_CACHE_CHOICES
raw_styles = _load_style_sources(path)
styles: List[StyleTemplate] = []
for raw in raw_styles:
sid = raw.get("id")
name = raw.get("name")
if sid is None or name is None:
continue
default = raw.get("default", {}) or {}
if not isinstance(default, dict):
default = {}
models = raw.get("models", {}) or {}
if not isinstance(models, dict):
models = {}
flux = models.get("flux_2_klein", {}) or {}
if not isinstance(flux, dict):
flux = {}
tmpl = StyleTemplate(
id=str(sid),
name=str(name),
category=str(raw.get("category", "Uncategorized")),
prefix=str(default.get("prefix", "")),
suffix=str(default.get("suffix", "")),
flux_prefix=str(flux.get("prefix", "") or ""),
flux_suffix=str(flux.get("suffix", "") or ""),
tags=tuple(raw.get("tags", []) or []),
)
styles.append(tmpl)
by_id = {s.id: s for s in styles}
choices = _choices_for_styles(styles) if styles else ["(no styles found) | (no styles) | __none__"]
_STYLE_CACHE_SIG = sig
_STYLE_CACHE_STYLES = tuple(styles)
_STYLE_CACHE_BY_ID = by_id
_STYLE_CACHE_CHOICES = choices
return _STYLE_CACHE_STYLES, _STYLE_CACHE_BY_ID, _STYLE_CACHE_CHOICES
def load_styles(path: str = _STYLES_PATH) -> Tuple[StyleTemplate, ...]:
styles, _by_id, _choices = _get_style_library(path)
return styles
def _choices_for_styles(styles: Sequence[StyleTemplate]) -> List[str]:
# One big dropdown, but sorted + categorized to make it browsable.
# Format is stable and easy to parse: "Category | Name | id"
styles_sorted = sorted(styles, key=lambda s: (s.category.casefold(), s.name.casefold(), s.id))
return [f"{s.category} | {s.name} | {s.id}" for s in styles_sorted]
def _style_by_choice(styles: Sequence[StyleTemplate], choice: str) -> Optional[StyleTemplate]:
if not choice:
return None
# Choice format: "Category | Name | id"
sid = choice.rsplit("|", 1)[-1].strip()
for s in styles:
if s.id == sid:
return s
return None
class PromptStylerConditioning:
"""
One-node UX: pick one style, optionally refine the selection/search behavior,
then output CONDITIONING for KSampler "positive".
One-node UX: pick ONE style (from a categorized dropdown), apply it to the
user's prompt, and output CONDITIONING for KSampler "positive".
"""
@classmethod
def INPUT_TYPES(cls) -> Dict[str, Any]:
library = get_cached_style_library(load_policy=LOAD_POLICY_LENIENT)
styles, _by_id, choices = _get_style_library()
return {
"required": {
# Prompt is the main input; CLIP is just a wire from your model loader.
"prompt": ("STRING", {"multiline": True, "default": ""}),
"apply_style": ("BOOLEAN", {"default": True}),
"style": (library.choices,),
"template_variant": (list(library.variants),),
"style": (choices,),
"template_variant": (["default", "flux_2_klein"],),
"style_id_override": ("STRING", {"multiline": False, "default": ""}),
"text_encoder": ("CLIP",),
"selection_mode": (["dropdown", "search", "id"], {"default": "dropdown"}),
"style_search": ("STRING", {"multiline": False, "default": ""}),
"category_hint": ("STRING", {"multiline": False, "default": ""}),
"tag_hint": ("STRING", {"multiline": False, "default": ""}),
"style_strength": (["subtle", "normal", "strong"], {"default": "strong"}),
"dedupe_mode": (["smart", "off"], {"default": "smart"}),
"overlay_style_id": ("STRING", {"multiline": False, "default": ""}),
"on_missing_style": (["error", "passthrough"], {"default": "error"}),
}
}
RETURN_TYPES = ("CONDITIONING", "STRING", "STRING", "STRING")
RETURN_NAMES = ("positive", "styled_prompt", "resolved_style_id", "resolved_style_meta")
RETURN_TYPES = ("CONDITIONING", "STRING")
RETURN_NAMES = ("positive", "styled_prompt")
FUNCTION = "encode"
CATEGORY = "PromptStyler"
@@ -73,85 +234,41 @@ class PromptStylerConditioning:
template_variant: str,
style_id_override: str,
text_encoder,
selection_mode: str,
style_search: str,
category_hint: str,
tag_hint: str,
style_strength: str,
dedupe_mode: str,
overlay_style_id: str,
on_missing_style: str,
):
if text_encoder is None:
raise RuntimeError("ERROR: text_encoder input is invalid: None")
prompt = prompt or ""
chosen_style = None
overlay_style = None
resolved_style_id = ""
applied_variant = DEFAULT_VARIANT
error = ""
prompt_details: Dict[str, Any] = {}
if not apply_style:
styled_prompt = prompt
else:
library = get_cached_style_library(load_policy=LOAD_POLICY_LENIENT)
try:
chosen_style = resolve_style(
library,
selection_mode=selection_mode,
choice=style,
style_id_override=style_id_override,
style_search=style_search,
category_hint=category_hint,
tag_hint=tag_hint,
)
resolved_style_id = chosen_style.id
except StyleLibraryError as exc:
if on_missing_style != "passthrough":
raise ValueError(str(exc))
error = str(exc)
styled_prompt = prompt
chosen_style = None
styles, by_id, _choices = _get_style_library()
style_id_override = (style_id_override or "").strip()
if style_id_override:
chosen = by_id.get(style_id_override)
if chosen is None:
raise ValueError(f"Unknown style_id_override: {style_id_override}")
else:
try:
overlay_style = resolve_overlay_style(library, overlay_style_id)
except StyleLibraryError as exc:
if on_missing_style != "passthrough":
raise ValueError(str(exc))
error = str(exc)
overlay_style = None
chosen = _style_by_choice(styles, style)
if chosen is None:
raise ValueError("No style selected.")
styled_prompt, prompt_details = compose_prompt(
prompt,
chosen_style,
template_variant=template_variant,
style_strength=style_strength,
dedupe_mode=dedupe_mode,
overlay_style=overlay_style,
)
applied_variant = str(prompt_details.get("variant", DEFAULT_VARIANT))
if template_variant == "flux_2_klein" and (chosen.flux_prefix.strip() or chosen.flux_suffix.strip()):
styled_prompt = _norm_space(" ".join([prompt, chosen.flux_prefix, chosen.flux_suffix]))
else:
sep = ", "
prefix_phrases = _split_phrases(chosen.prefix, sep=sep)
prompt_phrases = _split_phrases(prompt, sep=sep)
suffix_phrases = _split_phrases(chosen.suffix, sep=sep)
resolved_style_meta = make_style_meta(
chosen_style=chosen_style,
overlay_style=overlay_style,
requested_variant=template_variant,
applied_variant=applied_variant,
selection_mode=selection_mode,
style_search=style_search,
category_hint=category_hint,
tag_hint=tag_hint,
style_strength=style_strength,
dedupe_mode=dedupe_mode,
on_missing_style=on_missing_style,
prompt_details=prompt_details,
error=error,
)
phrases = _dedupe_phrases(prefix_phrases + prompt_phrases + suffix_phrases)
styled_prompt = sep.join([p for p in phrases if p])
tokens = text_encoder.tokenize(styled_prompt)
conditioning = text_encoder.encode_from_tokens_scheduled(tokens)
return (conditioning, styled_prompt, resolved_style_id, resolved_style_meta)
return (conditioning, styled_prompt)
NODE_CLASS_MAPPINGS = {
@@ -160,4 +277,4 @@ NODE_CLASS_MAPPINGS = {
NODE_DISPLAY_NAME_MAPPINGS = {
"PromptStylerConditioning": "PromptStyler: Prompt -> Conditioning (Style Picker)",
}
}
+48
View File
@@ -476,6 +476,25 @@ def style_by_choice(styles: Sequence[StyleTemplate], choice: str) -> Optional[St
return None
def resolve_style_legacy(
library: StyleLibrary,
*,
choice: str,
style_id_override: str,
) -> StyleTemplate:
style_id_override = (style_id_override or "").strip()
if style_id_override:
chosen = library.by_id.get(style_id_override)
if chosen is None:
raise StyleLibraryError(f"Unknown style_id_override: {style_id_override}")
return chosen
chosen = style_by_choice(library.styles, choice)
if chosen is None:
raise StyleLibraryError("No style selected.")
return chosen
def parse_tag_hint(value: str) -> Tuple[str, ...]:
if not value:
return ()
@@ -731,6 +750,35 @@ def compose_prompt(
}
def compose_prompt_legacy(
prompt: str,
style: StyleTemplate,
*,
template_variant: str,
) -> Tuple[str, Dict[str, Any]]:
prompt = prompt or ""
applied_variant, prefix, suffix = style.variant_prompt(template_variant)
if applied_variant != DEFAULT_VARIANT:
styled_prompt = norm_space(" ".join(part for part in (prompt, prefix, suffix) if part))
return styled_prompt, {
"variant": applied_variant,
"base_prefix_phrases": [],
"base_suffix_phrases": [],
}
prefix_phrases = split_phrases(style.prefix)
prompt_phrases = split_phrases(prompt)
suffix_phrases = split_phrases(style.suffix)
phrases = dedupe_phrases(prefix_phrases + prompt_phrases + suffix_phrases)
styled_prompt = DEFAULT_PHRASE_SEPARATOR.join(phrase for phrase in phrases if phrase)
return styled_prompt, {
"variant": DEFAULT_VARIANT,
"base_prefix_phrases": prefix_phrases,
"base_suffix_phrases": suffix_phrases,
}
def is_color_grade_style(style: StyleTemplate) -> bool:
return style.category.startswith("Color Grade")
+285
View File
@@ -0,0 +1,285 @@
{
"version": 1,
"styles": [
{
"id": "repro_mimeograph_duplication",
"name": "Reprographic: Mimeograph Duplication",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, mimeograph duplication, stencil master, inked drum texture, duplicated sheets",
"suffix": "slight misregistration, inky density shifts, porous paper texture, office-print rhythm, paper texture, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mimeograph duplication with stencil-master imperfections. Lighting: flat even light preserving paper and ink density variation. Texture: inked drum transfer, porous paper, and repeated-sheet inconsistency. Key cues: mimeograph duplication, stencil master, inked drum texture, duplicated sheets. Finish cues: slight misregistration, inky density shifts, porous paper texture, office-print rhythm. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"mimeograph",
"print"
]
},
{
"id": "repro_spirit_duplicator_copy",
"name": "Reprographic: Spirit Duplicator",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, spirit duplicator copy, purple aniline tones, soft duplicate texturing, school-office print",
"suffix": "lavender cast, soft edges, faded pressure transfer, paper softness, paper texture, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: spirit-duplicator copy with characteristic purple cast. Lighting: flat diffuse light that keeps the faded duplicate texture legible. Texture: soft transfer edges, pale dye density, and absorbent paper. Key cues: spirit duplicator copy, purple aniline tones, soft duplicate texturing, school-office print. Finish cues: lavender cast, soft edges, faded pressure transfer, paper softness. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"spirit_duplicator",
"print"
]
},
{
"id": "repro_diazo_blueprint",
"name": "Reprographic: Diazo Blueprint",
"category": "Photography/Alt Process",
"default": {
"prefix": "cyanotype print, blueprint blue, pale white linework, coated paper texture, graphic plan aesthetic",
"suffix": "paper grain, soft process fading, crisp line edges, matte coated sheet, controlled contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: cyanotype-like blueprint print with pale linework on deep blue paper. Lighting: flat even light preserving paper grain and line clarity. Texture: matte coated paper, soft process fading, and crisp pale lines. Key cues: blueprint blue, pale white linework, coated paper texture, graphic plan aesthetic. Finish cues: paper grain, soft process fading, crisp line edges, matte coated sheet. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"diazo",
"blueprint"
]
},
{
"id": "repro_whiteprint_copy",
"name": "Reprographic: Whiteprint Copy",
"category": "Photography/Alt Process",
"default": {
"prefix": "whiteprint aesthetic, pale paper ground, soft blue linework, engineering-print look, matte sheet texture",
"suffix": "fine paper grain, faint blue tint, clean line edges, document paper wear, restrained contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: whiteprint-style reproduction with blue linework on pale paper. Lighting: neutral even light preserving line clarity and sheet texture. Texture: matte paper, faint blue tint, and lightly worn print edges. Key cues: pale paper ground, soft blue linework, engineering-print look, matte sheet texture. Finish cues: fine paper grain, faint blue tint, clean line edges, document paper wear. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"whiteprint",
"technical_copy"
]
},
{
"id": "repro_offset_litho_misregistration",
"name": "Reprographic: Offset Misregistration",
"category": "Graphic Design",
"default": {
"prefix": "offset print look, slight CMYK drift, layered overprint color, poster ink texture, graphic print surface",
"suffix": "registration drift, ink overlap edges, paper tooth, press imperfection texture, bold printed contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: offset print with slight CMYK misregistration and overprinted color layers. Lighting: flat print-preview light with minimal shading. Texture: paper tooth, ink overlap edges, and gentle press drift. Key cues: offset print look, slight CMYK drift, layered overprint color, poster ink texture. Finish cues: registration drift, ink overlap edges, paper tooth, press imperfection texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"offset",
"graphic"
]
},
{
"id": "repro_newsprint_halftone",
"name": "Reprographic: Newsprint Halftone",
"category": "Graphic Design",
"default": {
"prefix": "newsprint print look, coarse halftone dots, absorbent paper stock, editorial print texture, monochrome or limited color",
"suffix": "dot gain, soft ink spread, paper fuzz, cheap stock texture, gritty printed contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: newsprint reproduction with coarse halftone dots and absorbent paper texture. Lighting: flat editorial light keeping dot structure readable. Texture: dot gain, soft ink spread, and cheap stock fuzz. Key cues: coarse halftone dots, absorbent paper stock, editorial print texture, limited-color print. Finish cues: dot gain, soft ink spread, paper fuzz, cheap stock texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"newsprint",
"halftone"
]
},
{
"id": "repro_xerox_zine_photocopy",
"name": "Reprographic: Xerox Zine Photocopy",
"category": "Graphic Design",
"default": {
"prefix": "photocopy zine aesthetic, stark black toner, rough collage print, DIY copy-art texture, matte office paper",
"suffix": "toner speckle, edge shadowing, paper curl, rough copy texture, gritty contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: photocopy zine print with stark black toner and rough copy-art texture. Lighting: flat copy-table light with no dramatic shading. Texture: toner speckle, edge shadowing, and matte office paper curl. Key cues: photocopy zine aesthetic, stark black toner, rough collage print, DIY copy-art texture. Finish cues: toner speckle, edge shadowing, paper curl, rough copy texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"photocopy",
"zine"
]
},
{
"id": "repro_carbon_copy_manifold",
"name": "Reprographic: Carbon Copy Manifold",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, carbon copy manifold, pressure transfer typing, duplicate form, ghosted text impression",
"suffix": "soft duplicate offset, paper stack pressure marks, form-stock texture, typed imprint feel, paper texture, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: carbon-copy manifold form with pressure-transferred duplicate impression. Lighting: neutral even light revealing paper stack pressure and duplicate offset. Texture: soft transfer, form-stock grain, and faint stacked-sheet marks. Key cues: carbon copy manifold, pressure transfer typing, duplicate form, ghosted text impression. Finish cues: soft duplicate offset, paper stack pressure marks, form-stock texture, typed imprint feel. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"carbon_copy",
"office_print"
]
},
{
"id": "repro_contact_sheet_proof",
"name": "Reprographic: Contact Sheet Proof",
"category": "Photography/Alt Process",
"default": {
"prefix": "contact-sheet darkroom print, small photo borders, glossy proof paper, analog print-sheet aesthetic",
"suffix": "glossy paper sheen, narrow frame borders, archival print texture, soft darkroom proof feel"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: darkroom contact-sheet print with small bordered frames and glossy proof paper. Lighting: soft even light preserving paper sheen and border traces. Texture: glossy proof paper, archival print surface, and subtle frame spacing. Key cues: contact-sheet darkroom print, small photo borders, glossy proof paper, analog print-sheet aesthetic. Finish cues: glossy paper sheen, narrow frame borders, archival print texture, soft darkroom proof feel. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"contact_sheet",
"analog_print"
]
},
{
"id": "repro_rotogravure_ink_pattern",
"name": "Reprographic: Rotogravure Ink Pattern",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, rotogravure print, copper-cell ink pattern, smooth tonal reproduction, press cylinder texture",
"suffix": "fine cell grain, velvety darks, printed paper texture, high-volume press character, paper texture, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: rotogravure reproduction with smooth tonal printing and fine cell patterning. Lighting: flat print-preview light preserving tonal reproduction and cell grain. Texture: velvety darks, fine gravure grain, and coated paper response. Key cues: rotogravure print, copper-cell ink pattern, smooth tonal reproduction, press cylinder texture. Finish cues: fine cell grain, velvety darks, printed paper texture, high-volume press character. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"rotogravure",
"print"
]
},
{
"id": "repro_cmyk_registration_proof",
"name": "Reprographic: CMYK Registration Proof",
"category": "Graphic Design",
"default": {
"prefix": "CMYK proof print, layered process color, slight registration drift, print-shop proof texture, offset ink surface",
"suffix": "ink alignment variation, paper tooth, printed color layering, proof-sheet texture, clean graphic contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: CMYK proof print with layered process color and slight registration drift. Lighting: neutral inspection light with minimal glare. Texture: paper tooth, printed color layering, and subtle alignment variation. Key cues: CMYK proof print, layered process color, slight registration drift, print-shop proof texture. Finish cues: ink alignment variation, paper tooth, printed color layering, proof-sheet texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"cmyk",
"proof"
]
},
{
"id": "repro_thermographic_raised_ink",
"name": "Reprographic: Thermographic Raised Ink",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, thermographic raised ink, powder-fused lettering, slight gloss, printed stationery",
"suffix": "raised ink relief, subtle sheen, paper texture, formal print finish, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: thermographic print with powder-fused raised ink. Lighting: soft raking light revealing slight relief and glossy edges. Texture: raised lettering, subtle sheen, and fine stationery stock. Key cues: thermographic raised ink, powder-fused lettering, slight gloss, printed stationery. Finish cues: raised ink relief, subtle sheen, paper texture, formal print finish. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"thermography",
"raised_ink"
]
},
{
"id": "repro_rubber_stamp_overprint",
"name": "Reprographic: Rubber Stamp Overprint",
"category": "Printmaking/Expanded",
"default": {
"prefix": "printmaking, ink on paper, handcrafted texture, carved lines, high contrast, rubber stamp overprint, layered ink stamps, imperfect repeat, manual registration",
"suffix": "ink pooling, stamp edge chatter, paper tooth, hand-pressed irregularity, paper texture, ink texture, rough edges, high contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: rubber-stamped overprint with imperfect manual registration. Lighting: flat diffuse light preserving ink pooling and stamp edge chatter. Texture: hand-pressed irregularity, paper tooth, and layered ink density. Key cues: rubber stamp overprint, layered ink stamps, imperfect repeat, manual registration. Finish cues: ink pooling, stamp edge chatter, paper tooth, hand-pressed irregularity. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"rubber_stamp",
"overprint"
]
},
{
"id": "repro_dot_gain_press_sheet",
"name": "Reprographic: Dot Gain Press Sheet",
"category": "Graphic Design",
"default": {
"prefix": "screened print texture, dot gain, soft ink spread, absorbent press paper, calibration-print look",
"suffix": "softened dot edges, paper absorbency, density variation, press-sheet texture, matte printed surface"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: screened print showing dot gain and soft ink spread on absorbent paper. Lighting: neutral inspection light that keeps screened texture readable. Texture: softened dot edges, density variation, and matte press paper. Key cues: screened print texture, dot gain, soft ink spread, absorbent press paper. Finish cues: softened dot edges, paper absorbency, density variation, press-sheet texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"reprographic",
"dot_gain",
"press"
]
}
]
}
+396 -36
View File
@@ -1,6 +1,278 @@
{
"version": 1,
"styles": [
{
"id": "mixed_acrylic_sgraffito_ground",
"name": "Acrylic Sgraffito Ground",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, acrylic sgraffito, scraped paint layers, revealed underpainting, layered acrylic ground",
"suffix": "incised grooves, color reveal, matte paint texture, layered scraping marks, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media acrylic surface worked with sgraffito scraping. Lighting: soft raking light that catches incised grooves and revealed color layers. Texture: matte acrylic, scraped channels, and exposed underpainting. Key cues: acrylic sgraffito, scraped paint layers, revealed underpainting, layered acrylic ground. Finish cues: incised grooves, color reveal, matte paint texture, layered scraping marks. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"sgraffito",
"acrylic"
]
},
{
"id": "mixed_assemblage_artwork",
"name": "Assemblage Artwork",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, assemblage, found objects, mixed materials, handcrafted",
"suffix": "tactile texture, rough surfaces, layered depth, high detail, paper grain, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: assemblage artwork built from found objects and mixed materials. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: rough surfaces, layered depth, tactile materials. Key cues: assemblage, found objects, mixed materials, handcrafted. Finish cues: tactile texture, rough surfaces, layered depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
]
},
{
"id": "mixed_cyanotype_print_analog",
"name": "Cyanotype Print (Analog)",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, cyanotype print, blue monochrome, sun print, paper texture",
"suffix": "grain, chemical texture, vintage print, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: analog cyanotype print on paper. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Mood: minimal, photographic, deep blue. Key cues: cyanotype print, blue monochrome, sun print, paper texture. Finish cues: grain, chemical texture, vintage print. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
]
},
{
"id": "mixed_decollage_poster_peel",
"name": "Decollage Poster Peel",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, decollage poster peel, torn poster layers, weathered paste, exposed underlayers",
"suffix": "ragged tears, glue residue, paper strata, urban paper texture, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media decollage with peeled poster layers and exposed strata. Lighting: flat daylight that keeps the layered tears and residue readable. Texture: ragged tears, glue residue, and stacked paper history. Key cues: decollage poster peel, torn poster layers, weathered paste, exposed underlayers. Finish cues: ragged tears, glue residue, paper strata, urban paper texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"decollage",
"paper"
]
},
{
"id": "mixed_encaustic_collage",
"name": "Encaustic Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, encaustic collage, translucent wax layers, embedded paper fragments, scraped surface",
"suffix": "wax bloom, subtle crackle, tactile depth, layered translucency, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media encaustic collage with embedded paper fragments. Lighting: soft gallery light with gentle falloff and mild surface sheen. Texture: translucent wax layers, scraped marks, and tactile depth. Key cues: encaustic collage, translucent wax layers, embedded paper fragments, scraped surface. Finish cues: wax bloom, subtle crackle, tactile depth, layered translucency. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"encaustic",
"collage"
]
},
{
"id": "mixed_fabric_scrap_collage",
"name": "Fabric Scrap Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, fabric scrap collage, stitched textile fragments, raw edges, patchwork layering",
"suffix": "frayed fibers, cloth weave, stitched joins, soft tactile depth, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media collage assembled from layered textile scraps. Lighting: soft diffuse light revealing cloth weave and stitched joins. Texture: frayed fibers, raw edges, and patchwork depth. Key cues: fabric scrap collage, stitched textile fragments, raw edges, patchwork layering. Finish cues: frayed fibers, cloth weave, stitched joins, soft tactile depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"fabric",
"collage"
]
},
{
"id": "mixed_foil_leaf_overlay",
"name": "Foil Leaf Overlay",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, foil leaf overlay, metal leaf fragments, mixed surface, hand-applied shimmer",
"suffix": "broken foil edges, micro-reflections, adhesive texture, layered contrast, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media surface with hand-applied foil leaf overlays. Lighting: controlled light that catches metallic fragments without blowing them out. Texture: broken foil edges, adhesive texture, and small reflective flashes. Key cues: foil leaf overlay, metal leaf fragments, mixed surface, hand-applied shimmer. Finish cues: broken foil edges, micro-reflections, adhesive texture, layered contrast. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"foil",
"leaf"
]
},
{
"id": "mixed_frottage_rubbing_study",
"name": "Frottage Rubbing Study",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, frottage rubbing, found-surface textures, graphite transfer, pressure marks",
"suffix": "rubbed grain, uneven density, paper drag marks, tactile impressions, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media frottage study built from rubbed surface textures. Lighting: soft raking light that reveals paper tooth and rubbing variation. Texture: transferred grain, pressure marks, and uneven graphite density. Key cues: frottage rubbing, found-surface textures, graphite transfer, pressure marks. Finish cues: rubbed grain, uneven density, paper drag marks, tactile impressions. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"frottage",
"rubbing"
]
},
{
"id": "mixed_gel_medium_image_transfer",
"name": "Gel Medium Image Transfer",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, gel medium image transfer, lifted image layers, translucent medium, paper support",
"suffix": "soft edge lifting, adhesive sheen, surface irregularities, layered translucency, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media gel-medium transfer with lifted translucent image layers. Lighting: soft gallery light with enough angle to reveal transfer texture. Texture: adhesive sheen, edge lifting, and layered translucent film. Key cues: gel medium image transfer, lifted image layers, translucent medium, paper support. Finish cues: soft edge lifting, adhesive sheen, surface irregularities, layered translucency. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"transfer",
"acrylic"
]
},
{
"id": "mixed_gel_plate_monoprint",
"name": "Gel Plate Monoprint",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, gel plate monoprint, ink layers, brayer texture, printmaking",
"suffix": "paper grain, ink transfer artifacts, handmade print, high detail, tactile texture, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: gel plate monoprint with layered ink textures. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: ink transfer artifacts, paper grain, layered prints. Key cues: gel plate monoprint, ink layers, brayer texture, printmaking. Finish cues: paper grain, ink transfer artifacts, handmade print. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
]
},
{
"id": "mixed_gesso_charcoal_board",
"name": "Gesso and Charcoal Board",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, gesso ground, charcoal marks, chalky board surface, erased highlights",
"suffix": "powdery smudge, toothy ground, lifted erasures, matte surface, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media board with gesso ground and charcoal drawing. Lighting: soft studio light revealing chalky tooth and erased highlights. Texture: powdery charcoal, matte gesso, and lifted erasure marks. Key cues: gesso ground, charcoal marks, chalky board surface, erased highlights. Finish cues: powdery smudge, toothy ground, lifted erasures, matte surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"gesso",
"charcoal"
]
},
{
"id": "mixed_handmade_paper_pulp_relief",
"name": "Handmade Paper Pulp Relief",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, handmade paper pulp, cast relief, fibrous surface, pressed pulp forms",
"suffix": "deckled edges, fiber clumps, raised paper relief, soft shadow depth, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media handmade paper relief with cast pulp forms. Lighting: soft raking light to reveal paper relief and deckled edges. Texture: fibrous pulp, soft relief shadows, and visible paper formation. Key cues: handmade paper pulp, cast relief, fibrous surface, pressed pulp forms. Finish cues: deckled edges, fiber clumps, raised paper relief, soft shadow depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"paper",
"relief"
]
},
{
"id": "mixed_mixed_media_acrylic_ink",
"name": "Mixed Media Acrylic + Ink",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, mixed media, acrylic paint, ink linework, layered marks",
"suffix": "texture paste, splatter, handmade imperfections, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media artwork combining acrylic paint and ink linework. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: layered paint, ink marks, tactile surface. Key cues: mixed media, acrylic paint, ink linework, layered marks. Finish cues: texture paste, splatter, handmade imperfections. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
]
},
{
"id": "mixed_monoprint_collage",
"name": "Monoprint Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, monoprint collage, ink pull textures, layered cut paper, one-off print fragments",
"suffix": "brayer texture, ink ghosts, paper layering, soft registration drift, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media collage assembled from monoprint pulls and paper fragments. Lighting: soft gallery light keeping ink texture and layered edges visible. Texture: brayer marks, ink ghosts, and collage depth. Key cues: monoprint collage, ink pull textures, layered cut paper, one-off print fragments. Finish cues: brayer texture, ink ghosts, paper layering, soft registration drift. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"monoprint",
"collage"
]
},
{
"id": "mixed_paper_collage_mixed_media",
"name": "Paper Collage (Mixed Media)",
@@ -38,75 +310,63 @@
]
},
{
"id": "mixed_mixed_media_acrylic_ink",
"name": "Mixed Media Acrylic + Ink",
"id": "mixed_resin_sealed_collage",
"name": "Resin-Sealed Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, mixed media, acrylic paint, ink linework, layered marks",
"suffix": "texture paste, splatter, handmade imperfections, high detail, tactile texture, paper grain, layered depth, cohesive composition"
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, resin-sealed collage, encapsulated layers, embedded fragments, glossy surface",
"suffix": "glass-like sheen, suspended depth, trapped inclusions, smooth surface reflections, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media artwork combining acrylic paint and ink linework. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: layered paint, ink marks, tactile surface. Key cues: mixed media, acrylic paint, ink linework, layered marks. Finish cues: texture paste, splatter, handmade imperfections. Instruction: preserve the user prompt subject and add only stylistic cues."
"suffix": "Style: mixed media collage sealed under a glossy resin layer. Lighting: controlled light with smooth reflections and visible embedded depth. Texture: glass-like sheen, suspended fragments, and encapsulated layers. Key cues: resin-sealed collage, encapsulated layers, embedded fragments, glossy surface. Finish cues: glass-like sheen, suspended depth, trapped inclusions, smooth surface reflections. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
"mixed_media",
"resin",
"collage"
]
},
{
"id": "mixed_gel_plate_monoprint",
"name": "Gel Plate Monoprint",
"id": "mixed_sand_pigment_ground",
"name": "Sand and Pigment Ground",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, gel plate monoprint, ink layers, brayer texture, printmaking",
"suffix": "paper grain, ink transfer artifacts, handmade print, high detail, tactile texture, layered depth, cohesive composition"
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, sand and pigment ground, granular surface, earth pigments, rough substrate",
"suffix": "gritty relief, dry brush drag, mineral texture, matte layered surface, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: gel plate monoprint with layered ink textures. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: ink transfer artifacts, paper grain, layered prints. Key cues: gel plate monoprint, ink layers, brayer texture, printmaking. Finish cues: paper grain, ink transfer artifacts, handmade print. Instruction: preserve the user prompt subject and add only stylistic cues."
"suffix": "Style: mixed media surface built from sanded ground and dry pigments. Lighting: raking light to reveal granular relief and dry brush drag. Texture: mineral grit, matte layering, and rough substrate variation. Key cues: sand and pigment ground, granular surface, earth pigments, rough substrate. Finish cues: gritty relief, dry brush drag, mineral texture, matte layered surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
"mixed_media",
"sand",
"pigment"
]
},
{
"id": "mixed_cyanotype_print_analog",
"name": "Cyanotype Print (Analog)",
"id": "mixed_scratchboard_ink_wash",
"name": "Scratchboard Ink Wash",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, cyanotype print, blue monochrome, sun print, paper texture",
"suffix": "grain, chemical texture, vintage print, high detail, tactile texture, paper grain, layered depth, cohesive composition"
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, scratchboard, ink wash, scraped highlights, black ground",
"suffix": "incised lines, white reveal marks, ink pooling, high contrast surface, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: analog cyanotype print on paper. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Mood: minimal, photographic, deep blue. Key cues: cyanotype print, blue monochrome, sun print, paper texture. Finish cues: grain, chemical texture, vintage print. Instruction: preserve the user prompt subject and add only stylistic cues."
"suffix": "Style: scratchboard mixed media with ink wash and scraped highlights. Lighting: controlled studio light emphasizing incised lines and contrast. Texture: sharp reveal marks, pooled ink, and a dense black ground. Key cues: scratchboard, ink wash, scraped highlights, black ground. Finish cues: incised lines, white reveal marks, ink pooling, high contrast surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
]
},
{
"id": "mixed_assemblage_artwork",
"name": "Assemblage Artwork",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, assemblage, found objects, mixed materials, handcrafted",
"suffix": "tactile texture, rough surfaces, layered depth, high detail, paper grain, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: assemblage artwork built from found objects and mixed materials. Lighting: soft gallery spotlights with gentle falloff and controlled highlights. Texture: rough surfaces, layered depth, tactile materials. Key cues: assemblage, found objects, mixed materials, handcrafted. Finish cues: tactile texture, rough surfaces, layered depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media"
"mixed_media",
"scratchboard",
"ink"
]
},
{
@@ -126,6 +386,106 @@
"tags": [
"mixed_media"
]
},
{
"id": "mixed_thread_stitched_paper_collage",
"name": "Thread-Stitched Paper Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, thread-stitched paper collage, pierced paper, visible seams, layered cut paper",
"suffix": "thread relief, needle holes, paper grain, hand-sewn irregularity, high detail, tactile texture, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media paper collage held together with visible stitched seams. Lighting: soft raking light that reveals thread relief and pierced paper. Texture: needle holes, paper grain, and hand-sewn irregularity. Key cues: thread-stitched paper collage, pierced paper, visible seams, layered cut paper. Finish cues: thread relief, needle holes, paper grain, hand-sewn irregularity. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"thread",
"paper"
]
},
{
"id": "mixed_tissue_paper_layering",
"name": "Tissue Paper Layering",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, tissue paper layering, translucent color veils, wrinkled paper films, stacked fragments",
"suffix": "soft wrinkles, color veiling, feathered overlap edges, lightweight translucency, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media layering built from translucent tissue fragments. Lighting: soft top light preserving the color veils and overlap shadows. Texture: tissue wrinkles, feathered edges, and lightweight translucency. Key cues: tissue paper layering, translucent color veils, wrinkled paper films, stacked fragments. Finish cues: soft wrinkles, color veiling, feathered overlap edges, lightweight translucency. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"tissue_paper",
"layered"
]
},
{
"id": "mixed_vellum_overlay_assemblage",
"name": "Vellum Overlay Assemblage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, vellum overlays, translucent sheets, stacked drawing layers, soft veiling",
"suffix": "semi-transparent layers, paper curl, subtle overlap shadows, airy depth, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media assemblage built from translucent vellum overlays. Lighting: soft top light creating delicate overlap shadows between sheets. Texture: vellum curl, semi-transparent stacking, and layered veiling. Key cues: vellum overlays, translucent sheets, stacked drawing layers, soft veiling. Finish cues: semi-transparent layers, paper curl, subtle overlap shadows, airy depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"vellum",
"assemblage"
]
},
{
"id": "mixed_wax_resist_layers",
"name": "Wax Resist Mixed Media",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, wax resist, layered inks, masked paper, drawn resist lines",
"suffix": "resist crackle, ink pooling, paper tooth, layered transparency, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media wax-resist artwork with masked lines and layered inks. Lighting: soft diffuse light that keeps paper texture and layered transparencies visible. Texture: resist crackle, pooled pigment, and masked edge variation. Key cues: wax resist, layered inks, masked paper, drawn resist lines. Finish cues: resist crackle, ink pooling, paper tooth, layered transparency. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"wax_resist",
"layered"
]
},
{
"id": "mixed_xerox_transfer_collage",
"name": "Xerox Transfer Collage",
"category": "Mixed Media",
"default": {
"prefix": "mixed media artwork, layered textures, handcrafted marks, tactile surface, xerox transfer collage, toner transfer, distressed paper, layered copy fragments",
"suffix": "toner wear, uneven transfer, matte paper texture, zine-like edges, high detail, tactile texture, paper grain, layered depth, cohesive composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: mixed media collage built from toner-transfer copy fragments. Lighting: flat diffuse light that keeps paper layers readable. Texture: toner wear, distressed edges, and matte paper grain. Key cues: xerox transfer collage, toner transfer, distressed paper, layered copy fragments. Finish cues: toner wear, uneven transfer, matte paper texture, zine-like edges. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"mixed_media",
"transfer",
"photocopy"
]
}
]
}
@@ -0,0 +1,325 @@
{
"version": 1,
"styles": [
{
"id": "decor_copper_foil_stained_glass",
"name": "Copper Foil Stained Glass",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, copper foil stained glass, soldered seams, colored glass pieces, translucent mosaic",
"suffix": "backlit glow, solder line detail, glass texture, jewel-toned translucency, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: copper-foil stained glass with soldered seams and translucent color. Lighting: backlit illumination creating jewel-like glow through the glass. Texture: solder line detail, subtle rippled glass, and luminous color panels. Key cues: copper foil stained glass, soldered seams, colored glass pieces, translucent mosaic. Finish cues: backlit glow, solder line detail, glass texture, jewel-toned translucency. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"glass",
"foil"
]
},
{
"id": "decor_pate_de_verre_glass",
"name": "Pate de Verre Glass",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, pate de verre glass, granular cast glass, soft translucency, powdered glass color",
"suffix": "frosted surface, subtle translucence, cast texture, powder-soft color, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: pate de verre glass with softly cast translucent color. Lighting: soft transmitted light with gentle highlights on frosted surfaces. Texture: granular cast glass, matte translucency, and powder-soft color depth. Key cues: pate de verre glass, granular cast glass, soft translucency, powdered glass color. Finish cues: frosted surface, subtle translucence, cast texture, powder-soft color. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"glass",
"cast"
]
},
{
"id": "decor_slumped_kiln_formed_glass",
"name": "Slumped Kiln-Formed Glass",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, slumped kiln-formed glass, flowed glass contours, heat-shaped form, smooth translucent surface",
"suffix": "soft edge rounding, subtle thickness variation, glass sheen, formed contour shadows, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: kiln-formed slumped glass with heat-shaped contours. Lighting: controlled studio light emphasizing contour thickness and translucency. Texture: smooth glass sheen, softened edges, and gentle thickness variation. Key cues: slumped kiln-formed glass, flowed glass contours, heat-shaped form, smooth translucent surface. Finish cues: soft edge rounding, subtle thickness variation, glass sheen, formed contour shadows. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"glass",
"kiln_formed"
]
},
{
"id": "decor_raku_crackle_ceramic",
"name": "Raku Crackle Ceramic",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, raku ceramic, crackle glaze, smoke-fired surface, irregular luster",
"suffix": "black crack lines, smoky glaze variation, porous clay texture, unpredictable firing marks, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: raku-fired ceramic with crackled glaze and smoky variation. Lighting: soft studio light revealing crackle networks and firing irregularities. Texture: black crack lines, porous clay, and unpredictable glaze shifts. Key cues: raku ceramic, crackle glaze, smoke-fired surface, irregular luster. Finish cues: black crack lines, smoky glaze variation, porous clay texture, unpredictable firing marks. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"raku"
]
},
{
"id": "decor_pit_fired_ceramic",
"name": "Pit-Fired Ceramic",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, pit-fired ceramic, fire clouds, smoke marks, unglazed clay surface",
"suffix": "burnished sheen, smoke staining, earthy mineral variation, handmade surface, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: pit-fired ceramic with smoke clouds and earthy firing marks. Lighting: warm studio light showing burnished highlights and smoke variation. Texture: unglazed clay, mineral staining, and atmospheric fire marking. Key cues: pit-fired ceramic, fire clouds, smoke marks, unglazed clay surface. Finish cues: burnished sheen, smoke staining, earthy mineral variation, handmade surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"pit_fired"
]
},
{
"id": "decor_celadon_glaze_stoneware",
"name": "Celadon Glaze Stoneware",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, celadon glaze, pale green stoneware, pooled glaze, refined ceramic surface",
"suffix": "glaze pooling, cool translucence, soft crackle, subtle sheen, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: celadon-glazed stoneware with cool translucent pooling. Lighting: soft controlled light preserving glaze depth and subtle crackle. Texture: pooled glaze, pale green translucence, and refined ceramic sheen. Key cues: celadon glaze, pale green stoneware, pooled glaze, refined ceramic surface. Finish cues: glaze pooling, cool translucence, soft crackle, subtle sheen. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"celadon"
]
},
{
"id": "decor_crystalline_glaze_porcelain",
"name": "Crystalline Glaze Porcelain",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, crystalline glaze porcelain, starburst crystal blooms, glossy fired surface, porcelain body",
"suffix": "crystal clusters, gloss reflections, glaze depth, smooth porcelain surface, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: crystalline-glazed porcelain with visible starburst crystal blooms. Lighting: controlled highlights emphasizing glossy glaze and crystal structure. Texture: smooth porcelain, glossy depth, and flower-like crystal growth. Key cues: crystalline glaze porcelain, starburst crystal blooms, glossy fired surface, porcelain body. Finish cues: crystal clusters, gloss reflections, glaze depth, smooth porcelain surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"crystalline_glaze"
]
},
{
"id": "decor_mishima_inlay_pottery",
"name": "Mishima Inlay Pottery",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, mishima inlay pottery, incised lines, contrasting slip inlay, refined ceramic pattern",
"suffix": "filled linework, matte glaze, fine carving detail, quiet surface contrast, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: Mishima pottery with incised patterns filled by contrasting slip. Lighting: soft studio light revealing carved linework and matte ceramic surface. Texture: filled incisions, quiet glaze, and fine carved detail. Key cues: mishima inlay pottery, incised lines, contrasting slip inlay, refined ceramic pattern. Finish cues: filled linework, matte glaze, fine carving detail, quiet surface contrast. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"inlay"
]
},
{
"id": "decor_sgraffito_pottery",
"name": "Sgraffito Pottery",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, sgraffito pottery, scratched slip decoration, revealed clay body, layered ceramic surface",
"suffix": "incised motifs, matte slip texture, fine carving marks, earthy fired surface, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: sgraffito-decorated pottery with scratched slip and revealed clay. Lighting: soft angled light that catches carved ceramic marks. Texture: matte slip, incised motifs, and an earthy fired surface. Key cues: sgraffito pottery, scratched slip decoration, revealed clay body, layered ceramic surface. Finish cues: incised motifs, matte slip texture, fine carving marks, earthy fired surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"ceramic",
"sgraffito"
]
},
{
"id": "decor_hammered_copper_patina",
"name": "Hammered Copper Patina",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, hammered copper, hand-raised metal surface, aged patina, warm metallic tones",
"suffix": "hammer marks, oxidized color shifts, soft metallic sheen, worked metal relief, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: hammered copper decorative metalwork with aged patina. Lighting: warm studio light emphasizing hammered relief and patinated color shifts. Texture: hand-raised dimples, oxidized surface, and soft metallic sheen. Key cues: hammered copper, hand-raised metal surface, aged patina, warm metallic tones. Finish cues: hammer marks, oxidized color shifts, soft metallic sheen, worked metal relief. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"metal",
"patina"
]
},
{
"id": "decor_repousse_metalwork",
"name": "Repousse Metalwork",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, repousse metalwork, raised relief ornament, chased detailing, worked sheet metal",
"suffix": "relief contours, fine chased lines, aged metallic finish, ornamental depth, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: repousse metalwork with raised relief and chased detail. Lighting: directional studio light to reveal relief contours and fine tooling. Texture: raised ornament, chased lines, and aged metallic finish. Key cues: repousse metalwork, raised relief ornament, chased detailing, worked sheet metal. Finish cues: relief contours, fine chased lines, aged metallic finish, ornamental depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"metal",
"repousse"
]
},
{
"id": "decor_guilloche_enamel",
"name": "Guilloche Enamel",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, guilloche enamel, engine-turned pattern, translucent enamel layer, radiating metal geometry",
"suffix": "subsurface pattern shimmer, gloss enamel finish, precise engraved rhythm, luxury surface, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: guilloche enamel over engine-turned metal patterning. Lighting: controlled highlights that reveal the pattern beneath translucent enamel. Texture: glossy enamel depth, precise engraved rhythm, and subsurface shimmer. Key cues: guilloche enamel, engine-turned pattern, translucent enamel layer, radiating metal geometry. Finish cues: subsurface pattern shimmer, gloss enamel finish, precise engraved rhythm, luxury surface. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"enamel",
"guilloche"
]
},
{
"id": "decor_acid_etched_glass",
"name": "Acid-Etched Glass",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, acid-etched glass, frosted transparency, matte glass surface, ornamental etching",
"suffix": "soft diffusion, satin glass finish, etched motif edges, subtle translucence, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: acid-etched glass with frosted translucency and engraved motifs. Lighting: soft transmitted light with minimal glare to preserve the satin finish. Texture: matte frosted glass, subtle translucence, and etched boundaries. Key cues: acid-etched glass, frosted transparency, matte glass surface, ornamental etching. Finish cues: soft diffusion, satin glass finish, etched motif edges, subtle translucence. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"glass",
"etched"
]
},
{
"id": "decor_cut_crystal_faceting",
"name": "Cut Crystal Faceting",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, cut crystal, faceted glass, prismatic refraction, precision cutting",
"suffix": "sharp facets, caustic sparkle, high clarity, polished reflections, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: cut crystal decorative glass with sharp faceting and prismatic sparkle. Lighting: crisp controlled highlights and small caustics across polished facets. Texture: sharp facet edges, high clarity, and jewel-like reflections. Key cues: cut crystal, faceted glass, prismatic refraction, precision cutting. Finish cues: sharp facets, caustic sparkle, high clarity, polished reflections. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"glass",
"crystal"
]
},
{
"id": "decor_lost_wax_cast_bronze",
"name": "Lost-Wax Cast Bronze",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, lost-wax cast bronze, cast metal surface, hand-finished patina, sculptural metalwork",
"suffix": "cast texture, warm bronze highlights, subtle tooling marks, aged patina depth, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: lost-wax cast bronze with hand-finished patina. Lighting: warm directional light showing cast surface, tooling, and metallic depth. Texture: cast grain, hand-finished marks, and aged bronze patina. Key cues: lost-wax cast bronze, cast metal surface, hand-finished patina, sculptural metalwork. Finish cues: cast texture, warm bronze highlights, subtle tooling marks, aged patina depth. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"bronze",
"cast"
]
},
{
"id": "decor_pietra_dura_inlay",
"name": "Pietra Dura Stone Inlay",
"category": "Decorative Arts",
"default": {
"prefix": "decorative arts, handcrafted, artisan-made, museum-quality, pietra dura inlay, polished stone mosaic, hardstone floral inlay, precise stone fitting",
"suffix": "polished stone sheen, crisp inlay seams, rich mineral color, luxury surface detail, tactile surface, premium craftsmanship, controlled studio lighting, clean composition"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: pietra dura hardstone inlay with tightly fitted polished stone pieces. Lighting: soft controlled light revealing polished mineral surfaces and seam precision. Texture: crisp stone joins, polished sheen, and rich mineral color variation. Key cues: pietra dura inlay, polished stone mosaic, hardstone floral inlay, precise stone fitting. Finish cues: polished stone sheen, crisp inlay seams, rich mineral color, luxury surface detail. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"decorative_arts",
"stone",
"inlay"
]
}
]
}
+245
View File
@@ -0,0 +1,245 @@
{
"version": 1,
"styles": [
{
"id": "tech_exploded_cutaway_diagram",
"name": "Exploded Cutaway Diagram",
"category": "Technical",
"default": {
"prefix": "technical illustration, clean lines, precise geometry, exploded cutaway view, separated components, sectional clarity",
"suffix": "clean line hierarchy, crisp geometry, sectional detail, flat rendering, high legibility"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: technical cutaway illustration with separated components and crisp geometry. Lighting: flat even rendering with no dramatic shading. Composition: clear separations, sectional clarity, and measured structure. Key cues: exploded cutaway view, separated components, technical linework, precise geometry. Finish cues: clean line hierarchy, crisp geometry, sectional detail, flat rendering. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"technical",
"cutaway",
"diagram"
]
},
{
"id": "tech_orthographic_projection_plate",
"name": "Orthographic Projection Plate",
"category": "Technical",
"default": {
"prefix": "technical line illustration, orthographic views, aligned geometry, drafting clarity, multiview structure",
"suffix": "clean projection lines, measured spacing, flat rendering, crisp technical linework, restrained contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: orthographic technical illustration with aligned multiview geometry. Lighting: flat drafting presentation with minimal tonal variation. Composition: measured spacing, crisp geometry, and projection clarity. Key cues: orthographic views, aligned geometry, drafting clarity, multiview structure. Finish cues: clean projection lines, measured spacing, flat rendering, crisp technical linework. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"technical",
"orthographic",
"blueprint"
]
},
{
"id": "tech_patent_plate_diagram",
"name": "Patent Plate Diagram",
"category": "Technical",
"default": {
"prefix": "technical engraving style, fine drafting lines, archival patent aesthetic, precise mechanical illustration, paper grain",
"suffix": "fine linework, etched line texture, paper grain, restrained contrast, crisp technical detail"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: archival patent-style technical illustration with fine drafting lines and paper grain. Lighting: flat document light that keeps linework readable. Texture: etched line detail, paper grain, and restrained contrast. Key cues: technical engraving style, archival patent aesthetic, precise mechanical illustration, fine drafting lines. Finish cues: fine linework, etched line texture, paper grain, restrained contrast. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"technical",
"patent",
"diagram"
]
},
{
"id": "tech_section_elevation_drawing",
"name": "Section and Elevation Drawing",
"category": "Technical",
"default": {
"prefix": "technical architectural drawing, section cut hatching, elevation linework, measured geometry, clean drafting",
"suffix": "hatching clarity, precise line weights, crisp geometry, flat rendering, restrained document contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: architectural technical drawing with section hatching and elevation linework. Lighting: flat presentation emphasizing geometry and line-weight hierarchy. Composition: measured structure, clean hatch patterns, and crisp drafting. Key cues: section cut hatching, elevation linework, measured geometry, clean drafting. Finish cues: hatching clarity, precise line weights, crisp geometry, flat rendering. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"technical",
"section",
"elevation"
]
},
{
"id": "vec_gradient_mesh_illustration",
"name": "Gradient Mesh Illustration",
"category": "Vector",
"default": {
"prefix": "vector illustration, flat colors, clean shapes, crisp edges, smooth curves, gradient mesh vector, smooth tonal blends, scalable curves, clean vector shapes",
"suffix": "smooth color transitions, crisp bezier edges, clean layout, polished vector finish, consistent stroke weight, crisp edges, smooth curves"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: vector illustration built from gradient-mesh color transitions. Lighting: graphic flat-light treatment with emphasis on controlled tonal blending. Texture: none; clean scalable curves and polished vector edges. Key cues: gradient mesh vector, smooth tonal blends, scalable curves, clean vector shapes. Finish cues: smooth color transitions, crisp bezier edges, clean layout, polished vector finish. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"vector",
"gradient_mesh",
"illustration"
]
},
{
"id": "vec_monoline_icon_system",
"name": "Monoline Icon System",
"category": "Vector",
"default": {
"prefix": "vector illustration, clean shapes, monoline forms, uniform stroke weight, modular geometry, flat graphic style",
"suffix": "consistent line weight, crisp curves, balanced spacing, polished vector edges, clean flat finish"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: monoline vector illustration with modular geometry and uniform stroke weight. Lighting: flat graphic treatment with no material shading. Composition: balanced spacing, crisp curves, and scalable clarity. Key cues: monoline forms, uniform stroke weight, modular geometry, flat graphic style. Finish cues: consistent line weight, crisp curves, balanced spacing, polished vector edges. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"vector",
"icon",
"monoline"
]
},
{
"id": "vec_wayfinding_graphic_system",
"name": "Wayfinding Graphic System",
"category": "Vector",
"default": {
"prefix": "vector illustration, bold graphic symbols, flat colors, clean geometry, strong directional shapes, transit-graphic aesthetic",
"suffix": "high contrast clarity, clean alignment, modular spacing, crisp vector edges, polished flat finish"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: bold vector graphics with strong directional shapes and flat-color clarity. Lighting: flat design presentation with emphasis on readability. Composition: modular spacing, crisp geometry, and strong symbol silhouettes. Key cues: bold graphic symbols, clean geometry, strong directional shapes, transit-graphic aesthetic. Finish cues: high contrast clarity, clean alignment, modular spacing, crisp vector edges. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"vector",
"wayfinding",
"infographic"
]
},
{
"id": "vec_flat_isometric_explainer",
"name": "Flat Isometric Explainer",
"category": "Vector",
"default": {
"prefix": "vector illustration, flat isometric geometry, clean planes, simplified depth, crisp graphic shapes",
"suffix": "crisp isometric edges, controlled flat shadows, clean geometry, polished vector finish, restrained contrast"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: flat isometric vector illustration with clean geometric depth. Lighting: minimal graphic shading with controlled flat shadows. Composition: tidy geometry, crisp edges, and scalable forms. Key cues: flat isometric geometry, clean planes, simplified depth, crisp graphic shapes. Finish cues: crisp isometric edges, controlled flat shadows, clean geometry, polished vector finish. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"vector",
"isometric",
"diagram"
]
},
{
"id": "pix_one_bit_dithered_pixel",
"name": "One-Bit Dithered Pixel",
"category": "Pixel Art",
"default": {
"prefix": "pixel art, 16-bit, limited palette, pixel-perfect, one-bit pixel art, black and white dithering, high contrast sprite look, coarse pixel grid",
"suffix": "checker dither, crisp pixels, readable silhouette, hard-edged contrast, dithered shading, sprite-like clarity"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: one-bit pixel art using black and white dithering only. Lighting: implied through dither pattern rather than gradients. Texture: coarse pixel grid, checker dithers, and hard-edged contrast. Key cues: one-bit pixel art, black and white dithering, high contrast sprite look, coarse pixel grid. Finish cues: checker dither, crisp pixels, readable silhouette, hard-edged contrast. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"pixel_art",
"one_bit",
"dither"
]
},
{
"id": "pix_four_color_handheld_pixel",
"name": "Four-Color Handheld Pixel",
"category": "Pixel Art",
"default": {
"prefix": "pixel art, 16-bit, limited palette, pixel-perfect, four-color handheld pixel art, tiny tile shading, portable-screen look",
"suffix": "restricted tones, crisp pixels, readable forms, small-scale tile texture, dithered shading, readable silhouette, sprite-like clarity"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: limited-palette handheld pixel art with only four tonal values. Lighting: implied with tiny tile shading and palette restriction. Texture: small pixel grid, restrained tones, and compact sprite readability. Key cues: four-color handheld pixel art, limited palette, tiny tile shading, portable-screen look. Finish cues: restricted tones, crisp pixels, readable forms, small-scale tile texture. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"pixel_art",
"handheld",
"limited_palette"
]
},
{
"id": "pix_isometric_sprite_sheet",
"name": "Isometric Sprite Sheet",
"category": "Pixel Art",
"default": {
"prefix": "pixel art, 16-bit, limited palette, pixel-perfect, isometric sprite sheet, tile-based game art, modular sprites, pixel grid alignment",
"suffix": "crisp pixels, modular repetition, readable silhouette, dithered shading, sprite-like clarity"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: isometric sprite-sheet pixel art built from modular game tiles. Lighting: compact pixel shading supporting isometric form readability. Texture: crisp grid alignment, modular repetition, and dithered shading. Key cues: isometric sprite sheet, tile-based game art, modular sprites, pixel grid alignment. Finish cues: crisp pixels, modular repetition, readable silhouette, dithered shading. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"pixel_art",
"sprite_sheet",
"isometric"
]
},
{
"id": "pix_tilemap_interface",
"name": "Tilemap Interface",
"category": "Pixel Art",
"default": {
"prefix": "pixel art, limited palette, crisp pixel grid, retro game overlay aesthetic, chunky interface framing, modular tiles",
"suffix": "sharp pixels, clean tile seams, limited tones, compact shading, readable silhouette, sprite clarity"
},
"models": {
"flux_2_klein": {
"prefix": "",
"suffix": "Style: retro pixel-art overlay with chunky framing and modular tile structure. Lighting: flat pixel shading with palette-limited contrast. Texture: crisp grid alignment, clean tile seams, and sharp pixels. Key cues: retro game overlay aesthetic, chunky interface framing, modular tiles, crisp pixel grid. Finish cues: sharp pixels, clean tile seams, limited tones, compact shading. Instruction: preserve the user prompt subject and add only stylistic cues."
}
},
"tags": [
"pixel_art",
"tilemap",
"interface"
]
}
]
}
+1236 -36
View File
File diff suppressed because it is too large Load Diff
+182
View File
@@ -0,0 +1,182 @@
from __future__ import annotations
import unittest
import nodes
import style_library
class _FakeBool:
def __init__(self, value: bool):
self._value = value
def item(self) -> bool:
return self._value
class _FakeFiniteResult:
def __init__(self, value: bool):
self._value = value
def all(self) -> _FakeBool:
return _FakeBool(self._value)
class FakeTensor:
def __init__(self, finite: bool = True, size: int = 3):
self._finite = finite
self._size = size
def numel(self) -> int:
return self._size
def isfinite(self) -> _FakeFiniteResult:
return _FakeFiniteResult(self._finite)
class FakeTextEncoder:
def __init__(self, conditioning=None):
self.last_text = None
self.last_tokens = None
self._conditioning = conditioning
def tokenize(self, text):
self.last_text = text
self.last_tokens = {"text": text}
return self.last_tokens
def encode_from_tokens_scheduled(self, tokens):
if self._conditioning is not None:
return self._conditioning
return [[FakeTensor(), {"source": tokens["text"]}]]
class PromptStylerTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.library = style_library.get_cached_style_library(load_policy=style_library.LOAD_POLICY_STRICT)
cls.stable_node = nodes.PromptStylerConditioning()
cls.advanced_node = nodes.PromptStylerAdvancedConditioning()
cls.primary_choice = next(choice for choice in cls.library.choices if choice.endswith("| cinematic_anamorphic"))
cls.secondary_choice = next(choice for choice in cls.library.choices if choice.endswith("| cin_film_noir"))
def test_apply_style_false_returns_raw_prompt(self):
encoder = FakeTextEncoder()
conditioning, styled_prompt = self.stable_node.encode(
prompt="red fox",
apply_style=False,
style=self.primary_choice,
template_variant="default",
style_id_override="",
text_encoder=encoder,
)
self.assertEqual("red fox", styled_prompt)
self.assertEqual("red fox", encoder.last_text)
self.assertEqual(1, len(conditioning))
def test_style_id_override_takes_precedence(self):
encoder = FakeTextEncoder()
conditioning, styled_prompt = self.stable_node.encode(
prompt="portrait",
apply_style=True,
style=self.secondary_choice,
template_variant="default",
style_id_override="cinematic_anamorphic",
text_encoder=encoder,
)
expected_style = style_library.resolve_style_legacy(
self.library,
choice=self.primary_choice,
style_id_override="cinematic_anamorphic",
)
expected_prompt, _details = style_library.compose_prompt_legacy(
"portrait",
expected_style,
template_variant="default",
)
self.assertEqual(expected_prompt, styled_prompt)
self.assertEqual(expected_prompt, encoder.last_text)
self.assertEqual(1, len(conditioning))
def test_legacy_default_variant_matches_expected_fixture(self):
encoder = FakeTextEncoder()
conditioning, styled_prompt = self.stable_node.encode(
prompt="cinematic film still, robot detective",
apply_style=True,
style=self.primary_choice,
template_variant="default",
style_id_override="",
text_encoder=encoder,
)
expected = (
"cinematic film still, professional cinematography, cinematic framing, carefully composed shot, "
"atmospheric depth, realistic lighting, cinematic, anamorphic look, shallow depth of field, "
"dramatic lighting, robot detective, film grain, subtle halation, rich contrast, color graded, "
"filmic color science, smooth highlight rolloff, deep blacks, subtle film grain, soft halation, "
"high dynamic range"
)
self.assertEqual(expected, styled_prompt)
self.assertEqual(expected, encoder.last_text)
self.assertEqual(1, len(conditioning))
def test_missing_variant_falls_back_to_default(self):
style = self.library.by_id["cinematic_anamorphic"]
default_prompt, _default_details = style_library.compose_prompt_legacy(
"robot detective",
style,
template_variant="default",
)
fallback_prompt, details = style_library.compose_prompt_legacy(
"robot detective",
style,
template_variant="missing_variant",
)
self.assertEqual(default_prompt, fallback_prompt)
self.assertEqual(style_library.DEFAULT_VARIANT, details["variant"])
def test_advanced_node_matches_stable_node_for_simple_dropdown_flow(self):
stable_encoder = FakeTextEncoder()
advanced_encoder = FakeTextEncoder()
stable_conditioning, stable_prompt = self.stable_node.encode(
prompt="robot detective, rainy alley",
apply_style=True,
style=self.primary_choice,
template_variant="default",
style_id_override="",
text_encoder=stable_encoder,
)
advanced_conditioning, advanced_prompt, resolved_style_id, resolved_style_meta = self.advanced_node.encode(
prompt="robot detective, rainy alley",
apply_style=True,
style=self.primary_choice,
template_variant="default",
style_id_override="",
text_encoder=advanced_encoder,
selection_mode="dropdown",
style_search="",
category_hint="",
tag_hint="",
style_strength="strong",
dedupe_mode="smart",
overlay_style_id="",
on_missing_style="error",
)
self.assertEqual(stable_prompt, advanced_prompt)
self.assertEqual("cinematic_anamorphic", resolved_style_id)
self.assertIn('"status": "ok"', resolved_style_meta)
self.assertEqual(1, len(stable_conditioning))
self.assertEqual(1, len(advanced_conditioning))
def test_invalid_conditioning_raises_explicit_error(self):
encoder = FakeTextEncoder(conditioning=[[FakeTensor(finite=False), {}]])
with self.assertRaisesRegex(RuntimeError, "non-finite conditioning"):
nodes.encode_conditioning(encoder, "robot detective")
def test_malformed_conditioning_raises_explicit_error(self):
encoder = FakeTextEncoder(conditioning=["bad"])
with self.assertRaisesRegex(RuntimeError, "invalid conditioning item"):
nodes.encode_conditioning(encoder, "robot detective")
if __name__ == "__main__":
unittest.main()