remix logo

Hacker Remix

NeuralSVG: An Implicit Representation for Text-to-Vector Generation

780 points by lnyan 2 weeks ago | 72 comments

vipshek 2 weeks ago

This is excellent!

I think the utility of generating vectors is far, far greater than all the raster generation that's been a big focus thus far (DALL-E, Midjourney, etc). Those efforts have been incredibly impressive, of course, but raster outputs are so much more difficult to work with. You're forced to "upscale" or "inpaint" the rasters using subsequent generative AI calls to actually iterate towards something useful.

By contrast, generated vectors are inherently scalable and easy to edit. These outputs in particular seem to be low-complexity, with each shape composed of as few points as possible. This is a boon for "human-in-the-loop" editing experiences.

When it comes to generative visuals, creating simplified representations is much harder (and, IMO, more valuable) than creating highly intricate, messy representations.

gwern 2 weeks ago

Have you looked at https://www.recraft.ai/ recently? The image quality of their vector outputs seems to have gotten quite good, although you obviously still wouldn't want to try to generate densely textured or photographic-like images like Midjourney excels at. (For https://gwern.net/dropcap last year or before, we had to settle for Midjourney and create a somewhat convoluted workflow through Recraft; but if I were making dropcaps now, I think the latest Recraft model would probably suffice.)

esperent 2 weeks ago

Link to their vector page, since the main page makes them look like yet another AI image generator:

https://www.recraft.ai/ai-image-vectorizer

The quality does look quite amazing at first glance. How are the vectors to work with? Can you just open them in illustrator and start editing?

gwern 2 weeks ago

No, I actually was referring to their native vector AI image generator, not their vectorizer - although the vectorizer was better than any other we found, and that's why we were using it to convert the Midjourney PNG dropcaps into SVGs

(The editing quality of the vectorized ones were not great, but it is hard to see how they could be good given their raster-style appearance. I can't speak to the editing quality of the native-generated ones, either in the old obsolete Recraft models or the newer ones, because the old ones were too ugly to want to use, and I haven't done much with the new one yet.)

brown_martin 1 week ago

I was under the impression that their AI Vector generator generates a PNG and vectorizes under the hood.

gwern 1 week ago

Hm... I was definitely under the impression that it is generating SVGs natively, and that was consistent with its output and its recent upgrades like good text rendering, and I'm fairly sure I've said as much to the CEO and not been corrected... But I don't offhand recollect a specific reference where they say unambiguously that it's a SVG generator rather than vectorizer(raster), so maybe I'm wrong about that.

brown_martin 1 week ago

For me its based on that vector generation is much harder than raster, recraft has raised just over $10M (not that much in this space), and their api has no direct vector generation.

Lerc 2 weeks ago

There is also the possibility for using these images as guidance for rasterization models. Generate easily manipulatable and composible images as a first stage then add detail once the image composition is satisfactory.

datadrivenangel 2 weeks ago

Trivially possible with controlnets!

SillyUsername 2 weeks ago

My little project for the highly intricate, messy representation ;) https://github.com/KodeMunkie/shapesnap (it stands on the backs of giants, original was not mine). It's also available on npm.

zidad 1 week ago

I always imagine how useful Sora.ai could be if it would generate 3D models to render their animations from instead

spyder 1 week ago

I agree, that's the future of these video models. For professional use you want more control and the obvious next step towards that is to generate the full 3D scene (in the form of animated gaussian splats since that's more AI friendly than the mesh based 3D). That also helps the model to be more consistent but also adds the ability for the user to have more control over the camera or the scene.

janalsncm 2 weeks ago

I am a huge fan of this type of incremental generative approach. Language isn’t precise enough to describe a final product, so generating intermediate steps is very powerful.

I’d also like to see this in music generation. Tools like Suno are cool but I would much rather have something that generates MIDIs and instrument configurations instead.

Maybe this is a good lesson for generative tools. It’s possible to generate something that’s a good starting point. But what people actually want is long tail, so including the capability of precision modification is the difference between a canned demo and a powerful tool.

> Code coming soon

The examples are quite nice but I have no idea how reproducible they are.

kadushka 2 weeks ago

I’d also like to see this in music generation. Tools like Suno are cool but I would much rather have something that generates MIDIs and instrument configurations instead.

Sounds like you're looking for something like https://www.aiva.ai

janalsncm 2 weeks ago

Honestly that site feels like they have a database of midis tagged by genre and pick them out randomly. It’s totally different from their demo song.

I guess I’m hoping for something better. It’s also closed source, the web ui doesn’t have editing functionality, and the output is pretty disjointed. Maybe if I messed around with it enough the result would be decent.

kadushka 2 weeks ago

Fair enough. Still, for what you’ve described, Aiva is the best tool available.

bufferoverflow 2 weeks ago

MIDI isn't enough. I want MIDI + filters, plus separate voice and custom sounds tracks.

chaosprint 1 week ago

good point.

few days ago I was thinking about restarting this project with Glicol

https://github.com/chaosprint/RaveForce

RaveForce - An OpenAI Gym style toolkit for music generation experiments.

Love suno but eventually I need midi or xml or some lossless samples to work with

gexaha 2 weeks ago

microtonal midi would be super awesome

scosman 2 weeks ago

I’ve been impressed with even applying sonnet to SVGs for animations. This looks like it could be a lot more powerful.

Fun example: https://gist.github.com/scosman/701275e737331aaab6a2acf74a52...

astrodude 1 week ago

oh, wow. this actually works. I didn't know :) thanks!

intalentive 2 weeks ago

I’ve always thought that generation of intermediate representations was the way to go. Instead of generating concrete syntax, generate AST. Instead of generating PNG, generate SVG. Instead of generating a succession of images for animation, generate wire frame or rigging plus script.

Once you have your IR, modify and render. Once you have your render, apply a final coat of AI pixie dust.

Maybe generative models will get so powerful that fine-grained control can be achieved through natural language. But until then, this method would have the advantages of controllability, interoperability with existing tools (like Intellisense, image editors), and probably smaller, cheaper models that don’t have to accommodate high dimensional pixel space.