/ Модель

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

Лицензия
Apache 2.0
Базовая модель
CogVideoX-5b
Библиотека
diffusers
Опубликована
26 ноя 2024

ConsisID-preview

Генерация видеоТекст → видео3 профессии

ConsisID-preview создаёт короткие видео по текстовым описаниям, стараясь сохранять идентичность персонажа между кадрами.

141скачиваний за 30 дней27лайковвеса обновлены8 июн 2025

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Видео» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели сгенерируют результат по каждой задаче. Опубликованный тест появится на этой странице.

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

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

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

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

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

ConsisID-preview — модель генерации видео по текстовому описанию с сохранением идентичности персонажа, представленная в рамках проекта ConsisID. Она предназначена для создания коротких видеосцен, в которых внешний вид персонажа остаётся согласованным между кадрами; проект связан с работой, отмеченной как Highlight на CVPR 2025. Модель использует Diffusers и основана на объединении моделей семейства CogVideoX, включая THUDM/CogVideoX1.5-5B-I2V и THUDM/CogVideoX-5b, с последующим дообучением. В метаданных указаны форматы Diffusers, ONNX и safetensors; лицензия — Apache-2.0.

В README приведён пример генерации 49 кадров, то есть примерно 6 секунд видео при 8 кадрах в секунду и разрешении 720×480. Качество результата зависит от подробности текстового запроса; авторы рекомендуют улучшать промпты. Для такого примера требуется около 44 ГБ видеопамяти без оптимизаций, а выгрузка частей модели в оперативную память снижает потребление памяти ценой скорости и возможного ухудшения качества. Репозиторий не сообщает поддержку других языков помимо английского, указанного в метаданных.

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

  • генерация коротких видео по текстовому описанию
  • создание сцен с персонажем, сохраняющим внешний вид между кадрами
  • визуализация сюжетных идей в виде короткого ролика

Ограничения

Для генерации примера длиной 6 секунд при разрешении 720×480 README указывает потребность примерно в 44 ГБ видеопамяти без оптимизаций. Модель требовательна к качеству промпта, а оптимизации с выгрузкой в память замедляют инференс и могут снизить качество.

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

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

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

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

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

Открыть на Hugging Face

😍 Gallery

Identity-Preserving Text-to-Video Generation. (Some best prompts here) Demo Video of ConsisID or you can click here to watch the video.

🤗 Quick Start

This model supports deployment using the huggingface diffusers library. You can deploy it by following these steps.

We recommend that you visit our GitHub and check out the relevant prompt optimizations and conversions to get a better experience.

  1. Install the required dependencies
# ConsisID will be merged into diffusers in the next version. So for now, you should install from source.
pip install --upgrade consisid_eva_clip pyfacer insightface facexlib transformers accelerate imageio-ffmpeg 
pip install git+https://github.com/huggingface/diffusers.git
  1. Run the code
import torch
from diffusers import ConsisIDPipeline
from diffusers.pipelines.consisid.consisid_utils import prepare_face_models, process_face_embeddings_infer
from diffusers.utils import export_to_video
from huggingface_hub import snapshot_download

snapshot_download(repo_id="BestWishYsh/ConsisID-preview", local_dir="BestWishYsh/ConsisID-preview")
face_helper_1, face_helper_2, face_clip_model, face_main_model, eva_transform_mean, eva_transform_std = (
    prepare_face_models("BestWishYsh/ConsisID-preview", device="cuda", dtype=torch.bfloat16)
)
pipe = ConsisIDPipeline.from_pretrained("BestWishYsh/ConsisID-preview", torch_dtype=torch.bfloat16)
pipe.to("cuda")

# ConsisID works well with long and well-described prompts. Make sure the face in the image is clearly visible (e.g., preferably half-body or full-body).
prompt = "The video captures a boy walking along a city street, filmed in black and white on a classic 35mm camera. His expression is thoughtful, his brow slightly furrowed as if he's lost in contemplation. The film grain adds a textured, timeless quality to the image, evoking a sense of nostalgia. Around him, the cityscape is filled with vintage buildings, cobblestone sidewalks, and softly blurred figures passing by, their outlines faint and indistinct. Streetlights cast a gentle glow, while shadows play across the boy's path, adding depth to the scene. The lighting highlights the boy's subtle smile, hinting at a fleeting moment of curiosity. The overall cinematic atmosphere, complete with classic film still aesthetics and dramatic contrasts, gives the scene an evocative and introspective feel."
image = "https://github.com/PKU-YuanGroup/ConsisID/blob/main/asserts/example_images/2.png?raw=true"

id_cond, id_vit_hidden, image, face_kps = process_face_embeddings_infer(
    face_helper_1,
    face_clip_model,
    face_helper_2,
    eva_transform_mean,
    eva_transform_std,
    face_main_model,
    "cuda",
    torch.bfloat16,
    image,
    is_align_face=True,
)

video = pipe(
    image=image,
    prompt=prompt,
    num_inference_steps=50,
    guidance_scale=6.0,
    use_dynamic_cfg=False,
    id_vit_hidden=id_vit_hidden,
    id_cond=id_cond,
    kps_cond=face_kps,
    generator=torch.Generator("cuda").manual_seed(42),
)
export_to_video(video.frames[0], "output.mp4", fps=8)

🛠️ Prompt Refiner

ConsisID has high requirements for prompt quality. You can use GPT-4o to refine the input text prompt, an example is as follows (original prompt: "a man is playing guitar.")

a man is playing guitar.

Change the sentence above to something like this (add some facial changes, even if they are minor. Don't make the sentence too long): 

The video features a man standing next to an airplane, engaged in a conversation on his cell phone. he is wearing sunglasses and a black top, and he appears to be talking seriously. The airplane has a green stripe running along its side, and there is a large engine visible behind his. The man seems to be standing near the entrance of the airplane, possibly preparing to board or just having disembarked. The setting suggests that he might be at an airport or a private airfield. The overall atmosphere of the video is professional and focused, with the man's attire and the presence of the airplane indicating a business or travel context.

Some sample prompts are available here.

💡 GPU Memory Optimization

ConsisID requires about 44 GB of GPU memory to decode 49 frames (6 seconds of video at 8 FPS) with output resolution 720x480 (W x H), which makes it not possible to run on consumer GPUs or free-tier T4 Colab. The following memory optimizations could be used to reduce the memory footprint. For replication, you can refer to this script.

Feature (overlay the previous)Max Memory AllocatedMax Memory Reserved
-37 GB44 GB
enable_model_cpu_offload22 GB25 GB
enable_sequential_cpu_offload16 GB22 GB
vae.enable_slicing16 GB22 GB
vae.enable_tiling5 GB7 GB
# turn on if you don't have multiple GPUs or enough GPU memory(such as H100)
pipe.enable_model_cpu_offload()
pipe.enable_sequential_cpu_offload()
pipe.vae.enable_slicing()
pipe.vae.enable_tiling()

warning: it will cost more time in inference and may also reduce the quality.

🙌 Description

✏️ Citation

If you find our paper and code useful in your research, please consider giving a star and citation.

@inproceedings{yuan2025identity,
  title={Identity-preserving text-to-video generation by frequency decomposition},
  author={Yuan, Shenghai and Huang, Jinfa and He, Xianyi and Ge, Yunyang and Shi, Yujun and Chen, Liuhan and Luo, Jiebo and Yuan, Li},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={12978--12988},
  year={2025}
}

🤝 Contributors

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

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

GPU в ailist

Универсальный рантайм · diffusers

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

Подбираем GPU…

Ревизия весов
950bc3f

0 моделей