https://storydiffusion.github.io/
ByteDance에서 한 연구. 그래서 paper만 있으리라 생각했는데 무려 code와 hugging face demo(언제 사라질 지 모르지만)까지 제공한다.
consistent image generation과 long sequence video generation을 중심으로 하는 모델이다.
Traing-free, zero-shot 모델로 기존 diffusion-based generation model에 있는 UNet의 attention을 변형한 Consistent self-attention을 제안한다.
method는 크게 이미지파트와 비디오 파트로 나뉜다.
기존 attention 식은 다음과 같다.
각각의 query, key, value는 자기 자신으로 self-attention을 진행한다.
이에 반해, 논문에서 제시하는 Consistent self-attention은 일종의 Randsample 모듈을 하나 붙인 형태이다.
Randsample은 각 이미지 프레임 에서 배치 크기만큼 sampling한 것이다. 로 표현한다.
이 sampled token 를 입력으로 들어온 이미지 와 합친 set (paired token set)를 만든다.
Consistent SA는 를 attention에 이용하는 것이 핵심이다.
각 배치 이미지들을 위 attention을 이용한다.
Semantic motion predictor는 image semantic space에서 spatial information을 유지하여 비디오를 생성하기 위해 제안하는 구조이다.
1) image encoding → 2) semantic space predict → 3) generation video
이렇게 3단계를 거쳐 완성된다.
이미지의 RGB를 vecter + semantic space로 바꿔주는 encoder 는 pretrained CLIP모델을 사용한다.
start frame과 end frame인 를 pretrained CLIP으로 encoding한다.
encoding된 결과를 image prompt로 사용하고 transfomer block 를 이용해 각 frame마다 연관도를 제어한다.
앞서 만든 image prompts embedding 와 text prompt embedding 를 cross attention하여 각각의 video frame feature를 predicted 한다.
비디오간의 consistency를 위해 이전 방식을 optimize하는 방법으로 접근한다.
G, O는 : ground truth, : frame predict translation video
를 의미한다.
8 A100 GPUs
Learning rate : 1e-4
Image semantic space model : OpenCLIP ViT-H-14
이미지 생성에서는 IP-Adapter, PhotoMaker 모델과 함께 얼마나 캐릭터 특성을 유지하였는지를 중심으로 본다.
다음으로 비디오 결과이다. SEINE, SparseCtrl과 비교하였다.
전반적인 consistancy가 다이나믹한 동작에도 잘 지켜짐을 주장하고 있다.
hugging face demo 버전도 같이 제공하길래 한 번 inference 해봤다.
기본 캐릭터 description은 이렇게 주고 추가적으로 각 scene별 description을 주어 봤다.
Comic Description (each line corresponds to a frame)
생각보다 강력한 hausination을 가진 것 같다. 이미지 자체는 깔끔한데 제어는 잘 모르겠다.