We've built an avatar library that renders native SVG (not canvas), so it actually works with SSR frameworks.
I've trained some CNN models in Python on CelebA and FairFace to predict hair color, skin tone, etc. from photos, then converted them to TensorFlow.js. Models are ~2MB each, run entirely client-side.
Also ended up building Rsbuild plugins for SVG -> Svelte/Vue conversion because existing tools caused id/mask collisions when rendering multiple avatars.