Nodes reference
Five nodes, all under the StyleRef category. Four work without an account.
| Node | Account | Purpose |
|---|---|---|
| StyleRef Load | No | Fetch a style into the graph |
| StyleRef Apply | No | Compose a subject with a style into prompts |
| StyleRef Facets | No | Expose every style section as its own output |
| StyleRef Reference Images | No | The style’s inspiration images as an IMAGE batch |
| StyleRef Login | — | Sign in, sign out, check status |
Looking for extraction? Turning an image into a style happens on styleref.io — where you can preview and refine the result — and the style then loads here by its share slug or id.
Loading one of your own styles gives you what you last generated on styleref.io, so edits reach the graph once you press Generate there. A style you have never generated stops the node with that instruction spelled out — generate it once on the web and re-run. The search dialog marks those styles not generated before you pick one, and the loaded style line repeats the warning while you’re still looking at the field. Gallery styles always load.
StyleRef Load
Fetches a style and outputs it as a STYLEREF_STYLE object. After a
successful load, the node body shows what loaded — name, author, section
count, and the palette.
Inputs
| Name | Type | Description |
|---|---|---|
style_ref | string | Share slug or a styleref.io /share URL. Signed in, your own private styles resolve by their id or /styles/{id} URL — or use Search styles… to pick one without typing an id |
search | string | Optional query, for installs without the search dialog. Matches appear in the node body and on search_results |
category | enum | Narrow search to one gallery category. any = no filter |
use_cache | boolean | Off = re-check the style on every run — a cheap revalidation that re-downloads only when the style actually changed on styleref.io |
save_to_library | boolean | Also save the gallery style to your library (My Styles → Saved) when it loads. Needs sign-in |
Outputs
| Name | Type | Description |
|---|---|---|
style | STYLEREF_STYLE | Connect to Apply or Facets |
search_results | string | Search matches with their slugs |
A read-only loaded style line sits directly under style_ref and names the
style that slug resolves to, so you can tell which one is wired in without
reading the slug or queueing the graph. It updates whenever the field changes —
typing, pasting, picking from the search dialog, or opening a saved workflow. A
slug that doesn’t resolve says so there in a few words — not signed in,
not found, ⚠ never generated — instead of failing at queue time. Hover the
line for the full explanation.
search and category are the fallback for installs that can’t run the search
dialog; where the dialog works, they’re hidden and the Search styles… button
replaces them.
The Search styles… button opens a picker with live search, a category filter
and thumbnails. Choosing a style fills style_ref.
The picker has two sections, each showing 8 styles at a time with its own
‹ Prev / Next ›: your own library on top, then the gallery below. Both
sections show the same thing — thumbnail, name, tags, and a view ↗ link —
except that your own rows carry their visibility (Private, Link-shared,
Public) where a gallery row carries its author.
The search box filters both, and filters them the same way: a term matches a style’s name, tags, category or description, in either section. The category dropdown narrows the gallery only. A style of yours that’s published in the gallery appears once, under My styles — the gallery section leaves it out rather than listing it twice.
My styles only appears when it has something in it: signed out, or with no style of yours matching, the picker is just the gallery, and a Sign in button sits next to the title. When nothing matches at all, the picker offers a link to create a style from your own reference images.
Keyboard: ↓ / ↑ move through the results, Enter in the search box takes the top result, Esc closes. The dialog keeps your query, category and sort between opens.
The dropdown next to it picks what the lower section shows:
| Option | Shows |
|---|---|
| Recent | Newest gallery styles first |
| Popular | Most-saved gallery styles first |
| Saved | The gallery styles you saved — requires sign-in |
A style of your own that you have never generated is marked not generated. You can still pick it, but it won’t load until you generate it once on styleref.io.
The ↻ Refresh style button re-downloads the style once on the next queue —
use it after editing the style on styleref.io, without touching use_cache.
Want the style as a STYLE.md document? That’s a target on Apply, same as the
other formats.
Loading your own private style requires sign-in. If your style has never been generated, the server asks you to open it on styleref.io and Generate it first — loading always uses the last generated version.
StyleRef Apply
Composes your subject with the style into ready-to-use prompts. The node body previews the composed positive with a rough token estimate, so you can see what StyleRef produced before the sampler runs.
A 📋 Copy prompt button copies the whole composed positive to your clipboard after a queue — the node body preview is shortened, and four of the six targets exist to be pasted somewhere else.
Inputs
| Name | Type | Description |
|---|---|---|
style | STYLEREF_STYLE | From Load |
subject | string | What to depict |
target | enum | ai_tools, style_md, flux, midjourney, diffusion, json — the web app’s copy list |
extra_negative | string | Your own additional negative terms, appended after the style’s guardrails |
compact | boolean | Shorter style text. Use when the style overwhelms the subject or the token estimate runs high |
sections | string | Compile only these sections, comma-separated (e.g. colors,light_shadow). Empty = all. More precise than compact |
subject_first | boolean | Only applies when the style has no built-in subject position |
Outputs
| Name | Type | Description |
|---|---|---|
positive | string | Wire into your positive CLIP Text Encode |
negative | string | Wire into your negative CLIP Text Encode |
attribution | string | Style name, author, and link — for captions or metadata |
The negative output is the style’s own guardrails plus your extra_negative — nothing injected. It arrives negative-channel ready: terse, comma-separated visual terms (artifacts to avoid, avoided visuals, colors, layouts), with directive words like “avoid” stripped — a negative encoder negates the literal tokens, so “avoid X” would negate the word “avoid”. Text-voice constraints (avoided words) stay out of image negatives. If you want generic quality negatives, put them in extra_negative where they stay visible.
About targets
The list is exactly the web app’s copy-box format list, in the same order — a style compiles to the same thing here as on styleref.io.
For the sampler in your graph, use:
flux— natural-language phrasing for FLUX modelsdiffusion— tag-weighted output for SDXL, SD1.5, DALL·E-class models
The rest are for copying out of ComfyUI — use 📋 Copy prompt (the node shows a warning badge if one feeds a text encoder instead):
ai_tools— prose for ChatGPT, Gemini, and text LLMsstyle_md— the portable STYLE.md document, verbatim (subject ignored)midjourney— Midjourney-phrased prompt textjson— the structured spec, verbatim (subject ignored)
These are the same formats as StyleRef’s REST API and MCP tools; ai_tools = the API’s default format, style_md = stylemd.
Each style is compiled server-side for the target you choose, so switching targets rephrases the style rather than reusing one generic block of text.
Attribution is a separate output, not part of the prompt, so it never reaches the text encoder as tokens.
StyleRef Facets
Splits a style into its sections, for graphs that need more than a prompt string — IPAdapter weights, conditioning regions, per-section text encoders. It’s a tall node by design, and it mirrors the style board one-to-one: the outputs are exactly the style schema’s section list, named as you see them on styleref.io — nothing derived, nothing invented.
Inputs
| Name | Type | Description |
|---|---|---|
style | STYLEREF_STYLE | From Load |
Outputs
One string output per schema section, in schema order: output_format, container_boundary, mood_personality, colors, typography, light_shadow, spatial_hierarchy, surface_material, motion, shape_language, stroke_system, voice_language, post_processing, background_environment, artistic_mediums, ui_web, references, guardrails — each rendered as readable field: value lines — plus custom_style_item_1 … custom_style_item_6 individually (empty when unset).
(The assembled negative prompt is Apply’s negative output; the inspiration images are the Reference Images node.)
StyleRef Reference Images
The style’s inspiration images as a ComfyUI IMAGE batch — the visual half of the style, for IPAdapter, reference-only ControlNet, or just a Preview Image next to your graph. Prompts say what the style reads like; these show what it looks like.
Inputs
| Name | Type | Description |
|---|---|---|
style | STYLEREF_STYLE | From Load |
max_images | int | Load at most this many (default 12). 0 loads none — mutes the node without disconnecting it |
Outputs
| Name | Type | Description |
|---|---|---|
images | IMAGE | All inspiration images as one batch, resized to the first image’s size |
count | int | How many were loaded |
A style with no inspiration images doesn’t stop your run: the node says so in its body and returns an empty batch. This node feeds IPAdapter or a preview, never the sampler, so a missing decorative input shouldn’t cost you the render.
Deliberately, inspiration images are not embedded in Apply’s prompts: a sampler can’t fetch a URL out of prompt text, so image conditioning belongs here, as images.
StyleRef Login
A helper, not part of the data path, with no widgets to configure. The node shows your current status and carries three buttons — no queueing needed:
- Status — shows
✔ signed inorsigned out; click it to re-check. It also re-checks itself when the tab regains focus. - Sign in (browser) — opens styleref.io in your browser for approval.
- Sign out — removes the stored credentials.
Queueing the node prints the full status text in the node body — including the token instructions on headless installs. No frontend at all? npx styleref login signs in the same credentials file the node uses.
Outputs
| Name | Type | Description |
|---|---|---|
status | string | The current status when queued, also shown in the node body |
See login & credits, especially if ComfyUI runs on a remote machine.
The STYLEREF_STYLE type
Load, Apply, Facets, and Reference Images pass a STYLEREF_STYLE object between them rather than raw text. It carries the full structured style — every section and field — so Facets can read the palette even though Apply only produced prompt text.
You can connect one Load to as many Apply, Facets, and Reference Images nodes as you want.
A note on reproducibility
A workflow stores only the style reference, not the style itself. If the style is edited on styleref.io later, re-running the workflow compiles the updated style — your prompts can change even though the graph didn’t. Keep use_cache on for stability within a session; for a permanent record of what a run used, save Apply’s positive/negative outputs — Apply also prints the prompt it composed in its own node body after a queue, and a Preview Any node on either output writes it somewhere you can copy from.