ControlNet Preprocess MLSD
Straight-line ControlNet conditions, without the annotator stack
- image
- image
MLSD is the ControlNet preprocessor for people who care about straight lines: it detects the line segments in an image - walls, door frames, railings, desks - and produces a clean wireframe of the geometry. If you've ever tried to generate a building, an interior, or a product on a table and watched the model invent a subtly wrong wall, MLSD is the leash that keeps it honest. This node runs that preprocessor on Runware's cloud and hands you the condition map as an IMAGE.
It's one of four Runware/Image/runware preprocess nodes in the pack (MLSD, scribble, seg, tile), and they all fill the same role in a workflow: produce the ControlNet conditioning image locally-free, wire it into the Runware ControlNet builder, then into a model node. The preprocessor is the half of ControlNet people usually don't want to install - a pile of annotator models with finicky versions. Here it's a socket.
The inputs
Required: image (IMAGE) - the reference whose geometry you want to extract. Architecture shots, interiors, anything with man-made straight lines.
Optional: outputFormat (JPG default, plus PNG/WEBP) and the ttl group. That's the whole surface - a one-job node with no parameters to fiddle, which is exactly right. Output is a native image (IMAGE): the extracted line map, ready to feed a ControlNet condition.
If the map looks too noisy or too sparse, that's not a knob you have here - it's a signal about your source. Crisp, high-contrast source photos give crisp maps; soft, grainy photos give mush. Feed it good geometry and it returns good geometry.
How it works
Pack-standard: your image is encoded as a PNG data URI, MLSD detection runs on Runware's GPUs, and the resulting line map is downloaded back into your graph. The preprocessor only ever needs the one input - the ttl/outputFormat widgets are the shared pack block. Cost per run lands on the title bar.
Then the map goes into the actual ControlNet: wire it into the Runware ControlNet builder's condition socket, set your weight (the SD-era range was 0.3–0.7 for loose guidance, 0.8–1.2 for strict adherence), and connect that to a model node. The preprocess node does nothing by itself - it's the front half of a ControlNet workflow, and it only earns its keep when the other half is wired up.
Install and gotchas
Install the pack once - ComfyUI Manager, search Runware - or git clone https://github.com/Runware/ComfyUI-Runware into custom_nodes + pip install -r requirements.txt, restart, and set a Runware API key (Settings → Runware API key, RUNWARE_API_KEY, or runware auth login).
The gotchas are about expectations, not setup. MLSD only models straight-line geometry - it will happily ignore the organic parts of a scene, and that's correct. And remember the whole chain costs per generation, so iterate on the source image before you iterate on the generation. For architecture and interior work, this is the difference between "a building" and your building.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | JPG | File format for the generated image. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |