How to turn a photo into a sketch
- Add the photo. Drop a JPG, PNG, WebP or HEIC file on the upload area, click it to choose a file, or paste a copied image with Ctrl+V.
- Pick a style. Eight cards sit under the preview: three neural styles and five classic filters. “AI line art” is selected when the page opens.
- Wait for the first AI drawing. The first time you use a neural style, a 17 MB model is downloaded and cached in your browser. The classic filters need no download and appear at once.
- Move the Strength slider. It runs from 10% to 100% and starts at 50%. The preview follows the slider.
- Hold to compare. Press and hold on the picture to see the original, release to return to the sketch.
- Press “Download JPG”. The file is saved as
name-sketch.jpg.
The eight styles at a glance
| Style | What you get | Suits |
|---|---|---|
| AI line art | Clean contour lines, almost no shading | Colouring pages, stencils, minimal portraits |
| AI pencil sketch | Loose hand-drawn strokes with light shading | Portraits, pets, gifts |
| AI coloured sketch | The same contour lines over the photo’s colours | Cards, avatars, children’s pictures |
| Pencil (classic filter) | Soft graphite tones that follow the photo closely | Landscapes, everyday photos |
| Fine pencil (filter) | Thinner, paler lines with more small detail | Architecture, machines, textures |
| Charcoal (filter) | Broad dark shading, strong mood | Dramatic portraits, night scenes |
| Coloured pencil (filter) | Pencil strokes tinted with the original colours | Flowers, food, travel shots |
| Ink drawing (filter) | Black lines on light paper, almost no greys | Comic look, tattoo and transfer stencils |
Neural styles and classic filters
How the AI styles draw
The three AI styles use Informative Drawings, an open neural network (MIT licence) trained to turn photographs into line drawings. It decides which edges carry meaning, such as the outline of a face, an eye or a roofline, and leaves out texture like skin pores or grass.
Two versions of the model are used, 17 MB each. One draws clean contours and serves both “AI line art” and “AI coloured sketch”. The other draws in a looser pencil manner and serves “AI pencil sketch”.
The network looks at a copy of your photo with the longer side reduced to 1024 px. The finished line drawing is then enlarged to the size of the photo, so on a big picture the lines look slightly soft at 100% zoom.
How the classic filters work
The filters use a technique known from photo editors. The photo is turned grey, an inverted and blurred copy is laid over it with a colour-dodge blend, and what remains is dark strokes wherever the photo had an edge.
Nothing is interpreted here. Every edge becomes a stroke, including image noise and clutter in the background. The styles differ only in blur width and contrast: “Fine pencil” uses half the blur of “Pencil”, “Charcoal” uses a wider blur and darkens the midtones, and “Ink drawing” raises contrast until little more than black and white is left.
The paper tone
Every style ends with a faint warm tint over the whole picture. The paper is therefore off-white, not pure white. Keep that in mind if you plan to cut the drawing out or place it on a white page.
What the Strength slider changes
The slider does different things in the two groups.
- AI styles. Strength changes the weight of the lines. One end of the slider gives thin, pale lines; the other darkens them and brings out fainter lines the network was less sure about. The network is not run again, so the change is immediate: drag and watch the preview.
- Classic filters. Strength sets the width of the blur behind the effect. Low values keep only fine edges on nearly blank paper. High values widen the strokes and bring back more of the photo’s shading.
| Goal | Style | Strength |
|---|---|---|
| Colouring page for children | AI line art | Set by eye for bold, closed outlines |
| Light portrait sketch | AI pencil sketch | Set by eye, keep the lines pale |
| Stencil for tracing or transfer | Ink drawing (filter) | 60–100% |
| Building or street scene | Fine pencil (filter) | 40–60% |
| Dark, heavy drawing | Charcoal (filter) | 50–70% |
| Soft colour illustration | Coloured pencil (filter) | 30–50% |
Image size, download format and printing
- Working size. A photo larger than 2400 px on its longer side is reduced to 2400 px when it is loaded. Smaller photos keep their size. The sketch has the same dimensions as this working copy.
- Format. The download is always a JPG at 92% quality. There is no PNG option.
- Print size. 2400 px gives about 20 cm on the longer side at 300 dpi. On A4 the same file prints at roughly 200 dpi.
- Larger prints. For a poster, enlarge the downloaded sketch with the AI image upscaler before sending it to the print shop.
Preparing the photo
Give the subject a plain background
The classic filters trace everything behind the subject: leaves, wallpaper, furniture. For a portrait or a pet on clean paper, place the subject on plain white first with the background changer and sketch that picture.
Do not load a transparent PNG cut-out. The empty area is treated as black, and with the classic filters it stays black in the downloaded JPG.
Crop before you sketch
The AI styles see the whole frame at 1024 px. A face that fills a small part of a wide shot gets few pixels and few lines. Cut the frame down to the subject with the crop tool and the same face is drawn with far more detail.
Avoid noise and heavy compression
Grain from a dark room and blocks from a strongly compressed JPG turn into speckles with the classic filters. The AI styles draw contours instead of every edge, so try one of them when a filter looks dirty.
After the download
- Vector for cutting or engraving. An “Ink drawing” or “AI line art” result traces well. Convert it with the image to SVG converter and its “Black & white” preset to get scalable paths.
- Sharing. “Share” sends the sketch to another app on devices that support it. “Share before & after” builds a side-by-side card of the photo and the drawing.
- Another style of the same photo. Pick another card and download again. Switching between “AI line art” and “AI coloured sketch” reuses the drawing already made.
How it runs on your device
The classic filters are plain canvas operations in the page. The AI styles run through ONNX Runtime in a background thread: on the graphics card through WebGPU on a desktop or laptop, and on the processor through WebAssembly on phones and tablets. If the graphics card fails, the tool retries on the processor by itself.
The photo is never sent to a server. Only the model file travels, once, from Hugging Face to your browser cache. Family pictures and portraits of children stay on your device.
Troubleshooting
The model download stops or an error appears
The message ends with “The classic filters below still work”, and they do, because they need no model. Check the connection and pick the AI style again to retry.
The background came out black
The source was a PNG with transparent areas. Put it on a white background first, then load it again.
The sketch is grey and muddy
The photo is dark or noisy. With a classic filter, lower Strength to 20–30% or try “Fine pencil”. Otherwise use “AI line art”, which draws contours only.
Lines look soft on a large photo
AI lines are drawn at 1024 px and enlarged. Crop tighter so the subject fills the frame.
The download button is greyed out
An AI style is still drawing. The button becomes active when the preview appears.