Protoface Recraft V4.1 · Text to Vector
Real SVG out of a ComfyUI node, and why it won't plug into anything
- vector
- files
- run id
This is the one node in the pack that outputs something there is basically no local equivalent for: actual vector geometry. Not a PNG that looks like a logo - an SVG with paths in it, which you can open in Illustrator, scale to a billboard, or cut on a vinyl plotter. Then you try to wire it into your favourite upscaler and discover it doesn't connect. That's not a bug either.
What it is
Recraft V4.1 · Text to Vector is Recraft's native vector generation mode, exposed as a node by the Protoface pack. It's the reason people care about Recraft in the first place: the community's standing note on the model family is that native SVG output is the differentiator - "the only image generator that produces vector graphics directly," design-focused, aimed at working designers rather than hobbyists. Everything else in the text-to-image world gives you pixels and a promise.
It's a paid remote call. Nothing runs on your GPU; the pack is a generated front end over Protoface's API, with the pay-per-job, data-leaves-the-machine tradeoffs that the KB's API-wrapper-nodes doc lays out. The catalog prices this operation at eight credits a job - double the raster ops on the same model, which tells you a little about what vectorising costs upstream.
How it works, and why the output type is different
Mechanically the node is the same shape as its raster sibling: prompt plus an image_size preset, schema-validated before a cent is spent, polled until the job terminates, results downloaded into the local cache. Two extra steps happen on the way back.
First, the response is identified as SVG by content type, and the pack does not try to decode it into an image tensor. In the materialiser, an image asset whose content type is image/svg+xml skips the raster path entirely and is wrapped as a native SVG value instead. Second, the node declares a different set of output sockets because of it - which is the whole reason your graph wiring changes.
Controls and outputs
Both real controls are the ones you'd expect and neither is optional:
prompt - the description of the mark, illustration, or layout you want. Up to 10,000 characters. Specific beats poetic here: "single-colour line-art icon of a coffee grinder, 2px stroke, no fill" gets you something usable, "coffee" gets you a stock illustration.
image_size - 1:1, 16:9, 9:16, 4:3, 3:4. Preset only. Your framing choice is baked in at generation, so decide the canvas before you spend.
Then the pack's standard pair: generation_id (the paid job's identity - fixed means reuse, incremented means a fresh paid generation, and it is unrelated to any seed) and request_scope, an advanced per-node scope the browser fills in for you and headless callers must supply.
Outputs: vector (SVG, a list), files (the original downloaded assets), and run id (a STRING). Note what's missing compared to the raster nodes: no image, no mask. You cannot feed this into anything expecting an IMAGE tensor - no ControlNet preprocessor, no upscaler, no VAE, no Preview Image. ComfyUI's type system rejects it at the socket and won't even offer the connection.
Getting the SVG out of ComfyUI
Two practical routes.
Save it. Wire files into Protoface Save File with a filename_prefix you'll recognise. You get the original .svg in ComfyUI's output/ folder, and since the extension follows the response's real content type, it'll be .svg rather than a mislabelled .png. From there, Illustrator, Inkscape, Figma, a laser cutter, whatever.
Rasterise it locally. If you need it in the graph as pixels, an SVG has to be rendered by something that speaks SVG. The clean split is: generate and save the vector here, then re-import the file with a loader that handles SVG and continue in the raster world. Don't expect a converter inside this pack; the pack's job ends at delivering a correct SVG.
Install
Standard for this pack, and quick, since nothing heavy is installed:
cd ComfyUI/custom_nodes
git clone --branch v0.1.0 --depth 1 https://github.com/protoface-ai/protoface-comfyui.git protoface
python -m pip install -r protoface/requirements.txt
Restart ComfyUI, reload the browser, then click Protoface in the lower right and paste an API key. Requisites are ComfyUI 0.41.0+, Python 3.10+, and httpx/jsonschema/Pillow/av - pulled in by requirements.txt, so install that with ComfyUI's interpreter or the nodes won't register. Headless setups set PROTOFACE_API_KEY or point PROTOFACE_API_KEY_FILE at a key file.
Traps worth knowing
The socket-type wall is the big one, and it's the reason people open an issue thinking the node is broken. It isn't; SVG is a first-class type in ComfyUI's newer API and this pack uses it properly.
The second trap is cost-per-look. At eight credits a pop, iterating on a logo by queueing twelve variations is a real bill, and the prompt-only control set gives you no dials to nudge. Sketch the idea in a cheap raster model first, get the composition right, then spend once here.
Third: nodes refuse after a schema change. If you saved this workflow months ago and it now errors about an archived contract, the model's public schema moved - refresh the catalog (Protoface → Refresh catalog, then restart and reload), pick the current node, and use Protoface Resume Run with your old run id if you still want that result.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Text prompt for the generated image. | |
| image_size | COMBO | 1:1 | Output image size preset. |
| generation_id | INT | 00–9007199254740991 | Keep fixed to reuse/resume this paid job. Increment for a fresh paid generation; independent of the model seed. |
| request_scope | STRING | Automatically assigned per node. Headless clients must supply a stable unique workflow/node ID. This is not a secret. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| vector | SVG | — |
| files | PROTOFACE_FILE | — |
| run id | STRING | — |