/ Модель

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

Лицензия
MIT
Опубликована
17 фев 2026

Capybara

Мультимодальная модель4 профессии

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

0скачиваний за 30 дней239лайковвеса обновлены27 фев 2026

Бенчмарки

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

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

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

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

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

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

Capybara — фреймворк для создания и редактирования изображений и видео на основе диффузионных моделей и архитектур Transformer. README описывает проект как разработку Glanty; на Hugging Face указана лицензия MIT.

Модель предназначена для генерации изображений и видео по текстовому запросу, а также для редактирования изображений и видео по инструкции. Среди показанных сценариев — замена фона, изменение стиля и времени суток, управление выражением лица, последовательное редактирование и создание визуального контента по референсному изображению. Для переписывания инструкций может использоваться отдельная Qwen3-VL-8B-Instruct.

Проект поддерживает распределённый инференс на нескольких GPU и интеграцию с ComfyUI; README указывает разрешения генерации видео 480p, 720p и 1080p. На момент описания README заявляет, что выпуск самой унифицированной модели и обучающего кода ещё планируется, поэтому доступная поставка ориентирована на инференс и может требовать отдельные компоненты модели.

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

  • генерация изображений по текстовому описанию
  • создание видео по текстовому запросу
  • редактирование изображений по инструкции
  • редактирование видео с сохранением структуры и идентичности объектов
  • замена фона и изменение стиля изображения
  • создание изображений и видео с опорой на референс

Ограничения

README сообщает, что выпуск унифицированной модели и обучающего кода планировался отдельно; для инференса нужны компоненты модели, включая отдельную модель переписывания инструкций. Для высокой производительности предусмотрена многопроцессорная обработка на нескольких GPU.

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

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

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

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

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

Открыть на Hugging Face

CAPYBARA: A Unified Visual Creation Model

Capybara is a unified visual creation model, i.e., a powerful visual generation and editing framework designed for high-quality visual synthesis and manipulation tasks.

The framework leverages advanced diffusion models and transformer architectures to support versatile visual generation and editing capabilities with precise control over content, motion, and camera movements.

Key Features:

  • 🎬 Multi-Task Support: Supports Text-to-Video (T2V), Text-to-Image (T2I), Instruction-based Video-to-Video (TV2V), Instruction-based Image-to-Image (TI2I), and various editing tasks
  • 🚀 High Performance: Built with distributed inference support for efficient multi-GPU processing

🔥 News

  • [2026.02.20] 🎨 Added ComfyUI support with custom nodes for all task types (T2I, T2V, TI2I, TV2V), together with FP8 quantization support for the inference script and ComfyUI custom node.
  • [2026.02.17] 🚀 Initial release v0.1 of the Capybara inference framework supporting generation and instruction-based editing tasks (T2I, T2V, TI2I, TV2V).

📝 TODO List

  • Add support for ComfyUI.
  • Release our unified creation model.
  • Release training code.

🏞️ Show Cases

Results of generation tasks. We show two generation tasks under our unified model. The top section presents text-to-image results, illustrating high-fidelity synthesis across diverse styles. The bottom rows show text-to-video results, demonstrating temporally coherent generation with natural motion for both realistic and stylized content.

Results of image editing tasks. We show the results of both instruction-based image editing and in-context image editing. The examples cover local and global edits (e.g., time-of-day and style changes), background replacement, and expression control. We further demonstrate multi-turn editing, where edits are applied sequentially. We also show in-context editing guided by a refenece image.

Results of instruction-based video editing task. We showcase instruction-based editing (TV2V) under our unified creation interface, covering local edits, global edits, dense prediction, and dynamic edits. Each example presents input frames and the edited outputs, highlighting temporally coherent transformations that preserve identity and overall structure.

Results of in-context visual creation. We show in-context generation and in-context editing results, including subject-conditioned generation (S2V/S2I), conditional generation (C2V), image-to-video (I2V), reference-driven editing (II2I/IV2V).

🛠️ Installation

We recommend using Anaconda to create an isolated Python environment and recommend using CUDA 12.6:

# Clone the repository
git clone https://github.com/xgen-universe/Capybara.git
cd Capybara

# Create environment
conda create -n capybara python=3.11 -y
conda activate capybara

# Install pytorch (torch 2.6.0 with CUDA 12.6)
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu126

# Install dependencies
pip install -r requirements.txt

# [Optional] Install Flash Attention for faster inference
pip install flash_attn --no-build-isolation

📥 Model Download

Capybara requires the following model components:

ModelsDownload LinkDescription
ModelHuggingface ModelAll Mandatory Models
Rewrite ModelHuggingface ModelQwen3-VL-8B-Instruct for Rewrite Instruction

Download the required models and organize them in the following structure:

ckpts/
├── scheduler/
│   └── scheduler_config.json
├── text_encoder/
│   ├── byt5-small/
│   ├── Glyph-SDXL-v2/
│   └── llm/
├── transformer/
│   └── capybara_v01/
├── vae/
└── vision_encoder/
    └── siglip/

🚀 Inference & Quick Start

Capybara supports two inference modes: Single Sample Mode for quick testing with a single input, and Batch Mode for processing multiple samples via CSV files. Both modes support all task types.

We provide example scripts under script/ and example data under assets/ to help you get started quickly:

assets/
├── examples/           # Example media files
│   ├── img1.jpeg
│   ├── img2.jpeg
│   ├── video1.mp4
│   └── video2.mp4
└── test_data/          # Example CSV files for batch mode
    ├── ti2i_example.csv
    └── tv2v_example.csv

Single Sample Mode

Process a single image or video with a text prompt. See script/test_single_infer.sh for full examples.

Instruction-based Image-to-Image (TI2I):

python inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --media_path ./assets/examples/img1.jpeg \
    --prompt "Change the time to night." \
    --output_path ./results/test_single_output/ti2i \
    --num_inference_steps 50 \
    --task_type ti2i \
    --resolution 720p \
    --rewrite_instruction

Instruction-based Video-to-Video (TV2V):

python inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --media_path ./assets/examples/video1.mp4 \
    --prompt "Replace the monkey with Ultraman. Keep the Ultraman's motion matched the original running pose and motion of monkey." \
    --output_path ./results/test_single_output/tv2v \
    --num_inference_steps 50 \
    --num_frames 81 \
    --task_type tv2v \
    --resolution 480p \
    --rewrite_instruction

Text-to-Video (T2V):

python inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --prompt "A giant humpback whale and its calf gracefully swim in the crystal-clear, deep blue open ocean." \
    --output_path ./results/test_single_output/t2v \
    --guidance_scale 4 \
    --num_inference_steps 50 \
    --num_frames 81 \
    --task_type t2v \
    --resolution 480p \
    --aspect_ratio "16:9" \
    --rewrite_instruction

Text-to-Image (T2I):

python inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --prompt "A group of five hikers, sitting on the snow mountain." \
    --output_path ./results/test_single_output/t2i \
    --guidance_scale 4 \
    --num_inference_steps 50 \
    --task_type t2i \
    --resolution 720p \
    --aspect_ratio "16:9" \
    --rewrite_instruction

Batch Mode (CSV)

Process multiple samples using a CSV file. See script/test_infer.sh for a full example.

CSV Format

For editing tasks (TI2I / TV2V), prepare a CSV with img_path/video_path and instruction columns:

img_path,instruction
img1.jpeg,instruction1.
img2.jpeg,instruction2.

The path column holds relative paths to media files (images or videos) under the data root directory.

Example CSV files are provided in assets/test_data/.

Single GPU

python inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --csv_path ./assets/test_data/ti2i_example.csv \
    --data_root_path ./assets/examples \
    --output_path ./results/test_output/ti2i-480p \
    --num_inference_steps 50 \
    --num_frames 81 \
    --task_type ti2i \
    --resolution 720p \
    --rewrite_instruction

Multi-GPU (Distributed)

Use accelerate for distributed inference across multiple GPUs:

accelerate launch --config_file acc_config/accelerate_config.yaml --num_processes 2 inference.py \
    --pretrained_model_name_or_path ./ckpts \
    --csv_path ./assets/test_data/ti2i_example.csv \
    --data_root_path ./assets/examples \
    --output_path ./results/test_output/ti2i-480p \
    --num_inference_steps 50 \
    --num_frames 81 \
    --task_type ti2i \
    --resolution 720p \
    --rewrite_instruction

🎨 ComfyUI Support

Capybara provides custom ComfyUI nodes for all task types (T2V, T2I, TI2I, TV2V).

ln -s /path/to/Capybara /path/to/ComfyUI/custom_nodes/Capybara
NodeDescription
Capybara Load PipelineLoad all model components with automatic attention backend selection
Capybara GenerateMain generation / editing node for all task types
Capybara Load VideoLoad a video file as IMAGE frames + fps
Capybara Load Rewrite ModelLoad Qwen3-VL for prompt rewriting
Capybara Rewrite InstructionExpand short prompts into detailed instructions

A sample workflow is provided in comfyui/examples/. For setup details and node documentation, see the ComfyUI README.

⚙️ Configuration Details

Task Types

Task TypeDescriptionInput Required
t2vText-to-Video generation--prompt
t2iText-to-Image generation--prompt
ti2iInstruction-based Image-to-Image editing--media_path + --prompt (or CSV)
tv2vInstruction-based Video-to-Video editing--media_path + --prompt (or CSV)

Key Parameters

ParameterDefaultDescription
--pretrained_model_name_or_path(required)Path to the model checkpoint directory
--task_typetv2vTask type: t2v, t2i, ti2i, tv2v
--resolutionNoneOutput resolution: 480p, 720p, 1080p
--aspect_ratioNoneAspect ratio: 16:9, 9:16, 4:3, 3:4, 1:1
--num_frames81Number of frames to generate (e.g., 81, 101, 121)
--num_inference_steps50Number of denoising steps
--guidance_scale1.0Text guidance scale for classifier-free guidance
--num_sample_per_case1Number of samples to generate per input
--rewrite_instructionFalseAuto-enhance prompts using Qwen3-VL-8B-Instruct
--rewrite_model_pathQwen/Qwen3-VL-8B-InstructPath to the rewrite model
--max_samplesNoneLimit the number of samples to process from CSV
--quantizeNoneQuantize transformer weights (fp8). See FP8 Quantization.

Recommended Settings

For optimal quality and performance, we recommend the following settings:

Task TypeRecommended ResolutionRecommended StepsNote
Video (T2V, TV2V)480p50Balanced quality and generation speed
Image (T2I, TI2I)720p50Higher quality for static images

Notes:

  • Resolution: You can experiment with higher resolutions (1024 or 1080p).
  • Inference Steps: 50 steps provide a good balance between quality and speed. You can use 30-40 steps for faster generation.

⚡ FP8 Quantization

Capybara supports FP8 (E4M3) weight-only quantization for the transformer via torchao. This roughly halves the transformer's weight memory, allowing larger resolutions or longer videos to fit in GPU VRAM.

Requirements:

  • NVIDIA GPU with compute capability >= 8.9 (Ada Lovelace or Hopper, e.g. RTX 4090, L40, H100)
  • torchao installed (pip install torchao)

ComfyUI

In the Capybara Load Pipeline node, set the quantize dropdown to fp8. The node handles everything automatically -- the transformer will be loaded in FP8 on GPU while other components (VAE, text encoders, etc.) still offload to CPU as usual.

📄 License

This project is released under the MIT License.

🙏 Acknowledgments

This project is built upon:

📝 Citation

If you find Capybara useful for your research, please consider citing:

@misc{capybara2026rao,
  title={Capybara: A Unified Visual Creation Model},
  author={Rao, Zhefan and Che, Haoxuan and Hu, Ziwen and Zou, Bin and Liu, Yaofang and He, Xuanhua and Choi, Chong-Hou and He, Yuyang and Chen, Haoyu and Su, Jingran and Li, Yanheng and Chu, Meng and Lei, Chenyang and Zhao, Guanhua and Li, Zhaoqing and Zhang, Xichen and Li, Anping and Liu, Lin and Tu, Dandan and Liu, Rui},
  year={2026}
}

📧 Contact

For questions and feedback, please open an issue on GitHub.

You can also contact us by email: zraoac@ust.hk and hche@ust.hk


⭐ If you find this project helpful, please consider giving it a star!

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

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

GPU в ailist

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

Нельзя запустить

Any-to-any модели пока не поддерживаются.

Ревизия весов
1931ee6

0 моделей