Downloads · 30 days
0
Fgdfgfthgr/Anime_Images_Style_Embedder
Anime_Images_Style_Embedder is a machine learning model from Fgdfgfthgr. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
V4 released! This time instead of training a vision model from scratch, it uses a simple mlp that takes the cls token from a DINOv3 model to get the embedding.
Downloads · 30 days
0
Access
Public
Updated Oct 17, 2025
Repo size
404 MB
Likes
4
Public
Click a slice to open those files.
.safetensors156 MB · 100%
From the Hugging Face model README
V4 released! This time instead of training a vision model from scratch, it uses a simple mlp that takes the cls token from a DINOv3 model to get the embedding.
Far more accurate than the previous V3! You do need access to the DINOv3 with your HuggingFace token, though.
Many diffusion models, though, choose to use artist tags to control the style of output images. I am really not a fan of that, for three reasons:
One way to overcome this is using a style embedding model. It's a model which takes in images of arbitrary sizes and outputs a style vector for each image. The style vector lives in an N-Dimension space, and is essentially just a list of numbers with a length of N. Each number in the list corresponds to a specific style element the input image has.
Images with similar style should have similar embedding (low distance) while different style will have embeddings that are far apart (high distance).
The included py file gives minimal usage example. minimal_script.py provides the minimal codes for running an image through the network and obtain an output. While gallery_review.py contains the code I used to generate those visualisations and clustering.
With current version (v4):
Training was done using PyTorch Lightning.
lr = 0.0005
weight_decay = 0.01
AdamW optimizer
ExponentialLR scheduler, with a gamma of 0.99, applied every epoch.
Batch size of 9999 (so all data goes through the network at once).
With every anchor image, 4 positive images and 16 negative images are used.
Trained for 150 epoches. On a single RTX 3080 GPUs. A total of 150 optimizer updates.