MidjourneyStyle references

How to Build a Midjourney Style Library with --sref Codes

By Marco Cavazzana · Updated · 5 min read
ShareEmail
Short answer

A Midjourney style library is a catalogue of tested --sref codes and reference images, each saved with a name, preview images, tags, a recommended style weight and the model version you tested it on. Testing every style on the same few prompts tells you where it works, so you can apply a proven look to any new subject in seconds.

What a style library is and why it pays off

A style library is your own catalogue of looks you can apply on demand. In Midjourney the core of it is the style reference: the --sref parameter, which takes either an image URL or a numeric style code and pushes your image towards that look while you describe the subject in words.

The value is consistency. Without a library, every new project starts with an hour of hunting for the right feel. With one, you pick a tested look in seconds, apply it to a new subject, and get results that match last month’s work. It also helps you separate two jobs that are easy to blur: describing what is in the image, and choosing how it looks.

A library also makes collaboration easier. If a colleague or client approves a look, you can point to the exact entry, its code and its settings, instead of trying to describe "that warm, slightly faded one from the spring shoot".

Where to find styles worth keeping

Good entries come from three places:

  • Random exploration. Adding --sref random to a prompt applies a random style. When a result catches your eye, the finished job shows the numeric code that was used, so you can copy it into your library.
  • Your own reference images. Pass an image URL to --sref to borrow its palette, texture and mood. Use images you have the right to use, such as your own photos or brand assets.
  • Codes others share. Communities often post style codes with example images. Treat them as leads, not guarantees, and test them yourself. Our guide to finding sref codes covers where to look.

A useful exploration prompt keeps the subject neutral so the style does the talking:

a lighthouse on a rocky coast at dusk --ar 3:2 --sref random

Run it a dozen times, and save only the codes you would genuinely use for a real brief.

How to catalogue each style

A code on its own is just a number. What makes a library usable is the information you store with it. These fields cover what you need:

FieldExampleWhy it matters
Code or image URLThe numeric code or the reference linkThe thing you paste into --sref
Name"Dusty pastel risograph"You search names, not numbers
Preview imagesTwo or three test resultsYou judge a style by eye in a second
Tagsprint, pastel, grainy, editorialLets you filter by use and look
Best style weight--sw 60Some styles overpower subjects at full strength
Model version testedThe version you were usingCodes can render differently across versions
Notes"Great for food, muddy on faces"Saves you repeating failed experiments

Give every style a descriptive name the moment you save it. "Warm grainy 70s film" is findable in a year. "sref 14" is not.

Tagging that you will actually use

Tags fail when there are too many of them or they are inconsistent. Keep a short, fixed vocabulary across a few dimensions:

  • Medium: photo, illustration, 3D, painterly, graphic.
  • Colour: warm, cool, pastel, monochrome, high contrast.
  • Texture: clean, grainy, textured paper, glossy.
  • Use: product, portrait, poster, social, editorial, background.
  • Status: tested, favourite, client-approved, retired.

Aim for three to five tags per style. Group related styles into collections by project or client, for example "Autumn campaign" or "Children’s book series", so a team can find the approved looks without searching the whole library.

Testing a style before you trust it

A style that looks wonderful on one landscape can fall apart on a portrait or a product shot. A short, repeatable test tells you where a style works:

  1. Pick three fixed test prompts and never change them: a portrait, an object and a scene. For example portrait of an elderly fisherman, natural light, a glass perfume bottle on stone and a busy market street at night.
  2. Run each with the style at default weight. Style weight --sw runs from 0 to 1000 with a default of 100.
  3. Try a low and a high weight, such as --sw 40 and --sw 300, to see how much the style dominates.
  4. Note what breaks. Faces, hands, text and fine product detail are common weak spots.
  5. Save the previews and your verdict into the library entry, including the version you tested on.

Because you used the same prompts every time, you can compare styles side by side. Re-run the test when you switch model version, since a favourite code may shift.

Using your library day to day

Once you have twenty or thirty tested styles, the workflow becomes simple: write the subject and composition in plain words, then add the style from your library.

a ceramic teapot on a wooden shelf, morning light, plenty of negative space --ar 4:5 --sref [your code] --sw 80

A few habits help:

  • Keep style words out of the prompt when using a strong --sref; competing descriptions muddy the result.
  • Pair a style reference with --raw when you want less of Midjourney’s default aesthetic layered on top of the reference.
  • Lower --stylize if the default aesthetic keeps pulling the image away from your chosen look, and compare the results side by side.
  • Test combinations of two styles as their own library entries, with their own previews.
  • Retire styles you have not used in months. A smaller, trusted library is faster than a large, untested one.

For the mechanics of the parameter itself, see our guide to Midjourney style references.

Doing this faster with Dreamdrive

Dreamdrive keeps the full prompt with every capture, --sref code included, so a look you liked is a search away in your Library. It works inside midjourney.com in desktop Chrome, and the free plan lets you save 20 styles of your own and browse the library. Pro removes the limit.

Frequently asked questions

What is a Midjourney sref code?
An sref code is a numeric style code used with the --sref parameter. It applies a particular look to your image while your prompt describes the subject.
How do I find the code from --sref random?
When you run a prompt with --sref random, the finished job shows the numeric code that was used. Copy it from there into your library if you like the result.
Do sref codes work the same in every Midjourney version?
Not always. Style codes can render differently across model versions, so record the version you tested on and re-test favourites when you switch.
What style weight should I use with --sref?
Style weight (--sw) runs from 0 to 1000 with a default of 100. Test each style at a low and a high value and note the weight that balances the look against your subject.
How many styles should a style library have?
There is no right number, but a smaller set of well-tested, clearly named and tagged styles is more useful than hundreds of untested codes.

Nothing you makeis lost.

Free · No card · Read-only · 2-minute setup

DreamdriveFree plan · Chrome
Add to Chrome — it’s free