Stable Diffusion Generation: Widescreen Grungy Factory

I like the aesthetic of vast industrial spaces filled with pipes and wires and rust, so I made a wide image designed to span both my 1920 x 1080 monitors. My meagre GTX-970 can’t manage such a large image so I generate a bunch of smaller images, find one I like, and then extend it and upscale.

(I’ve only included the main steps below – I often use inpainting to refine various parts of the image along the way.)

Here’s the initial image I chose, with this prompt:

interior of a huge industrial factory, (hundreds of machines:1.1), massive gears and mechanisms, pipes, tubes, wires, gritty, rusty, dirty, grim, neon lighting, (cyberpunk:1.1)

I used 8 steps and DPM++ SDE for the sampler.

Starter image

I liked the variety of things, and particularly the machine on stands near the middle and the large tank on the right side. Now I spent some more steps on that to improve the quality, using img2img. I used the same sampler but with 30 steps, and a denoising of 0.4 to generally keep the structure but allow the detail to be rebuilt.

Ran through img2img

The quality is improved – more crisp. Next I used outpainting to extend the image left and right.

Extended horizontally to 1408 px

The glowing doorframe is a nice cyberpunk touch. The right edge gives the feeling of the hazy outdoors with industrial smog. The boxes in the foreground right are off, though, so that needed help. I inpainted that area with this prompt:

interior of a huge industrial factory, (metal boxes:1.2) of broken machines, gritty, rusty, dirty, grim, concrete

Fixed boxes

Much better! Time to outpaint to extend further.

Extended horizontally to 1792 px

A mysterious box with a glowing symbol – noice! But it also looks a bit janky. Rather than a symbol, I preferred an opening/window to something going on inside the box. Inpaint it! Here is the prompt:

interior of a huge industrial factory, glowing furnace, high temperature, gritty, rusty, dirty, grim, concrete, metal, glass

Refine box on the bottom left

That’s better. Time to extend to the full width necessary: 1920 x 512 pixels. I generated a bunch of outpaintings and settled on this one.

Extended horizontally to 1920 px

Now that the ratio is basically correct, it’s time to upscale. I used ControlNet with “tile_resample” and Ultimate SD upscale with 4x-UltraSharp to preserve the structure. It was 30 steps with the DPM++ SDE sampler, CFG of 7, and a denoising strength of 0.5.

Upscaled to 3840 x 1080 px

I was very pleased with the result. A few areas could use some help. The glowing doorway is eye-catching so I wanted that to be more interesting. The large tank on the right side with the cyan writing could be improved too. Lastly, I wanted the far right side to be more outdoor than interior and for the reflections to be more consistent. So I inpainted each of those.

Inpainted elements for interest, detail, and consistency

The final picture is one of my favourite Stable Diffusion generations yet.