/ Модель

Характеристики

Лицензия
Своя лицензия
Базовая модель
convnext_tiny.eupe_lvd1689m
Библиотека
timm
Опубликована
29 окт 2026

wan2.1-convnext_tiny.eupe_lvd1689m

Эмбеддинги изображенийИзображение → embedding3 профессии

LatentEUPE извлекает признаки ConvNeXt из латентов Qwen-Image VAE без декодирования и предназначена для потерь и критиков при обучении генеративных моделей изображений.

11скачиваний за 30 дней0лайковвеса обновлены30 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

LatentEUPE — энкодер изображений на основе ConvNeXt-Tiny, разработанный авторами репозитория Gaeros. Он принимает нормализованный латент Qwen-Image VAE размером 16×64×64 для изображения 512×512 и напрямую, без декодирования латента, предсказывает карту визуальных признаков 768×8×8 и pooled-вектор размерности 768, соответствующие признакам исходного энкодера ConvNeXt на уменьшенном изображении 256×256. Модель рассчитана на использование признаков латентных изображений в перцептивных и Fréchet-distance потерях, а также в качестве основы критика при обучении диффузионных моделей.

Архитектура сохраняет четыре стадии и голову ConvNeXt-Tiny; пиксельный входной слой заменён свёрткой 3×3 для 16 каналов латента. Обучены входной слой и первые две стадии, а веса стадий 2–3 сохранены от учителя. В экспериментах на RTX 4090 вычисление градиента по входу обходилось существенно дешевле, чем прохождение через декодер VAE или taew2.1. Модель обучена на латентах изображений из трёх наборов данных; латенты, полученные диффузионной генерацией, не проверялись. Лицензия указана как other, поэтому конкретные условия использования следует сверить с карточкой репозитория и лицензиями базовых компонентов.

Сценарии применения

  • вычисление перцептивной потери на латентах изображений
  • оценка сходства признаков для Fréchet-distance метрик
  • использование визуального энкодера как основы критика при обучении диффузионной модели
  • получение карты признаков и pooled-эмбеддинга из латента Qwen-Image VAE

Ограничения

Обучение и проверка охватывали латенты энкодера реальных изображений 512×512; латенты, созданные диффузионной моделью, не тестировались. Лицензия указана как other, поэтому применимые условия необходимо уточнить по карточке модели и базовым компонентам.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

LatentEUPE

LatentEUPE computes the features of convnext_tiny.eupe_lvd1689m (the teacher) from the Qwen-Image VAE latent of an image, without decoding the latent. It reads the normalised latent of a 512×512 image (16×64×64) and outputs the teacher's 768×8×8 feature map of the 256×256 downscale of that image, and the teacher's pooled 768-dimensional embedding. It serves as a feature network on diffusion latents, for example for a perceptual or Fréchet-distance loss or as a critic backbone, at a fraction of the cost of decoding.

A normalised latent is the mode of the VAE encoder's output minus the VAE config's per-channel latents_mean, divided by its latents_std: the space the diffusion model works in. The VAE is the Qwen-Image VAE (Wan2.1 architecture), Qwen/Qwen-Image subfolder vae.

Usage

model.py in this repository defines the model; it needs torch, timm and huggingface_hub. Encoding images needs diffusers.

import sys
import torch
from diffusers import AutoencoderKLQwenImage
from huggingface_hub import snapshot_download

sys.path.insert(0, snapshot_download("Gaeros/wan2.1-convnext_tiny.eupe_lvd1689m", allow_patterns=["model.py"]))
from model import LatentEUPE

student = LatentEUPE.from_pretrained("Gaeros/wan2.1-convnext_tiny.eupe_lvd1689m").cuda().eval()
vae = AutoencoderKLQwenImage.from_pretrained("Qwen/Qwen-Image", subfolder="vae", torch_dtype=torch.bfloat16).cuda()
mean = torch.tensor(vae.config.latents_mean, device="cuda").view(1, -1, 1, 1)
std = torch.tensor(vae.config.latents_std, device="cuda").view(1, -1, 1, 1)

images = ...  # [B, 3, 512, 512] in [-1, 1]
with torch.no_grad():
    # the VAE works on videos, [B, C, T, H, W]
    z = vae.encode(images.to(torch.bfloat16)[:, :, None]).latent_dist.mode()[:, :, 0]
    z = (z.float() - mean) / std  # normalised latent [B, 16, 64, 64]
    with torch.autocast("cuda", torch.bfloat16):
        features = student(z)  # [B, 768, 8, 8]
        embedding = student.embed(z)  # [B, 768]

Latents of the diffusion model in the normalised space go to student directly. model.Teacher is the stock teacher on 256 px images in [0, 1], for reference features.

student.feature_std [768] is the teacher's standard deviation of each output channel over the training images. A loss on features divided by it per channel reads in the units of the validation below; for example, the training loss of two latents' features is ((student(z1) - student(z2)) / student.feature_std.view(1, -1, 1, 1)).square().mean(), and features at each channel's training mean score 1 on average over the training images.

Architecture

LatentEUPE is the teacher with its pixel stem (4×4 stride-4 convolution, then LayerNorm) replaced by a 3×3 convolution from the 16 latent channels, then LayerNorm. The 64×64 latent grid equals the grid the teacher's stem outputs, and each latent cell covers the image region of one stem patch, so the four ConvNeXt stages and the head stay. Stages 2 and 3 keep the teacher's weights; the stem, stage 0 and stage 1 (1.25 M of the 27.8 M parameters) differ from it.

Validation

validate.py compares four pipelines on the validation images. Each maps an image to a 768×8×8 feature map; the reference is the teacher on the image's 256 px downscale, LatentEUPE's training target.

  • pixels: the 256 px image, then the teacher; the reference itself.
  • VAE: the latent, then the Qwen-Image VAE decoder, an 8-bit image, the 256 px downscale and the teacher.
  • taew2.1: the same with madebyollin's tiny Wan2.1 decoder in place of the VAE decoder.
  • LatentEUPE: the latent, then LatentEUPE.

Per source, loss is the training loss (per-channel normalised MSE), pos the mean per-position cosine and pooled the cosine of the pooled embeddings. Times are per image on an RTX 4090, eager, in bf16 autocast, at the largest batch of up to 64 (a power of two) whose input gradient fits in 24 GB: the forward pass, and the forward pass plus the gradient with respect to the pipeline's input (the image for pixels, the latent otherwise).

pipelineaesthetic_5k loss / pos / poolede6 loss / pos / pooledmidjourney loss / pos / pooledmean lossbatchforwardinput gradient
pixels0 / 1 / 10 / 1 / 10 / 1 / 10640.37 ms0.80 ms
VAE0.0060 / 0.9978 / 0.99850.0051 / 0.9981 / 0.99870.0048 / 0.9980 / 0.99880.0053451.2 ms153.4 ms
taew2.10.0172 / 0.9939 / 0.99610.0192 / 0.9931 / 0.99530.0131 / 0.9947 / 0.99660.0165168.71 ms20.3 ms
LatentEUPE0.0108 / 0.9962 / 0.99830.0113 / 0.9960 / 0.99800.0061 / 0.9977 / 0.99870.0094640.37 ms0.81 ms

LatentEUPE's loss is 1.8× the VAE round trip's and 0.57× taew2.1's; its pooled cosine is 1 to 7·10⁻⁴ below the round trip's. Its input gradient costs what the teacher's costs on pixels: 25× less than through taew2.1 and 190× less than through the VAE decoder.

Training

The training set holds 29429 images from three sources: aesthetic_5k (4719), midjourney (20171) and e6 (4539); the validation sets hold 249, 500 and 249 images. Each image contributes the largest centred square, resized to 512 px; images under 512 px are skipped. The student's input is the VAE latent of the 512 px square, its target the teacher's features of the 256 px downscale.

The loss is the per-channel normalised MSE: the mean over channels c and positions p of ((s[c,p] − t[c,p]) / σ[c])², where s and t are the student's and the teacher's outputs and σ[c] is the teacher's standard deviation of channel c over the training images. Training runs four phases, each from the previous phase's best checkpoint with fresh AdamW states (batch 64, weight decay 0.1 on conv and linear weights, linear warmup then cosine decay):

phasetrainstargetstepslr stem / stageswarmup stem / stages
astem convfinal features300010⁻³ / –0 / –
s0stem, stage 0teacher's stage-0 output240003·10⁻³ / 10⁻⁴0 / 1000
s1stem, stages 0–1teacher's stage-1 output2400010⁻³ / 10⁻⁴1000 / 1000
finalstem, stages 0–1final features500010⁻⁴ / 2·10⁻⁵200 / 200

In the experiments behind this recipe, matching the teacher's intermediate outputs (s0, s1) before the final features lowered the validation loss by 39% against training on the final features alone; stages 2–3 stay the teacher's because training them lowers the training loss only. The four phases take 55 min on an RTX 4090.

Limitations

  • The training and validation latents are encoder outputs of real images. Latents the encoder does not produce are out of distribution: on horizontally flipped latents, which differ from the latent of the mirrored image by 45% to 55% of their norm, an earlier student's loss is 0.30 to 0.49 against 0.009 to 0.014 on encoder latents. Latents generated by a diffusion model are untested.
  • Only 512×512 images (64×64 latents) are trained and validated.

License

The weights derive from convnext_tiny.eupe_lvd1689m and carry its license, the FAIR Noncommercial Research License. The taew2.1 decoder used in validation is MIT-licensed (madebyollin/taehv).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · timm · image-feature-extraction

Можно запустить

Подбираем GPU…

Ревизия весов
694821b

0 моделей