Hacker Newsnew | past | comments | ask | show | jobs | submit | rahimnathwani's commentslogin

How are you converting the bitmaps into vector images?

This is currently the weakest part of the workflow. I'm tracing the output images with VTracer [0] and then finishing them manually.

Through a combination of careful initial prompting (e.g. requesting line drawings, requesting limited colours ["posterization" works] if you need colour at all, requesting background removal) and then using the settings in VTracer to limit the colours used for the resulting SVG to the minimum needed, you can end up with an SVG that doesn't take too long to clean up in Inkscape. It usually takes a few minutes of deletions and path unions to produce something usable.

Diffusion models outputting SVGs would obviously be very interesting for this, but this is probably a small niche compared to everything that diffusion models can do with raster images, and I've not found anything usable online so far. LLMs (understandably, given their core technology) are still pretty bad at creating SVG art.

[0] https://github.com/visioncortex/vtracer


Claude and I have spent most of the summer on exactly this problem for Skechworks (skechworks.com), a free little Mac design app I made to help my own workflow that is very similar to yours. I use it for my custom coin shop The Achieve Mint (theachievemint.com).

It runs VTracer under the hood too. Most of the cleanup you're doing in Inkscape could possibly be pushed to before and after the trace?

Skechworks picks the palette before the trace and forces it again after. I quantize to 8 colors with pngquant, trace, then snap every fill back to the nearest palette color. VTracer fills each region with its own average color, otherwise you get hundreds of nearly identical grays. One design went from 279 fill colors to 3.

I upscale 2x before I quantize. The anti-aliasing is what tells the tracer where an edge really sits. Quantize at 1x and you throw that away, and small text comes out lumpy. Related gotcha: filter_speckle is an area, so don't double it when you double the image.

I also flatten transparency onto white first. VTracer counts every alpha value as a different color. I had a 5 color picture that it saw as 688 colors, and the trace took 6 GB of memory. Flattened, the same picture took 300 MB.

For the background I sample the whole edge of the picture. If 85% of it is one color, I delete every path in that color that touches the edge. White inside the drawing never touches the edge, so it stays.

For black and white I threshold with Otsu, then trace in color mode with hierarchical stacked instead of bw mode. bw mode hands you one giant black path full of holes. Stacked gives you every region as its own shape, which is much easier to edit. You have to pad the image with the background color first, or VTracer decides your subject is the canvas.

Your FLUX step is the same trick I use for photos and messy art. I have an image model redraw the picture as flat art, then trace the redraw. That came out about a quarter the file size of the best direct trace I could get. The catch is that the model moves and resizes the subject a little every run. I measure the box around the ink in both pictures and fit the trace back onto the original.

What I haven't solved is curve fitting. vectorizer.ai gives you real arcs and straight lines. VTracer gives you splines, so circles are never quite circles.


Yes, but in their 30s most people are:

- unwilling to move to a different country

- unmotivated to spend time chatting with people about random things in a foreign language


M1 Pro, same prompt, same cli options:

  32,706 tokens
  38min 19s
  14.22 t/s

Same in Latin.

And in Italian and Portuguese, but I think they might use pronouns, too.


If you want to download the gguf to your regular huggingface cache directory instead of to /tmp, you can download the model and run the server in one step:

  export HF_TOKEN=xxx # optional, speeds up the download
  
  ./llama-prism-b10685-7dffb15/llama serve \
    -hf prism-ml/Ternary-Bonsai-2-27B-gguf:PTQ1_0 \
    --port 8331 -ngl 99 -fa on -c 32768

I tried it just now. After you click 'Start Demo' you should drag the newly-created tab into its own window (so you can watch it). Then click the 'Run automatically' button.

When I did this it worked as described.


For some reason it switched voices half way through a 33 second clip.

For OP the clip name is nari-nina-01a0a12f-980a-765e-8029-fa56bd23210d.wav


hey, thanks for letting us know! will look into the issue and see what went wrong.

"Don't know why the below comment by killix got flagged"

Because it's obviously written by AI.


What's your source for the 2022 difference?

PISA itself doesn't publish data broken down by racial subgroup. Back in 2018, the NCES public download included a RACETHC variable (https://nces.ed.gov/pubs2021/data/2021019_rawdata.zip).

But the most recent file on the NCES PISA 'data products' page is from 2018: https://nces.ed.gov/surveys/pisa/publications.asp

(At the time of writing if you expand 'Data Products' the first file is 'Program for the International Student Assessment (PISA) 2018 Public Use File (PUF) NCES Number: 2021019 Release Date: July 8, 2021')


Rahim, you know this data better than me, but this purports to be it. Is it not real or is this somehow subtly different from what I would read it to be? It calls itself the reading results from PISA 2022 by race. You’d have to set a new dependent variable to get the other two. I don’t know how to get it to show all 3 at once.

https://nces.ed.gov/surveys/pisa/idepisa/report.aspx?Lang=10...

If you can’t load it for some reason (that’s a direct link to the report and it launches a query) see here: https://imgur.com/a/gOnTJQZ


Thanks, Roshan. I didn't know this interface existed.

I had thought the only way to access the data was via downloadable data files (no longer published) or the PDF reports.


How old were you?


I started programming at 18 right after highschool (which, I guess, is late by HN standards: a number of my peers had played with Python first and hated Ocaml).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: