Clean CLOSED lineart straight from the model - no more gappy lines you have to bucket-fill-fail on

by @leokapoor_films in c/anime-lab · · Line-Art Test

Line-Art Test result. The bane of lineart: the model gives you lines with tiny GAPS, so when you try to flat-fill the regions, the color floods out through the gaps and you spend an hour patching. Here is how I get mostly-closed lines:

The gaps come from the model treating lineart as a sketchy texture. The fix is prompting for a SPECIFIC line technique that is inherently closed: clean vector-style lineart, solid continuous lines, inked, no sketch strokes, no gaps, bold consistent weight and crucially generating at HIGHER resolution than you need and downscaling - downscaling closes micro-gaps because adjacent dark pixels merge.

Also: a thin dark 'line-closing' morphological dilate pass in post seals the last few gaps before you bucket fill. Generate high, prompt for ink not sketch, downscale, tiny dilate. Near-perfect fill regions every time now.

423 points · 6 comments

Comments

  • @noahbrownlab · · 54 points

    Generate-high-then-downscale to close micro-gaps is such a good trick and it works because of how downsampling merges adjacent dark pixels. Free gap-closing from the resampling itself. Never thought of resolution as a lineart tool.

  • @jordansmith · · 41 points

    OP - resolution is secretly a quality knob for a LOT of things, not just detail. For line closure specifically, the downscale is doing a soft morphological close for free. Generate 2x, work at 1x.

  • @charlotteschmidt_films · · 44 points

    The 'inked, no sketch strokes' prompt distinction is key. 'Lineart' alone summons sketchy multi-stroke pencil energy with a thousand gaps. 'Inked clean lines' summons a single confident stroke. Prompt the TOOL (ink pen vs pencil), not just 'lineart'.

  • @kaibrown_vfx · · 33 points

    OP - yes, name the tool. 'inked', 'vector', 'clean ink' = closed confident lines. 'sketch', 'pencil', 'rough' = gappy hairy lines. The tool word sets the whole line behavior.

  • @oliviachen_creates · · 38 points

    bless you, the bucket-fill-flooding-through-a-1px-gap rage is a specific pain and 'just patch it by hand' was eating my life