֍
Use a mask to generate images
In this example, we'll generate a mask from a logo image with RemoveBackground, and use that mask to generate variations of the image using two workflows:
- Using StableDiffusionXLControlNet with the
illusion
method to generate illusions incorporating the mask. - Using StableDiffusionXLControlNet with the
edge
method followed by StableDiffusionXLInpaint to fill a mask with content and then generate inside the mask.
First, initialize Substrate:
Here's the original image:
1. Generate illusions
This workflow uses RemoveBackground to generate a mask, followed by StableDiffusionXLControlNet with the illusion
method to generate a two images incorporating the mask into a view of the ocean from above:
Experimenting with different prompts can produce striking results:
2. Generate a variation and inpaint
This workflow uses RemoveBackground to generate a mask, StableDiffusionXLControlNet with the edge
method to generate a variation of the original, and StableDiffusionXLInpaint to generate a variation inpainting inside the mask.
res.get(controlnet)
res.get(inpaint)