– -cref, anyone? well, this is not the name of a new programming language, instead it is a new parameter to be used in Midjourney, the generative AI text to image (T2I) tool. The double dash (- -) is followed by a parameter Midjourney will recognise and act upon based on the values added. For instance, – -ar 16:9 stand for aspect ratio of the image and in this case specifically 16:9. There is a whole list of different parameters, have a look at Midourney’s own list. Please note, Macs sometimes combine the two hyphens and sometimes they look like glued together, point is it it supposed to be two hyphens without a space in between.
Now, character reference is is akin to a dream come true for people working with GenAI-based T2I. It promises to recreate a specific, recognisable character you have either created yourself or used a real person’s image for instance with different clothes, hairstyle on various places or settings. This capability is incredibly useful and powerful, especially in the realm of graphic storytelling. I have been dabbling with Midjourney and found it always rather frustrating not to be able to create a character that I can develop and put into different scenes.This limitation has been a significant obstacle in advancing my multimodal project Greek tragedy. However, my initial experiments with character reference have been very promising, and I’m hopeful that I can now continue working on it.
Let me explain how it works and show you something interesting I have come across.
--cref Explained
A typical Midjourney prompt is something of a sentence, you can argue that it can have a subject, verb, object, adjectives and adverbs (order not relevant). Moreover, at the end of the prompt you can add aforementioned parameters with values. Note, parameters are always the last bit of a prompt. So, a basic prompt could be a yellow dragon, a prompt with parameters would look like a yellow dragon –ar 16:9 –style raw. Now, if you use Discord you need to start your prompt with /imagine. I am able to use Midjourney via web browser as I have generated more than a thousand images (a threshold set by Midjourney). Using the browser is a very handy and very easy way to use Midjourney, you do not need to write the dashes and parameters yourself, just click on the buttons. This reduces the risk of typos dramatically. Take note of this if you wish to copy and play around with my prompts in Discord!
Now to my testing. As mentioned –cref allows you to use a reference image and tell Midjourney you want this same person with say different clothing. When generating with the browser you would add the image and then the prompt defining the new look. In my case I used an image of a character I had created in black and white some time ago and added a beautiful woman with a hoodie. See the results below. As you later will see I could have just prompted woman in hoodie – the beautiful part is not necessary as Midjourney uses my reference image.
I am very impressed with Midjourney’s ability to recreate the character with something that could be a hoodie, it’s clearly the same character (I am deliberately using character and not person).
Of course I went on to test –cref with other characters and in other situations. Now, here comes the interesting part, Midjourney created a nude version of my character WITHOUT my explicit prompting for it. In Midjourney’s Community Guidelines under What’s NSFW or Adult Content? they say:
Avoid nudity, sexual organs, fixation on naked breasts, people in showers or on toilets, sexual imagery, fetishes, etc.
in fact Midjourney did this not just once but quite a number of times. I have an idea how this happened, but let’s first see how my testing continued. My next prompt was: woman in her 40s, amber long and wavy hair, light green eyes, some freckles or in Discord format: /imagine woman in her 40s, amber long and wavy hair, light green eyes, some freckles –ar 5:7 –style raw. Below you can see the prompt resulting in four images.
Cooling down the cheek
or how else would interpret the rendering of the prompt: eating ice cream on hot day using –cref with the character 4/4, the one on the very right. Again the character is clearly the same, albeit her (their?) expression not always desirable and let’s not dive into icecreamology – if you think GenAI understands what it is drawing (at least the LLM used to power Midjourney’s), think again.
I now return to my theory about why I think Midjourney created nude images. Let’s play Can you spot the difference for a second. Please take a moment and have a look a the four base images of the amber character above (not the ice cream version, but above them). Notice something? Yes, the first one appears NOT to wear clothes. I did not realise this when testing, only upon revisiting my prompts and the results.
Nude volleyball
In any case in my testing I picked the amber character 1/4, on the very left side. Again using –cref I added playing beach volley ball and got the four images below. I was very surprised as I had thought nude pictures were not allowed and here Midjourney without my prompting for it happily renders bare breasts. I have no issues with nudity, but because I am a cautious person and see potential issues in showing nude pictures in my blog post I chose to censor the images.
The second row of images is based on the prompt walking down Sunset Bulevard in the twilight using –cref with the same amber character 1/4). Here, if you look closely you can see the character has changed somewhat.
Intrigued, I wanted to see if this was something reproducible. So, I created a new character woman in her 20s, full body view, standing on the street, long blonde stright hair –style raw –ar 5:7 – below are the four images I received. I picked character 1/4 and 4/4 for tests with other, more interesting prompts you’ll see later on.
Volleyball with creative clothing
First off you can see below the character is looking the same. I used –cref with the same prompt I added playing beach volley ball –ar 5:7. Now the character has clothes on. As I did not specifically prompted for sporty clothing Midjourney still felt the need to modify the clothing somewhat yet preserving the colours and fabric. Never mind the awkward contortions and missing limbs. Moreover the style has changed from photorealistic to something more stylistic as I did not prompt for style raw. I did this a couple of times and came to a rather obvious conclusion. If the base image has a character seemingly without clothes Midjourney will honour this when prompted with –cref.
Moving on to more interesting prompts
Let’s focus on more interesting image generation using –cref. Remember the 4th blond character? I used her trying out different styles and locations. Therefore all the prompts underneath are using this image as –cref.
Hover over images to see the prompts.
To finish off this testing line I wanted to see how –cref worked with changing the aspect ratio. In order to do so I took from above images the one I liked best and repeated the prompt dancing wildly with lots of people at a rave party on Mars, view form above, in anaglyph style and added –ar 3:2 resulting in a convincing landscape image. Oh and BTW, during these tests I noticed Midjourney’s Upscale has been pushed to 2688 × 1792. I have no idea when this was implemented.
Revisiting an old character
Meet blond, a still nameless character from my Greek tragedy. The prompt is pretty basic: lovely Caucasian woman in her 40s, short hair, blond hair, light amount of freckles. On a side note, there are a few stereotype base characters that you will run into if you prompt a lot for Caucasian woman or man. This does not speak for a vast pool of training material, or put differently a diversity friendly set of characters you can create. Of course, if you prompt for specifically or use the Vary option you can get more nuanced and more diverse characters. Anyhow, this is what I was working with.
In conclusion
Apart from the what was supposed to be a black and white rendering, I think Midjourney did a nice job. I like the consistency –cref has brought to character creation. I can see graphic stories, guides etc. being made with this feature where you have a recurring person appearing. Again, hover over the images to see the prompts.
Thank you for reading!