OpenAI Sora 생성형 Text-To-Video 모델 총정리

Feb 18, 2024
OpenAI Sora 생성형 Text-To-Video 모델 총정리
💡
블로그에서 글이 많이 깨지다보니 아래 링크(노션)로 참고 부탁드립니다.
+ 웹에서 읽으시는 것을 추천 드립니다.
Disclaimer: The following analysis and opinions are based on my personal effort to understand and discuss OpenAI's new text-to-video model, Sora, as presented in their technical report. While I strive for accuracy and fairness in my review, it is important to note that I do not possess a technical background in artificial intelligence or related fields. Consequently, some interpretations or conclusions drawn might not fully capture the complexities or the current state of AI technology and its business implications. Readers are encouraged to consult the original technical materials and seek diverse perspectives for a more rounded understanding.
 
2024년 2월 15일 OpenAI는 State-of-the-Art (SoTA) 텍스트-비디오 모델인 Sora를 공개했습니다. 온라인 커뮤니티에서 Sora에 대한 뜨거운 반응은 2022년 11월 ChatGPT 모먼트를 연상케 합니다.

OpenAI Does it Again

위 기괴한 영상은 “chaindrop”이란 Reddit 사용자가 2023년 3월 업로드한 AI 비디오입니다. 2초 분량의 세그먼트 10개를 이어 붙어 20초 짜리 영상을 만들었으며 크게 바이럴이 되었습니다.
1년 채 지나지 않아 OpenAI는 Text-to-Video 모델 Sora와 생성된 비디오 예시 몇 개를 공개합니다. “All videos on this page were generated directly by Sora without modification.

Sora 개요

Sora에 대한 소개는 아래와 같이 시작합니다:
We’re teaching AI to understand and simulate the physical world in motion, with the goal of training models that help people solve problems that require real-world interaction.
  • 🤯 첫 문장에서 OpenAI의 Sora 목적에 여러 힌트가 나옵니다. 훌륭한 Text-to-Video 모델의 가장 중요한 점은 인간들이 감각적으로 알고 있는 Real World Physics를 이해해야 합니다.
  • 비디오가 현실적으로 보이려면 여러 사항을 고려해야 합니다: Lighting, fluid dynamics, gravity, aerodynamics 등등
    • 예를 들어, 공을 던지면 어떤 방향으로 움직이는지, 바람이 불면 옷과 머리는 어떻게 움직이는지 등
  • OpenAI는 모델이 real-world를 이해하는 거대한 simulator(시뮬레이터)를 만들고, 이를 활용하여 버티컬 use-case 별로 새로운 모델을 만들겠다는 목적을 갖고 있습니다. 이는 창의적인 use case (게임 개발 등) 뿐만 아니라 시뮬레이션이 필요한 다양한 분야도 포함된다고 생각합니다.
    • 헬스케어 (think AlphaFold), Climate Modeling, 제조업 등
  • Jim Fan (Senior Research Scientist at Nvidia)이 Sora를 Physics/Simulation 엔진 관점으로 보는 트윗
notion image
notion image

주요 Capabilities

  • Sora의 몇 가지 재밌는 capability를 아래 정리해봤습니다. 더 자세하고 많은 내용은 링크 참조 부탁드립니다.

Multiple Characters

Sora is able to generate complex scenes with multiple characters, specific types of motion, and accurate details of the subject and background. The model understands not only what the user has asked for in the prompt, but also how those things exist in the physical world.
여러 캐릭터, 특정한 움직임 유형, 그리고 대상과 배경의 정확한 세부 사항이 포함된 복잡한 장면을 생성 가능. Sora은 사용자가 프롬프트에서 요청한 것뿐만 아니라 그러한 것들이 물리적 세계에서 어떻게 존재하는지도 이해합니다.
 

Persisting Characters and Visual Style

The model has a deep understanding of language, enabling it to accurately interpret prompts and generate compelling characters that express vibrant emotions. Sora can also create multiple shots within a single generated video that accurately persist characters and visual style.
모델은 언어에 대한 깊은 이해를 가지고 있어, 프롬프트를 정확하게 해석하고 생생한 감정을 표현하는 매력적인 캐릭터를 생성할 수 있습니다. 소라는 단일 생성된 비디오 내에서 캐릭터와 시각적 스타일을 정확하게 유지하는 여러 장면을 만들 수도 있습니다.
Input Video
Make it go underwater

Animating Images

Sora is capable of generating videos provided an image and prompt as input. Below we show example videos generated based on DALL·E 2 and DALL·E 3 images.
소라는 이미지와 프롬프트를 입력으로 제공받아 비디오를 생성할 수 있습니다. 아래에서는 DALL·E 2 및 DALL·E 3 이미지를 기반으로 생성된 예시 비디오를 보여줍니다.
 
notion image
 

Extending Generated Videos

Sora is also capable of extending videos, either forward or backward in time. Below are four videos that were all extended backward in time starting from a segment of a generated video. As a result, each of the four videos starts different from the others, yet all four videos lead to the same ending.
소라는 비디오를 시간적으로 앞이나 뒤로 확장할 수도 있습니다. 아래는 생성된 비디오는 모두 같은 비디오에서 생성형 AI를 활용해 확장한 결과물입니다. 결과적으로, 네 개의 비디오 각각은 서로 다른 시작점을 가지지만, 모두 같은 결말로 이어집니다.

Research

We explore large-scale training of generative models on video data. Specifically, we train text-conditional diffusion models jointly on videos and images of variable durations, resolutions and aspect ratios. We leverage a transformer architecture that operates on spacetime patches of video and image latent codes… Our results suggest that scaling video generation models is a promising path towards building general purpose simulators of the physical world.
  • 기존 Text-to-Video은 RNN, GAN, autoregressive transformer, diffusion 모델을 활용; 이러한 아키텍처의 문제점은 “narrow category of visual data, on shorter videos, or on vidoes of fixed size”를 사용함
  • Sora는 “diffusion transformer” 아키텍처를 활용; LLM과 유사하게 다양한 대량의 데이터로 학습되고 그에 상응하는 높은 양의 컴퓨팅 자원을 활용함 —> Scaling Law를 TTV에서도 사용

Training Data

notion image
  • LLM은 대량의 인터넷 데이터 학습으로 “generalist capability”를 가지게 됨; 이게 가능했던 이유는 다양한 텍스트 유형 (코드, 수학, 자연어 등)을 자연스럽게 융합하여 Training Set에 활용했기 때문 —> TTV에도 똑같이 활용할 수 있지 않을까?
  • LLM은 다양한 텍스트 데이터를 토큰으로 변형하여 사용했다면, Sora는 비주얼 데이터를 “patches”로 변형하여 사용
  • Patches는 토큰과 유사하게 모델 학습에 highly scalable하며 다양한 비주얼 데이터의 훌륭한 representation임
  • 비주얼 데이터는 Encoder를 통해 3D (Time X Width X Length) Grid of Patches로 변형됨. 여기서 “Time”은 LLM의 Attention Head와 유사하게 각 프레임의 시간적 위치를 나타내며 context를 제공
  • 마지막으로 우리가 책을 처음부터 끝까지 읽듯이 컴퓨터에게 순서대로 학습할 Line of Patches를 정리. (이러한 Line 들이 여러 개가 있고 병행적으로 학습을 돌리는 것인가?)
  • 모델이나 학습에 대한 디테일은 공개하지 않음; 작년 OpenAI가 ShutterStock과 체결한 파트너십에 따라 학습 데이터 일부분이 여기서 나왔을 것으로 추정 (ShutterStock은 약 32 million 스탁 비디오 보유)
  • 또한 다양한 전문가들은 Sora의 아웃풋을 봤을 때, Unreal Engine 5의 결과물과 유사한 것을 비추어 보아 Unreal Engine 5로 render한 visual data를 많이 활용했을 것으로 추정

Language Understanding (Use of Synthetic Data)

  • 학습 데이터엔 비디오와 이를 설명하는 “text caption”을 같이 사용
  • DALL-E 3에 활용된 “re-captioning technique”를 사용; 먼저 “highly descriptive captioner model”를 학습하고 이 모델의 아웃풋으로 비디오에 대한 설명 “synthetic data”를 만들어 활용
  • 이 text caption은 길고 자세할 수록 좋음; captioner model의 아웃풋을 추가적으로 GPT를 활용하여 더 길고 descriptive하게 modify함
  • 이를 통해 Sora는 user의 prompt를 더 잘 이해하고 생성할 수 있음

Video Compression Network 및 Spacetime Latent Patches

  • VCN은 원본 비디오의 필수 정보를 유지하며 압축 형태로 변환
  • 변환된 파일형태는 이미지 퀄리티와 프레임이 줄어들지만 Sora는 이 단순화된 형태(latent space)에서 비디오를 생성하는 방법을 학습
  • 압축된 인풋 비디오는 spacetime(공간 시간) patches를 만들고 트랜스포머의 토큰처럼 활용됨
  • Patch를 활용하는 아키텍처로 RAG, RNN 등과 달리 Sora는 다양한 사양(resolution), 크기, 길이 등의 사진이나 비디오를 학습 데이터로 활용 가능하며 Inference 시엔 원하는 비디오 크기를 설정하여 생성 가능

Scaling Transformers for Video Generation

Sora is a diffusion model; given input noisy patches (and conditioning information like text prompts), it’s trained to predict the original “clean” patches. Importantly, Sora is a diffusion transformer. Transformers have demonstrated remarkable scaling properties across a variety of domains, including language modeling, computer vision, and image generation.
  • 그 이후 학습/Inference 방식은 Diffusion 모델과 유사
notion image
  • Scaling Law: 데이터, 컴퓨팅 자원, 파라미터 수를 늘리면 예측가능한 수준으로 모델 성능이 올라감; 이는 LLM 뿐만 아니라 컴퓨터 비전, 이미지 및 비디오 생성 분야에서도 볼 수 있음
notion image

Summary

  • Sora는 “Diffusion-Transformer” 아키텍처로 기존 RNN, CNN 등 TTV 모델 아키텍처의 Limitation을 뛰어넘을 수 있음
  • 기존엔 한 유형의 비디오 데이터만 학습데이터로 사용했음; 예를 들어, 256x256 resolution의 4초 길이 영상
  • 이렇게 학습된 모델의 아웃풋은 한정적일 수 밖에 없음; e.g. 4초 짜리 256x256 resolution 비디오
  • Spacetime Latent Patches를 활용하여 다양한 유형, 길이 등의 비디오 데이터를 학습 데이터로 사용할 수 있으며, synthetic data로 유저 프롬프트를 잘 이해할 수 있게 tuning할 수 있고, transformer 아키텍처로 scaling law를 구현할 수 있음
  • 이로 인해 다양한 길이, 유형의 비디오를 아웃풋 할 수 있고 Framing과 Composition 등에 이점이 있음

Biggest Problems with Text-to-Video Today

최근에 되게 재밌는 유튜브 영상을 봤습니다. Noodle(유튜버)은 AI를 활용한 비디오/애니메이션 생성에 대해 환상을 버리라고 합니다.
아래는 애니메이션의 Bible이라고 알려진 1981년 출판한 “The Illusion of Life: Disney Animation”의 “12 Principles of Animation”입니다.
notion image
약 2년 전에 publish 된 비디오에선 AI는 이 12개 중 7개 (Timing, Anticipation, Solid Drawing, Arcs, Follow-through, Secondary Actions, Easing)을 수행하지 못하기 때문에 큰 효용성이 없다고 주장합니다.
각 Principle에 대해 자세히 들어가진 않겠습니다 (자세한 내용은 링크 참조).
(물론 제약이 있지만) 정말 놀라운 것은 Sora는 이 12가지 Principle을 통과하는 수준의 아웃풋을 내놓을 수 있는 모델이라는 것입니다. 이 유튜버가 Sora를 보고 어떤 반응일지 정말 궁금하네요.
특히, LLM들이 보여줬던 것 처럼 Sora 또한 Diffusion-Transformer 모델(scaling law)로 예상치 못했던 “emergent capabilities”를 보이고 있습니다. 단순 비디오로 학습했을 뿐인데 세상에 대한 understanding을 관찰할 수 있습니다.
다시 Jim Fan의 트윗을 가져오면…
notion image

Emergent Capabilities

3D Consistency

Sora can generate videos with dynamic camera motion. As the camera shifts and rotates, people and scene elements move consistently through three-dimensional space.

Long-range Coherence and Object Permanence

A significant challenge for video generation systems has been maintaining temporal consistency when sampling long videos. For example, our model can persist people, animals and objects even when they are occluded or leave the frame. Likewise, it can generate multiple shots of the same character in a single sample, maintaining their appearance throughout the video.

Interacting with the World

Sora can sometimes simulate actions that affect the state of the world in simple ways. For example, a painter can leave new strokes along a canvas that persist over time, or a man can eat a burger and leave bite marks.

Limitations

현재 Sora의 Limitation은 많습니다. 매우 잘 만들어진 영상처럼 보이는 것들도 뒤에 배경이나 물체들을 자세히 보면 이상하게 행동하는 것들이 한두개가 아닙니다.
특히, 사용자 입장에서 가장 큰 제약은 Sora가 생성한 비디오와 직접 interact하고 수정하지 못하는 점이겠죠. 비디오의 조그만한 부분을 수정하기 위해선 매우 iterative한 prompt wrangling을 해야 할 것으로 보입니다.
사용자와 모델이 Interaction 할 수 있는 방법이 단순 챗봇과 같은 인터페이스이면 효용성은 너무 적습니다. 다만, 미래엔 이를 해결할 수 있는 솔루션이 나오지 않을까 싶습니다. 예를 들어, 생성된 비디오의 각 객체를 3D asset으로 변형하여 수정가능한 툴(Unreal Engine 5 등)에 import하고 작업을 할 수 있다던지 등
notion image

Conclusion

notion image
OpenAI의 새 소식은 매우 exciting하면서도 한 편으로는 우려스럽습니다. OpenAI는 매번 새로운 소식을 전할 때 마다 한 분야의 AI 스타트업들을 궁지로 몰아넣고 있습니다.
  • ChatGPT —> Jasper 등
  • GPT Store —> Character AI 등
  • Sora —> Runway, Pika, Midjourney 등
미래에도 다양한 프로덕트 계획을 내놓은 바 있습니다:
  • Agent 기능 (링크) —> Adept 등
  • Search 기능 (링크) —> Perplexity 등
물론 위 프로덕트로 해당 시장의 파이를 OpenAI가 다 가져간다는 뜻은 아닙니다. 다만, AI 스타트업 생태계를 훼방 놓고 이들에겐 불안감과 불확실성을 심어주고 있습니다.
notion image
의견, 질문, 피드백이 있으시면 편하게 메일이나 아래 LinkedIn으로 연락 부탁 드립니다 (커피챗도 좋습니다!☕).
 
Share article
Subscribe Newsletter
Stay connected for the latest news and insights.
RSSPowered by inblog