{"course":{"slug":"making-things-with-ai","title":"Making Things with AI","url":"https://addaly.com/learn/making-things-with-ai","level":"beginner","track":"create"},"lesson":{"slug":"structural-conditioning","title":"Conditioning on structure: depth, edges and pose","url":"https://addaly.com/learn/making-things-with-ai/structural-conditioning","position":32,"of":84,"minutes":9,"answer":"A control network injects a spatial map into the denoising loop at every step, fixing geometry while leaving content and style to the prompt, and each map type constrains a different thing.","keyIdea":"A control network injects a spatial map into the denoising loop at every step, fixing geometry while leaving content and style to the prompt, and each map type constrains a different thing."},"body":{"format":"markdown","text":"## The mechanism, briefly\n\nA structural control takes an image-shaped map (an edge drawing, a depth field, a stick-figure skeleton) and feeds it into the denoising network alongside the text conditioning, at every step and at matching spatial positions.\n\nThe crucial difference from a text prompt is that the map is *spatially aligned* with the latent. Cell by cell, the network is told what should be there. There is no attention competition, no binding problem, no reliance on the caption corpus containing a word for the arrangement you want. This is why structural conditioning solves the problems the previous module said prompting cannot.\n\n> Figure: What a depth map pins, and what it leaves alone. Fixed by the map: Where every surface sits in space; Camera position and perspective; The silhouette of each object; Relative scale between objects; The composition you sketched in twenty seconds. Still entirely the prompt's business: What the objects are made of; Colour, light and time of day; The medium: photograph, gouache, linocut; How many fingers are on the hand; Whether a sign spells anything. The map is spatially aligned with the latent, cell by cell, so there is no attention competition and no reliance on the caption corpus having a word for your arrangement. That is why conditioning solves what prompting cannot, and why it fixes none of the failures that were never spatial.\n\nThe best-known implementation is ControlNet, which trains a copy of part of the base model to accept the map. Others exist under different names: T2I-Adapter, and various built-in equivalents in hosted tools. The behaviour is close enough that the choice of map matters more than the choice of implementation.\n\n## Which map for which job\n\n**Canny edges.** A hard black-and-white line drawing produced by an edge detector. Constrains outlines exactly. Use for: redrawing an existing image in a new style while keeping every contour, turning a line drawing into a rendered image, architectural work. Limitation: it is *strict*, so any noise in the edge detection becomes a line the model dutifully draws.\n\n**Depth.** A greyscale map where brightness is distance. Constrains three-dimensional arrangement while leaving surface detail free. Use for: keeping a composition and camera while changing everything about the content. This is the most generally useful map and the best first choice.\n\n**Pose.** A skeleton of joint positions. Constrains only the figure's arrangement, not its size, clothing or surroundings. Use for: putting a specific gesture or stance into an otherwise free image. Limitation: it carries no depth, so a figure can come back facing the wrong way, and hands are only a few points.\n\n**Soft edge and scribble.** Loose line maps that constrain suggestion rather than outline. Use for: turning a rough sketch into an image without the model copying your bad lines.\n\n**Segmentation.** A map of coloured regions, each colour meaning a category. Use for: laying out a scene by region: sky here, building there.\n\n**Normal maps and line art** cover more specialised cases, and the same principle applies throughout: pick the map that constrains what you care about and nothing else.\n\n## The strength and timing settings\n\nTwo controls decide how hard the map is applied.\n\n**Conditioning strength.** At 1.0 the map is followed closely; at 0.4 it is a suggestion. Very high strength on a noisy map produces artefacts, because the model is being forced to render detection noise.\n\n**Start and end steps.** Applying the map only for the first 60% of steps fixes the composition and then releases the model to render freely. This is a useful trick: it gives you the layout without the map's stiffness, and it usually improves texture.\n\n## Where the maps come from\n\nYou do not need a photograph. All of these are useful sources:\n\n- **A rough sketch,** drawn in Krita, GIMP or on paper and photographed. Scribble and soft-edge maps are designed for exactly this.\n- **A 3D block-out** in Blender, which is free and gives you an exact depth map and exact camera control. For product shots and architecture this is the professional route and it is not difficult at the block level.\n- **A photograph you took,** run through a depth estimator. Most tools include one.\n- **A pose you built** in a free posing tool or extracted from any reference photograph.\n\nThe general point: you supply the geometry from something that is good at geometry, and the model supplies the surfaces, which is what it is good at.\n\n## The honest limits\n\nStructural conditioning constrains where things are. It does not constrain what they are, and it does not fix any of the failures from the previous module that are not spatial. A depth map of a hand does not produce five fingers. A pose does not produce a consistent face. An edge map does not spell.\n\nIt also introduces its own failure: **over-constraint**. A model given a strong edge map of a photograph and asked for an oil painting will produce a photograph with paint texture, because every contour is pinned. If your restyling looks like a filter rather than a reinterpretation, lower the strength or switch from canny to depth. The fix is almost always to constrain less."},"check":{"question":"You want to reinterpret a photograph as a woodcut print, keeping the composition but not the photographic detail. Which conditioning choice fits best?","options":[{"text":"Canny edges at full strength, so every contour of the original is preserved exactly in the print.","correct":false,"tempting":"Pins every contour including photographic noise, producing a photograph with woodcut texture rather than a woodcut."},{"text":"A pose map, since the arrangement of the subject is what needs to carry over.","correct":false,"tempting":"Pose carries only a figure's joints; it says nothing about the rest of the composition and does not apply to a scene without people."},{"text":"An image-to-image pass at strength 0.9, using the original photograph as the input image and putting \"woodcut print, bold carved lines\" in the prompt to drive the change of medium.","correct":false,"tempting":"At that strength almost nothing of the input survives, so the composition you wanted to keep is discarded."},{"text":"A depth map at moderate strength, ending partway through the run, so the arrangement is fixed and the surfaces are free.","correct":true}]},"prev":{"slug":"masks-and-inpainting","title":"Masks, feathering and the context window","url":"https://addaly.com/learn/making-things-with-ai/masks-and-inpainting"},"next":{"slug":"small-fine-tunes","title":"Teaching it something it does not know","url":"https://addaly.com/learn/making-things-with-ai/small-fine-tunes"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Conditioning on structure: depth, edges and pose', in Making Things with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/making-things-with-ai/structural-conditioning (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Conditioning on structure: depth, edges and pose","courseTitle":"Making Things with AI","module":{"index":4,"slug":"control-not-luck","title":"Control: getting the picture you actually need"},"answer":null,"keyIdea":"A control network injects a spatial map into the denoising loop at every step, fixing geometry while leaving content and style to the prompt, and each map type constrains a different thing.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"caption":"The map is spatially aligned with the latent, cell by cell, so there is no attention competition and no reliance on the caption corpus having a word for your arrangement. That is why conditioning solves what prompting cannot, and why it fixes none of the failures that were never spatial.","left":{"title":"Fixed by the map","items":["Where every surface sits in space","Camera position and perspective","The silhouette of each object","Relative scale between objects","The composition you sketched in twenty seconds"]},"right":{"title":"Still entirely the prompt’s business","items":["What the objects are made of","Colour, light and time of day","The medium: photograph, gouache, linocut","How many fingers are on the hand","Whether a sign spells anything"]},"title":"What a depth map pins, and what it leaves alone","type":"compare"},"alt":"Figure: What a depth map pins, and what it leaves alone. Fixed by the map: Where every surface sits in space; Camera position and perspective; The silhouette of each object; Relative scale between objects; The composition you sketched in twenty seconds. Still entirely the prompt’s business: What the objects are made of; Colour, light and time of day; The medium: photograph, gouache, linocut; How many fingers are on the hand; Whether a sign spells anything. The map is spatially aligned with the latent, cell by cell, so there is no attention competition and no reliance on the caption corpus having a word for your arrangement. That is why conditioning solves what prompting cannot, and why it fixes none of the failures that were never spatial."}},"blocks":[{"t":"h2","id":"the-mechanism-briefly","runs":[{"text":"The mechanism, briefly"}]},{"t":"p","runs":[{"text":"A structural control takes an image-shaped map (an edge drawing, a depth field, a stick-figure skeleton) and feeds it into the denoising network alongside the text conditioning, at every step and at matching spatial positions."}]},{"t":"p","runs":[{"text":"The crucial difference from a text prompt is that the map is "},{"text":"spatially aligned","i":true},{"text":" with the latent. Cell by cell, the network is told what should be there. There is no attention competition, no binding problem, no reliance on the caption corpus containing a word for the arrangement you want. This is why structural conditioning solves the problems the previous module said prompting cannot."}]},{"t":"p","runs":[{"text":"The best-known implementation is ControlNet, which trains a copy of part of the base model to accept the map. Others exist under different names: T2I-Adapter, and various built-in equivalents in hosted tools. The behaviour is close enough that the choice of map matters more than the choice of implementation."}]},{"t":"h2","id":"which-map-for-which-job","runs":[{"text":"Which map for which job"}]},{"t":"p","runs":[{"text":"Canny edges.","b":true},{"text":" A hard black-and-white line drawing produced by an edge detector. Constrains outlines exactly. Use for: redrawing an existing image in a new style while keeping every contour, turning a line drawing into a rendered image, architectural work. Limitation: it is "},{"text":"strict","i":true},{"text":", so any noise in the edge detection becomes a line the model dutifully draws."}]},{"t":"p","runs":[{"text":"Depth.","b":true},{"text":" A greyscale map where brightness is distance. Constrains three-dimensional arrangement while leaving surface detail free. Use for: keeping a composition and camera while changing everything about the content. This is the most generally useful map and the best first choice."}]},{"t":"p","runs":[{"text":"Pose.","b":true},{"text":" A skeleton of joint positions. Constrains only the figure’s arrangement, not its size, clothing or surroundings. Use for: putting a specific gesture or stance into an otherwise free image. Limitation: it carries no depth, so a figure can come back facing the wrong way, and hands are only a few points."}]},{"t":"p","runs":[{"text":"Soft edge and scribble.","b":true},{"text":" Loose line maps that constrain suggestion rather than outline. Use for: turning a rough sketch into an image without the model copying your bad lines."}]},{"t":"p","runs":[{"text":"Segmentation.","b":true},{"text":" A map of coloured regions, each colour meaning a category. Use for: laying out a scene by region: sky here, building there."}]},{"t":"p","runs":[{"text":"Normal maps and line art","b":true},{"text":" cover more specialised cases, and the same principle applies throughout: pick the map that constrains what you care about and nothing else."}]},{"t":"h2","id":"the-strength-and-timing-settings","runs":[{"text":"The strength and timing settings"}]},{"t":"p","runs":[{"text":"Two controls decide how hard the map is applied."}]},{"t":"p","runs":[{"text":"Conditioning strength.","b":true},{"text":" At 1.0 the map is followed closely; at 0.4 it is a suggestion. Very high strength on a noisy map produces artefacts, because the model is being forced to render detection noise."}]},{"t":"p","runs":[{"text":"Start and end steps.","b":true},{"text":" Applying the map only for the first 60% of steps fixes the composition and then releases the model to render freely. This is a useful trick: it gives you the layout without the map’s stiffness, and it usually improves texture."}]},{"t":"h2","id":"where-the-maps-come-from","runs":[{"text":"Where the maps come from"}]},{"t":"p","runs":[{"text":"You do not need a photograph. All of these are useful sources:"}]},{"t":"ul","items":[[{"text":"A rough sketch,","b":true},{"text":" drawn in Krita, GIMP or on paper and photographed. Scribble and soft-edge maps are designed for exactly this."}],[{"text":"A 3D block-out","b":true},{"text":" in Blender, which is free and gives you an exact depth map and exact camera control. For product shots and architecture this is the professional route and it is not difficult at the block level."}],[{"text":"A photograph you took,","b":true},{"text":" run through a depth estimator. Most tools include one."}],[{"text":"A pose you built","b":true},{"text":" in a free posing tool or extracted from any reference photograph."}]]},{"t":"p","runs":[{"text":"The general point: you supply the geometry from something that is good at geometry, and the model supplies the surfaces, which is what it is good at."}]},{"t":"h2","id":"the-honest-limits","runs":[{"text":"The honest limits"}],"role":"limit"},{"t":"p","runs":[{"text":"Structural conditioning constrains where things are. It does not constrain what they are, and it does not fix any of the failures from the previous module that are not spatial. A depth map of a hand does not produce five fingers. A pose does not produce a consistent face. An edge map does not spell."}]},{"t":"p","runs":[{"text":"It also introduces its own failure: "},{"text":"over-constraint","b":true},{"text":". A model given a strong edge map of a photograph and asked for an oil painting will produce a photograph with paint texture, because every contour is pinned. If your restyling looks like a filter rather than a reinterpretation, lower the strength or switch from canny to depth. The fix is almost always to constrain less."}]}],"check":{"question":[{"text":"You want to reinterpret a photograph as a woodcut print, keeping the composition but not the photographic detail. Which conditioning choice fits best?"}],"options":[{"text":[{"text":"Canny edges at full strength, so every contour of the original is preserved exactly in the print."}],"correct":false,"tempting":[{"text":"Pins every contour including photographic noise, producing a photograph with woodcut texture rather than a woodcut."}]},{"text":[{"text":"A pose map, since the arrangement of the subject is what needs to carry over."}],"correct":false,"tempting":[{"text":"Pose carries only a figure’s joints; it says nothing about the rest of the composition and does not apply to a scene without people."}]},{"text":[{"text":"An image-to-image pass at strength 0.9, using the original photograph as the input image and putting “woodcut print, bold carved lines” in the prompt to drive the change of medium."}],"correct":false,"tempting":[{"text":"At that strength almost nothing of the input survives, so the composition you wanted to keep is discarded."}]},{"text":[{"text":"A depth map at moderate strength, ending partway through the run, so the arrangement is fixed and the surfaces are free."}],"correct":true,"tempting":null}],"order":[1,2,0,3],"why":null},"prev":{"slug":"masks-and-inpainting","title":"Masks, feathering and the context window","minutes":8},"next":{"slug":"small-fine-tunes","title":"Teaching it something it does not know","minutes":9}}}