BAAI / Emu3-Stage1

huggingface.co
Total runs: 185
24-hour runs: -7
7-day runs: -5
30-day runs: -33
Model's Last Updated: October 23 2024
any-to-any

Introduction of Emu3-Stage1

Model Details of Emu3-Stage1

Emu3: Next-Token Prediction is All You Need

Emu3 Team, BAAI

| Project Page | Paper | 🤗HF Models | github | Demo |

arch.

We introduce Emu3 , a new suite of state-of-the-art multimodal models trained solely with next-token prediction ! By tokenizing images, text, and videos into a discrete space, we train a single transformer from scratch on a mixture of multimodal sequences.

Emu3 excels in both generation and perception

Emu3 outperforms several well-established task-specific models in both generation and perception tasks, surpassing flagship open models such as SDXL, LLaVA-1.6 and OpenSora-1.2, while eliminating the need for diffusion or compositional architectures.

comparison.
Highlights
  • Emu3 is capable of generating high-quality images following the text input, by simply predicting the next vision token. The model naturally supports flexible resolutions and styles.
  • Emu3 shows strong vision-language understanding capabilities to see the physical world and provides coherent text responses. Notably, this capability is achieved without depending on a CLIP and a pretrained LLM.
  • Emu3 simply generates a video causally by predicting the next token in a video sequence, unlike the video diffusion model as in Sora. With a video in context, Emu3 can also naturally extend the video and predict what will happen next.
Model Information

The Emu3-Stage1 model is the pre-trained weights of the first stage of the pre-training process of Emu3. The pre-training process of Emu3 is conducted in two stages. In the first stage, which does not utilize video data , training begins from scratch with a context length of 5120 for text and image data. The model supports image captioning and can generate images at a resolution of 512x512. You can use our training scripts for further instruction tuning for more image generation and perception tasks .

Quickstart
from PIL import Image
from transformers import AutoTokenizer, AutoModel, AutoImageProcessor, AutoModelForCausalLM
from transformers.generation.configuration_utils import GenerationConfig
from transformers.generation import LogitsProcessorList, PrefixConstrainedLogitsProcessor, UnbatchedClassifierFreeGuidanceLogitsProcessor
import torch

import sys
sys.path.append(PATH_TO_BAAI_Emu3-Gen_MODEL)
from processing_emu3 import Emu3Processor

# model path
EMU_HUB = "BAAI/Emu3-Gen"
VQ_HUB = "BAAI/Emu3-VisionTokenizer"

# prepare model and processor
model = AutoModelForCausalLM.from_pretrained(
    EMU_HUB,
    device_map="cuda:0",
    torch_dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",
    trust_remote_code=True,
)

tokenizer = AutoTokenizer.from_pretrained(EMU_HUB, trust_remote_code=True)
image_processor = AutoImageProcessor.from_pretrained(VQ_HUB, trust_remote_code=True)
image_tokenizer = AutoModel.from_pretrained(VQ_HUB, device_map="cuda:0", trust_remote_code=True).eval()
processor = Emu3Processor(image_processor, image_tokenizer, tokenizer)

# prepare input
POSITIVE_PROMPT = " masterpiece, film grained, best quality."
NEGATIVE_PROMPT = "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry."

classifier_free_guidance = 3.0
prompt = "a portrait of young girl."
prompt += POSITIVE_PROMPT

kwargs = dict(
    mode='G',
    ratio="1:1",
    image_area=model.config.image_area,
    return_tensors="pt",
)
pos_inputs = processor(text=prompt, **kwargs)
neg_inputs = processor(text=NEGATIVE_PROMPT, **kwargs)

# prepare hyper parameters
GENERATION_CONFIG = GenerationConfig(
    use_cache=True,
    eos_token_id=model.config.eos_token_id,
    pad_token_id=model.config.pad_token_id,
    max_new_tokens=40960,
    do_sample=True,
    top_k=2048,
)

h, w = pos_inputs.image_size[0]
constrained_fn = processor.build_prefix_constrained_fn(h, w)
logits_processor = LogitsProcessorList([
    UnbatchedClassifierFreeGuidanceLogitsProcessor(
        classifier_free_guidance,
        model,
        unconditional_ids=neg_inputs.input_ids.to("cuda:0"),
    ),
    PrefixConstrainedLogitsProcessor(
        constrained_fn ,
        num_beams=1,
    ),
])

# generate
outputs = model.generate(
    pos_inputs.input_ids.to("cuda:0"),
    GENERATION_CONFIG,
    logits_processor=logits_processor
)

mm_list = processor.decode(outputs[0])
for idx, im in enumerate(mm_list):
    if not isinstance(im, Image.Image):
        continue
    im.save(f"result_{idx}.png")

Runs of BAAI Emu3-Stage1 on huggingface.co

185
Total runs
-7
24-hour runs
-5
3-day runs
-5
7-day runs
-33
30-day runs

More Information About Emu3-Stage1 huggingface.co Model

More Emu3-Stage1 license Visit here:

https://choosealicense.com/licenses/apache-2.0

Emu3-Stage1 huggingface.co

Emu3-Stage1 huggingface.co is an AI model on huggingface.co that provides Emu3-Stage1's model effect (), which can be used instantly with this BAAI Emu3-Stage1 model. huggingface.co supports a free trial of the Emu3-Stage1 model, and also provides paid use of the Emu3-Stage1. Support call Emu3-Stage1 model through api, including Node.js, Python, http.

Emu3-Stage1 huggingface.co Url

https://huggingface.co/BAAI/Emu3-Stage1

BAAI Emu3-Stage1 online free

Emu3-Stage1 huggingface.co is an online trial and call api platform, which integrates Emu3-Stage1's modeling effects, including api services, and provides a free online trial of Emu3-Stage1, you can try Emu3-Stage1 online for free by clicking the link below.

BAAI Emu3-Stage1 online free url in huggingface.co:

https://huggingface.co/BAAI/Emu3-Stage1

Emu3-Stage1 install

Emu3-Stage1 is an open source model from GitHub that offers a free installation service, and any user can find Emu3-Stage1 on GitHub to install. At the same time, huggingface.co provides the effect of Emu3-Stage1 install, users can directly use Emu3-Stage1 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Emu3-Stage1 install url in huggingface.co:

https://huggingface.co/BAAI/Emu3-Stage1

Url of Emu3-Stage1

Emu3-Stage1 huggingface.co Url

Provider of Emu3-Stage1 huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 63.4M
Run Growth: -4.4M
Growth Rate: -6.93%
Updated:February 22 2024
huggingface.co

Total runs: 35.7M
Run Growth: -1.8M
Growth Rate: -5.08%
Updated:July 03 2024
huggingface.co

Total runs: 10.4M
Run Growth: -1.5M
Growth Rate: -14.18%
Updated:February 21 2024
huggingface.co

Total runs: 9.8M
Run Growth: -3.9M
Growth Rate: -39.71%
Updated:February 21 2024
huggingface.co

Total runs: 1.9M
Run Growth: 300.5K
Growth Rate: 15.69%
Updated:April 17 2024
huggingface.co

Total runs: 779.2K
Run Growth: -398.4K
Growth Rate: -51.12%
Updated:April 02 2024
huggingface.co

Total runs: 669.4K
Run Growth: -406.7K
Growth Rate: -60.76%
Updated:October 12 2023
huggingface.co

Total runs: 202.4K
Run Growth: -528.9K
Growth Rate: -261.31%
Updated:December 13 2023
huggingface.co

Total runs: 66.0K
Run Growth: 51.6K
Growth Rate: 78.19%
Updated:October 12 2023
huggingface.co

Total runs: 59.7K
Run Growth: -15.8K
Growth Rate: -26.57%
Updated:July 13 2026
huggingface.co

Total runs: 53.6K
Run Growth: -28.6K
Growth Rate: -53.28%
Updated:October 12 2023
huggingface.co

Total runs: 52.1K
Run Growth: 2.6K
Growth Rate: 4.98%
Updated:October 12 2023
huggingface.co

Total runs: 41.2K
Run Growth: -474
Growth Rate: -1.15%
Updated:January 15 2025
huggingface.co

Total runs: 40.6K
Run Growth: 2.1K
Growth Rate: 5.25%
Updated:November 14 2023
huggingface.co

Total runs: 15.8K
Run Growth: -650
Growth Rate: -4.11%
Updated:April 16 2025
huggingface.co

Total runs: 10.4K
Run Growth: 10.4K
Growth Rate: 100.00%
Updated:September 16 2026
huggingface.co

Total runs: 8.8K
Run Growth: -9.4K
Growth Rate: -105.96%
Updated:October 12 2023
huggingface.co

Total runs: 5.9K
Run Growth: 1.9K
Growth Rate: 33.03%
Updated:May 20 2025
huggingface.co

Total runs: 4.7K
Run Growth: 3.2K
Growth Rate: 67.93%
Updated:April 19 2024
huggingface.co

Total runs: 2.4K
Run Growth: 1.1K
Growth Rate: 45.64%
Updated:April 10 2026
huggingface.co

Total runs: 2.3K
Run Growth: 155
Growth Rate: 6.66%
Updated:September 11 2026
huggingface.co

Total runs: 1.8K
Run Growth: 973
Growth Rate: 53.26%
Updated:November 28 2024
huggingface.co

Total runs: 1.8K
Run Growth: -13.8K
Growth Rate: -775.56%
Updated:January 15 2025
huggingface.co

Total runs: 1.7K
Run Growth: 161
Growth Rate: 9.59%
Updated:April 10 2026
huggingface.co

Total runs: 1.5K
Run Growth: 123
Growth Rate: 8.47%
Updated:December 31 2022
huggingface.co

Total runs: 1.3K
Run Growth: 971
Growth Rate: 73.84%
Updated:September 11 2026
huggingface.co

Total runs: 774
Run Growth: -13
Growth Rate: -1.68%
Updated:May 23 2025
huggingface.co

Total runs: 700
Run Growth: -843
Growth Rate: -119.41%
Updated:February 07 2024
huggingface.co

Total runs: 657
Run Growth: -469
Growth Rate: -71.39%
Updated:October 23 2024
huggingface.co

Total runs: 657
Run Growth: -113
Growth Rate: -17.20%
Updated:October 24 2024
huggingface.co

Total runs: 513
Run Growth: -362
Growth Rate: -70.57%
Updated:April 18 2023
huggingface.co

Total runs: 480
Run Growth: -222
Growth Rate: -46.25%
Updated:July 13 2026
huggingface.co

Total runs: 451
Run Growth: 299
Growth Rate: 66.30%
Updated:April 02 2024
huggingface.co

Total runs: 419
Run Growth: -99
Growth Rate: -23.63%
Updated:August 11 2026
huggingface.co

Total runs: 413
Run Growth: -27
Growth Rate: -6.54%
Updated:April 10 2026
huggingface.co

Total runs: 398
Run Growth: 62
Growth Rate: 15.58%
Updated:July 13 2026
huggingface.co

Total runs: 393
Run Growth: -8
Growth Rate: -2.04%
Updated:December 25 2025
huggingface.co

Total runs: 378
Run Growth: -173
Growth Rate: -45.77%
Updated:July 13 2026
huggingface.co

Total runs: 369
Run Growth: -333
Growth Rate: -90.24%
Updated:August 11 2026
huggingface.co

Total runs: 314
Run Growth: 71
Growth Rate: 22.61%
Updated:July 13 2026
huggingface.co

Total runs: 291
Run Growth: -359
Growth Rate: -123.37%
Updated:December 25 2025
huggingface.co

Total runs: 290
Run Growth: -125
Growth Rate: -43.10%
Updated:July 13 2026
huggingface.co

Total runs: 286
Run Growth: 11
Growth Rate: 3.85%
Updated:July 13 2026
huggingface.co

Total runs: 280
Run Growth: 66
Growth Rate: 23.57%
Updated:August 18 2026
huggingface.co

Total runs: 276
Run Growth: -190
Growth Rate: -68.84%
Updated:October 27 2023
huggingface.co

Total runs: 273
Run Growth: -158
Growth Rate: -58.52%
Updated:March 07 2024
huggingface.co

Total runs: 258
Run Growth: 258
Growth Rate: 100.00%
Updated:September 05 2026
huggingface.co

Total runs: 248
Run Growth: 25
Growth Rate: 10.08%
Updated:July 13 2026
huggingface.co

Total runs: 234
Run Growth: 31
Growth Rate: 13.25%
Updated:July 17 2026
huggingface.co

Total runs: 233
Run Growth: -10
Growth Rate: -4.29%
Updated:June 06 2025
huggingface.co

Total runs: 221
Run Growth: 26
Growth Rate: 11.76%
Updated:July 13 2026
huggingface.co

Total runs: 220
Run Growth: -2.0K
Growth Rate: -911.36%
Updated:April 10 2026
huggingface.co

Total runs: 218
Run Growth: 127
Growth Rate: 58.26%
Updated:November 28 2023
huggingface.co

Total runs: 207
Run Growth: 95
Growth Rate: 45.89%
Updated:July 13 2026
huggingface.co

Total runs: 204
Run Growth: -191
Growth Rate: -93.63%
Updated:April 10 2026
huggingface.co

Total runs: 201
Run Growth: 87
Growth Rate: 43.28%
Updated:July 13 2026
huggingface.co

Total runs: 192
Run Growth: 94
Growth Rate: 48.96%
Updated:March 13 2026
huggingface.co

Total runs: 183
Run Growth: -18
Growth Rate: -9.84%
Updated:May 13 2024
huggingface.co

Total runs: 183
Run Growth: 34
Growth Rate: 18.58%
Updated:June 24 2024
huggingface.co

Total runs: 182
Run Growth: 10
Growth Rate: 5.49%
Updated:May 13 2024
huggingface.co

Total runs: 180
Run Growth: 31
Growth Rate: 17.22%
Updated:June 24 2024
huggingface.co

Total runs: 178
Run Growth: 76
Growth Rate: 42.70%
Updated:December 21 2023
huggingface.co

Total runs: 178
Run Growth: 5
Growth Rate: 2.81%
Updated:May 13 2024