Ad Photos With SDXL v1
Ad Photos With SDXL v1
Ad Photos With SDXL v1
Hi there, my name is Daniel Schweinert and Im a commercial photographer & technerd based in
Bavaria, Germany. I started to play with Stable Di usion since last year in 2022 and I’m really
impressed what this technology can do. Since then I’ve always wanted to use AI in my
professional work ow. If you want to check my work you’re welcome: www.schweinert.com
Without further ado, let’s get started.
In a nutshell:
We use a real photo of a person or object and remove the background. Then we save it as a PNG
le with transparent background. In Invoke AI 3.1.0 we drop it into the Uni ed Canvas adjust
some settings add a Control Net and let the AI create matching backgrounds based on our PNG
le and prompt.
1. Take your favorite image editing app (Photoshop, A nity, Gimp, etc.) and thoroughly remove
the background from your photo. Important - crop it so you get a square, 1:1 aspect ratio. (It
works with di erent aspect ratios too but right now this way it’s easier to overlap the Control
Net image, later on). On step 7 I will show you how to create di erent aspect ratios.
3. In the Uni ed Canvas make a bounding box the same size as your PNG image (1024x1024px
or 768x768px). It should be pretty easy by using the “snap to grid” setting. Now center your
bounding box around your object. If it is o -centre the Control Net will produce later a
duplicate bottle next to it. So it needs to overlap correctly.
Positive prompt:
RAW photo of a whisky bottle surrounded by grass, autumn, brown leaves lying around,
landscape photography, award winning photo, masterpiece, highly detailed, cinematic lighting
Negative prompt:
(3d render), cgi, cartoon, anime, painting, (3d modeling), crayon
Model:
When using SD1.5 models I noticed that I get better results when using special “INPAINTING”
models. They tend to integrate the PNG object way better into the scene. But with the newer
models like RealisticVision 5.1, CyberRealistic3.3, AbsoluteReality_v1.8.1, etc. the normal
ones work also great. Try it for yourself and see which produces better results.
For SDXL I found Crystal Clear XL, Juggernaut XL and NightVision XL worked fantastic!
5. ControlNet:
For SD1.5 models enable ControlNet and select “softedge”. Use the same PNG le as the
control image. Drag and drop it from the assets folder into the small square (don’t use the
new option “import from canvas” or it will mess up your alignment). ControlNet is used to
guide the AI on how to create the bottle. Without ControlNet most of the time it will add a
di erent bottle cap or change the shape of it, etc.
Begin / End Step Percentage: Set Begin to 0% - 30% < play with the “Begin” value!
When using SD1.5 models it usually stays at 0% but especially with SDXL, I found that all my
backgrounds were blurry and the things that I prompted were not considered at all. When I
increased the percentage to 15%, the prompt had enough time to generate the scene before
the Control Image kicked in. Try di erent values and see what works best for you.
For SDXL enable ControlNet and select “softedge-sd-xl-1.0-dexined”. I don’t know if this is
a bug with this version of the ControlNet model but I have to increase the “Begin Step
Percentage” a little bit, else I always get solid or blurry backgrounds. See the picture
comparison below. You can download the ControlNet models for SDXL from here and add
them through the Model Manager: https://models.invoke.ai/
Hint: Click on the small arrow “Show Advanced” next to the red trash can icon. Set the
“Detect Resolution” to the size of your PNG le 1024x1024px. This produces much better
edges.
6. In ll and Scaling
Select as “In ll Method” patchmatch or tile. Patchmatch delivers cleaner results around the
edges of the bottle but it takes way longer to process, especially in SDXL. Tile 16-32 is much
faster but it sometimes creates a rough edge around the object that does not look good.
Compositing Settings
Mask Adjustment Blur: 0 (everything above zero produced a bad edge around the bottle)
Coherence Pass Steps 10 (if this value is too big it adds things around the bottle)
Strength 0.15 (if too big it changes the shape of the bottle, if too low the edge looks ugly)
These were the settings I used to create the images. Feel free to experiment. Depending on your
model try out di erent sampling methods, they will produce quite di erent results - DDIM, Euler A,
DPM++ 2M Karras, DPM++ 2M SDE Karras, etc. If you nd a better work ow or settings, please
let me know, I’m all ears. Happy denoising :-)