Since I have weaker hardware, I never really stopped using it, and sometimes I come across techniques I’ve never seen before.
For example, I recently found a new model (Contra Base) and decided to run it through my standard set of prompts for comparison (I have a special spreadsheet for that). The author mentioned something called a tri-structured prompt for image generation, which they used during training. I didn’t recall seeing this approach before, so I decided to check it out.
Here’s a link to the article. In short:
- The initial prompt sets a general description of the image.
- Based on keywords in that description, additional clarification branches are created, separated by the
BREAK
command. - The same keyword is also added to the negative prompt via
BREAK
, which neutralizes its impact during generation. However, tokens after that keyword are processed within its context.
I'll assume you roughly understand this logic and won't dive into the finer details.
BREAK
is a familiar syntax for those using Automatic1111 and similar UIs. But I work in ComfyUI, where this is handled using a combination of two prompts.
https://preview.redd.it/gmr9c788uvje1.jpg?width=1757&format=pjpg&auto=webp&s=d2f925ea2af029dad2bc902ebc8933256e331b84
However, having everything in a single text field is much more convenient - both for reading and editing, especially when using multiple BREAK
separators. So I decided to use the word BREAK
directly inside the prompt. Fortunately, ComfyUI has nodes that recognize this syntax.
Let’s play around and see what results we get. First, we need to set up the basics. Let's start with the default pipeline.
For some reason, I wanted to generate a clown in an unusual environment, so I wrote this:
interesting view on the clown in the room juggles candle and ball BREAK view downward, wide angle, backlighting, ominous BREAK clown dressed in blue pants and red socks BREAK room in an old Gothic castle with a large window BREAK candle is red with gold candlestick BREAK ball is from billiard and has a black color BREAK window a huge stained-glass with scenes from the Bible
Not very readable, right? And we still need to write the negative prompt, as described in the article. A more readable format could look something like this:
https://preview.redd.it/hy9dyl4vuvje1.jpg?width=2257&format=pjpg&auto=webp&s=6c7e11caf7c283f2d294734e80339f814aabb77c
After some thought, I decided the prompt format should be more intuitive and visually clear while still being easy to process. So I restructured it like this:
interesting view on the clown in the room juggles candle and ball _view downward, wide angle, backlighting, ominous _clown dressed in blue pants and red socks _room in an old Gothic castle with a large window _candle is red with gold candlestick _ball is from billiard and has a black color __window a huge stained-glass with scenes from the Bible
The first line is the main prompt, with clarifying details listed below as keyword branches. I added underscores for better readability. They don’t affect generation significantly, but I’ll remove them before processing.
For comparison, of course, I decided to test what would be generated without BREAK commands to see how much of an impact they have. Let's begin! The resolution I want to make more than 768 points, which will give us repetitions and duplications without additional “dodging” of the model...
https://preview.redd.it/56ajxjtbvvje1.jpg?width=1930&format=pjpg&auto=webp&s=527fffb0453ec39a729844392160f49eb7b915be
As expected! One noticeable difference: the BREAK
prompt includes a negative prompt, while the standard one does not. The negative prompt slightly desaturates the image. So, let’s add some utilities to improve color consistency and overall coherence in larger images. I don’t want to use upscalers - my goal is different.
To keep it simple, I added:
- PatchModelAddDownscale (Kohya Deep Shrink)
- FreeU
- ResAdapter
- Detail Daemon Sampler
https://preview.redd.it/u0ojt8kgvvje1.jpg?width=1931&format=pjpg&auto=webp&s=5d67cce64d0afa572b627229b70c3edc594f34a4
Much better results! Not perfect, but definitely more interesting.
Then I remembered that in SD 1.5, I could use an external encoder instead of the one from the loaded model. Flux works well for this. Using this one, I got these results:
https://preview.redd.it/qxsnfvpjvvje1.jpg?width=1931&format=pjpg&auto=webp&s=e81626faac3c3075de9a087acc7ba0321887a28a
What conclusions can be drawn about using this prompting method? "It's not so simple." I think no one would argue with that. Some things improved, while others were lost.
By the way, my clown just kept juggling, no matter how much I tweaked the prompt. But I didn’t stress over it too much.
One key takeaway: increasing the number of “layers” indefinitely is a bad idea. The more nested branches there are, the less weight each one carries in the overall prompt, which leads to detail loss. So in my opinion, 3 to 4 clarifications are the optimal amount.
a smaller number of branches gives a clearer following
Now, let’s try other prompt variations for better comparison.
detailed view on pretty lady standing near cadillac _view is downward, from ground and with wide angle _lady is 22-yo in a tight red dress __dress is red and made up of many big red fluffy knots _standing with her hands on the car and in pin-up pose with her back to the camera _cadillac in green colors and retro design, it is old model
https://preview.redd.it/sb0n3k48wvje1.jpg?width=1931&format=pjpg&auto=webp&s=79de30ab70b63c3e56777b64cc39a0c1438352c3
While working with this, I discovered that Kohya Deep Shrink sometimes swaps colors - turning the dress green and the car red. It seems to depend on the final image resolution. Different samplers also handle this prompt differently (who would’ve thought, right?).
Another interesting detail: I clearly specified that the dress should be fluffy with large knots. In the general prompt, this token is considered, but since there are many layers, its weight is diluted, resulting in just a plain red dress. Also, the base prompt tends to generate a doll-like figure, while the branches produce a more realistic image.
Let’s try another one:
detailed painting of landscape of rock and town under that _landscape of high red rock wall with carving of cat silhouette _rock is a giant silhouette of cat, carved into the slopes _town consists of small wooden houses that rise in tiers up the cliff _painting with oil in expressionist style, three-dimensional painting, and vibrant colors
https://preview.redd.it/pjmlo87nwvje1.jpg?width=1931&format=pjpg&auto=webp&s=74ccaf03b088a6f80ee50d824d5d42d074d7498e
No cats here. And no painterly effect from the branches. My guess? Since the painting-style tokens are placed in just one out of five branches, their total weight is only one-fifth of the overall prompt.
Let’s test this by increasing the weight of that branch. With a small boost, no visible changes. But if we overdo it (e.g., 1.6), abstract painting tokens dominate, making the image completely off-topic.
weight of painting brunch is 1.55
Conclusion: this method is not suitable for defining overall art style.
And finally, let’s wrap up with a cat holding a sign. Of course, SD 1.5 won’t magically generate perfect text, but splitting into branches does improve results.
cat with hold big poster-board with label _cat is small, fluffy and ginger _poster-board is white, holded by front paws _label is ("SD 1.5 is KING":1.3)
https://preview.redd.it/was5qfa2xvje1.jpg?width=1931&format=pjpg&auto=webp&s=13f3f3dd13a5aaed947e9edd8bd19624cdaed8c8
Final thoughts
In my opinion, this prompting technique can be useful for refining a few specific elements, but it doesn't work as the original article described. More branches = less influence per branch = loss of control.
Right now, I think there are better ways to add complexity and detail to SD 1.5 models. For example, ELLA handles more intricate prompts much better. To test this, I used the same prompts with ELLA and the same seed values:
https://preview.redd.it/0zbvz1hfxvje1.jpg?width=2900&format=pjpg&auto=webp&s=7940ab202826a42517e762af8db3b0dffb5068e2
If anyone wants to experiment, I’ve uploaded my setup here. Let me know your thoughts or if you see any flaws in my approach.
Happy generating! 🎨🚀
submitted by