Short answer
In DALL·E 2's editor, inpainting means erasing part of an image and describing what should fill the gap, while outpainting means placing a frame partly outside the image and describing what lies beyond the edge. Each generation costs one credit, and the model matches the style, lighting and textures of what is already there.
Follow-up question When is editing better than regenerating?
Until recently, a DALL·E 2 image stayed inside its original frame, and you could only change things within it. On August 31, OpenAI added the missing direction: outpainting, which continues a picture past its original borders. Together with inpainting, the older ability to replace part of an image, it turns DALL·E from a picture generator into something closer to an editing tool.
Both features live in the DALL·E editor, which is in beta and, for now, works fully only on desktop. On a phone you can still inpaint through the Edit button, but outpainting needs a computer.
The two tools in plain words
Inpainting fills a hole. You erase an area of an image, type a description of what should be there, and DALL·E paints new content into that area only. The rest of the picture stays as it was.
Outpainting adds canvas. You place the editor's generation frame so that it overlaps the edge of your image, describe what lies beyond, and DALL·E paints the new area to match. Repeat in any direction and you can build a large image in any aspect ratio, from a tall poster to a wide banner. OpenAI's own showcase extends Vermeer's Girl with a Pearl Earring into a whole room around her.
In both cases the model takes the existing picture into account, including shadows, reflections and textures, so the new parts blend in rather than looking pasted on.
A worked example: from square photo to website banner
Say you have a square photo of a blue bicycle leaning against a café wall, and you need a wide banner for a website. There is also a rubbish bin next to the bicycle that you would rather not show. Here are the steps:
- Open the editor. Upload the photo, or pick an image from your DALL·E history, and click Edit. You can also start from a blank canvas at labs.openai.com/editor. Note that DALL·E rejects uploads containing realistic faces, so choose a photo without people.
- Remove the bin (inpainting). Select the Erase tool and paint over the bin, leaving a little margin around it. In the prompt box, describe the whole scene with the change you want:
A blue bicycle leaning against a pale stone café wall, a terracotta pot with a small olive tree beside it, soft morning light, photograph- Pick the best result. Each generation offers several options. Choose the one where the pot's shadow falls the same way as the bicycle's.
- Extend to the right (outpainting). Drag the generation frame so that roughly a third to half of it still covers the photo and the rest hangs over empty canvas. Describe the scene continuing in that direction:
The same pale stone café wall continuing to the right, a wooden door with a brass handle, soft morning light, photograph- Extend to the left. Repeat with a prompt for the left side, for example a window with café tables reflected in the glass.
- Download. Use the Download tool to save a PNG. Expanded images are not saved automatically yet, so download after every step you like.
The proportions in step 4 are a rule of thumb, not an official figure. The principle behind it is from OpenAI's editor guide: the generation frame is all the model can see when it paints, so it needs enough of the existing picture to keep the style from drifting.
Try it: Take one image you have already made in DALL·E and outpaint it once in each direction, keeping your prompts to the same lighting and style words. Then do it again with less of the original inside the frame, and compare how far the style wanders.
Tips from the editor guide
OpenAI's help article adds a few practical tips. If there are characters in the scene, complete them first and the landscape later, so their bodies come out right. Keep enough of the existing image in the frame. As you move further from the center, ask for a muted color palette to avoid colors becoming oversaturated. And think about the story you want the larger picture to tell before you choose which way to extend it.
You can also upload other images, resize them and place them on the canvas, which lets you blend two pictures or "uncrop" one to give it more room.
When is editing better than regenerating?
Edit when most of the image is already right. If the composition, lighting and main subject work and only one area is wrong, such as an object, a hand or a patch of background, inpainting fixes that area and leaves everything you like untouched. Regenerating from scratch throws away the good parts and rolls the dice on all of them again.
Edit when you need a different shape. If a square image is good but you need a banner, a phone wallpaper or a book cover, outpainting extends what you have instead of hoping a new prompt produces something equally good in a new frame.
Regenerate when the problem is the whole idea: the wrong style, a crowded composition, or a subject that doesn't look right anywhere. In those cases, you'll spend more effort patching than starting over.
Cost is similar either way. In the editor, each click of Generate uses one credit, however much of the canvas you fill. A fresh text prompt also costs one credit and returns four images, while an edit or variation returns three. For a large outpainted piece, the credits add up one frame at a time, so plan your extensions before you start.
Sources
- DALL·E: Introducing Outpainting — OpenAI, August 31, 2022
- DALL·E Editor Guide (OpenAI Help Center, archived 5 September 2022) — OpenAI Help Center (David Schnurr), August 31, 2022
- DALL·E Now Available in Beta — OpenAI, July 20, 2022