Two New Ways I Used Midjourney Inpainting (and some old ones)

Alex Tully
7 min readSep 6, 2023

--

I had an idea to “inpaint” to achieve a specific kind of cinematic perspective: I wanted it to be as if the photographer had taken one step off a cliff and snapped off a pic in the moment before he dropped into the abyss. I suppose you could do it for real by keeping a drone at eye-level and flying it out off a cliff. But I wanted a fantasy landscape, with all the following specific things:

  1. A bottomless void yawning at the bottom of the image, with nothing visible but a fog inversion far below (with a long exposure to bring out the fog)
  2. Lush rice terraces going down to the cliff edge (with the colours made more vibrant using HDR)
  3. For the terraces to be carved into a mountain of pillow basalt
  4. Dark tunnels going inside the mountain
  5. Leading lines to guide the viewer to one of the tunnel entrances (I planned to use inpainting to edit those in if necessary)
  6. A scene shot during nautical twilight (that period after sunset or before dawn when the horizon is visible, but it’s too dark to read a book)
  7. An aurora (Midjourney often has problems generating these, often tending to blend it into other objects)

Here’s the end result:

Made in Midjourney (Title: Aurora Rice Cavates) https://www.instagram.com/p/Cw10KR5r191/

To begin with, I prompted: long_exposure fisheye_photo of a wet rice paddy at the base of a pillow_basalt cliff_face, nautical_twilight, ethereal fog, high HDR, vibrant colours, noise_reduction, A7R II — s 50 — style raw

If you understand everything in the prompt then you can skip the below list. But there are three things I’ll explain:

  1. Fisheye perspective: I hoped this would make the cliff drop seem more dramatic, since the abyss would go down on the periphery of the image (when the time came to add that in).
  2. Noise reduction: This is a post-processing technique that photographers sometimes use to correct a problem that can arise when shooting in low-light (among other things).
  3. A7R II: This high-end Sony camera is popular with landscape photographers.
  4. Underscores in the prompts: Please see this post.

Anyway, from this initial prompt the best image was:

Made in Midjourney

It had some weird lines going up the vertical rock surfaces, but I figured I could remove them later in inpainting.

I went into Vary (Image) and typed in the prompt: long_exposure fisheye_lens photo of cliff_edge over an abyss with fog filling the void, cloud_inversion in a chasm, basalt_cliffs, pillow_basalt, nautical_twilight, high HDR, vibrant colours, noise_reduction, A7R II — s 50 — style raw
I selected the water flowing between the rocks in the centre of the image, together with all the ground to the right of that. I also selected some of the ground to the left of that, as shown below:

The zone I selected for inpainting in Midjourney

The bottom of the basalt wall on the left would make a great leading line, and I wanted to create a cliff edge curving around to meet that, which would function as another leading line. But at first Midjourney gave me:

Made in Midjourney

This was good, but Midjourney had taken the liberty of creating another level of ground lower down, and also built out the ground too far at the original level (where the rice plants are) into a sharp 90 degree coener. What followed was an iterative process of:

  1. Going into Vary (Region), with the same text prompt as above
  2. Inpainting, selecting the same area as in my annotated photo (plus some other parts I didn’t like)
  3. Out of the 4 output images, selecting the one that was closest to my vision.
  4. Running inpainting again

Eventually I got:

Made in Midjourney

The cliff was now looking how I wanted, but there was some green at the bottom of my image. It looked like treetops poking through the fog, which detracted from the whole “bottomless abyss” aesthetic I was going for. So I selected that in inpainting, and tweaked the prompt to: long_exposure fisheye_lens photo of cliff_edge over a bottomless abyss with fog filling the void, cloud_inversion in a chasm, basalt_cliffs, pillow_basalt, nautical_twilight, high HDR, vibrant colours, noise_reduction, A7R II — s 50 — style raw

This yielded what I wanted:

Made in Midjourney

So far I just had a rice paddy on a cliff ledge, but I wanted to make terraces going up in levels. So I selected the top portion of the rock wall on the left for inpainting, and prompted: long_exposure fisheye_lens photo of rice_terraces, basalt_cliffs, pillow_basalt, nautical_twilight, high HDR, vibrant colours, noise_reduction, A7R II — s 50 — style raw

Midjourney drew in some houses! Adding things like — no buildings to the prompt made the bot go screwy.

Made in Midjourney

I absolutely did not want houses like this, so without inpainting this would have been a dead end. But now I could just paint over them in a later stage. This Youtuber here describes the medium of encaustic painting as something where “there are never failed projects, only projects you haven’t finished yet” and now I’d say the same for Midjourney.

It was time to bring in my tunnel entrances. Text prompts were failing here, so I used an image as the prompt. The below is one cropped down portion of what I generated from the prompt: exterior, long exposure photo of a rice paddy at the base of a pillow_basalt cliff_face with slit windows and a tunnel entrance, dawn, fog, chiaroscuro, high HDR, A7R II — s 50 — style raw

Made in Midjourney

Having generated that, I went to inpainting in my main work, selected the following:

  • The houses
  • The plants which were lit up yellow by the light from the houses
  • The sky above them
  • Most of the rock walls above the main ledge.

Then I prompted: <URL of Above Image>::3 tunnel_entrances, exterior, pillow_basalt, basalt_cliffs, nautical_twilight, high HDR, noise_reduction, A7R II — s 50 — style raw

I experimented with varying the prompt weights for the image portion, but 3 got me the nicest images. I selected this one:

Made in Midjourney

It’s got the most noticeable tunnel entrance right where the cliff edge is leading the viewer’s eye. Additionally there are entrances on the higher ledge, almost invisible in the dark, which is exactly the type of thing I wanted.

The last stage was the aurora. I selected the sky in the top right (some of which was glitched anyway) for inpainting. I had to put a lot of things after — no to avoid glitches, but finally I had success with the prompt: long_exposure fisheye_lens photo of a green_aurora, thick fog, nautical_twilight, high HDR, vibrant colours, noise_reduction, A7R II — s 50 — style raw — no boat, building, window, circle

Made in Midjourney

A few more inpaints of ugly glitchy things I disliked, and I got my final result (titled Aurora Rice Cavates):

Made in Midjourney https://www.instagram.com/p/Cw10KR5r191/

Or cropped to landscape:

Made in Midjourney

In addition to things like image prompts in inpainting (already discussed in Tropical Zen Cave), this new piece demonstrates two ways to use inpainting to alter the composition of a your Midjourney art:

  1. By shifting perspective (in this case cutting away the ground except on the side of the image)
  2. By altering the path of lines, in order to lead the viewer’s eye where you want it to go

Sometimes the bot is stubborn and you need to inpaint several times to get close enough to where you want. But both of the above techniques would be applicable to a lot of image genres. Happy creating!

--

--

Alex Tully

Into Generative AI, but 100% Human-Written Blog (every word)・Bachelor’s in Maths・Master’s in Linguistics (@ANU 🇦🇺 )・Taught myself 🇯🇵 and 🇹🇭・Digital Nomad