Hi @petitclercj The steps are fairly easy;
- In SketchUp assign specific colors to all the faces. The RGB values for these segmentation colors can be found at GoogleDocs for instance. Each color is a category (wall, grass, street, etc).
- Export an image from SketchUp while shadows are disabled. You will get an image with weird colors like in the pic below.
- Download the segmentation model file from Huggingface
- Open your StableDiffusion app (Automatic1111 / InvokeAI / ComfyUI). They all can work with controlnet as long as you don’t use the SDXL model (at this time).
- Enable controlnet, open the image in the controlnet-section. In controlnet, keep the preprocessor at ‘none’ because you already have an image with segmentation colors but set the model to ‘seg…’
- In the prompt describe your image. SD will generate a new image using the seg-colored image from SketchUp and the corresponding categories from the seg-colors-table and your prompt.
You can also have controlnet generate the seg colors from a regular colored image using a seg-model in the preprocessor but I prefer to create it myself to have total control.
See this nice explanation at Reddit.
