Image model을 video model로 전환시키는 zero-shot text-guided video-to-video translation framework를 제시함. 1) Key frame translation part는 hierarchical cross-frame constraint가 적용된 채 key frame을 생성하는 adapted diffusion model로 구성되며, 2) Full video translation part는 temporal-aware patch matching과 frame blending을 통해 key frame을 다른 frame으로 전파함.
이를 통해 LoRA, ControlNet 등의 pre-trained model에 별도의 re-training 및 optimization 없이 global style과 local texture에 대한 temporal consistency를 얻어냄.
Text-to-video diffusion model은 일반적으로 1) large-scale video data에 대해 학습시키거나(막대한 computing resources 요구, 기존의 image model 활용 불가), 2) image model을 단일 video에 대해 fine-tuning하거나(긴 영상에 대해선 비효율적이며 overfitting의 문제 발생), 3) 별도의 training 없이 cross-frame constraint를 부여하는 zero-shot method를 사용(global style만을 익히고 local structure와 texture는 보존시키지 못함)
Low-level temporal consistency를 유지하는 zero-shot strategy를 새롭게 고안!
Previous rendered frame을 low-level reference로, first rendered frame을 rendering process에 대한 regulator로 삼는 optical flow를 diffusion sampling의 multiple stages에 dense cross-frame constraint으로 부여.
Key frame translation과 Full video translation part로 나뉨.
Diffusion-based generation과 patch-based propagation을 혼합한 방법론 제시.
Text Driven Image Generation
Video Editing with Diffusion Models
Stable Diffusion (생략)
ControlNet
: Text prompt의 spatial controllability를 향상시키기 위해 extra condition(e.g. edges, depth, human pose) 부여
: Temporal consistency가 개선된 zero-shot V2V framework를 구성하기 위해, structure guidance를 부여할 수 있는 ControlNet을 사용함.
Style-Aware Cross-Frame Attention 모든 sampling step에 적용
: U-Net 상의 self-attention layer를 first(anchor) frame과 previous frame에 대한 cross-frame attention layer로 교체.
Shape-Aware Cross-Frame Latent Fusion Sampling step 초반에 적용
: Optical flow와 occlusion mask , 로 frame의 latent feature를 warping하여 frame의 latent feature에 반영. 실험적으로 anchor frame이 previous frame보다 좋은 guidance를 제공하였음.
*Optical flow: 두 프레임 사이에서 각 픽셀의 motion을 나타내는 vector map.
*Occlusion mask: 현재 프레임 상에서 일시적으로 가려진 이전 프레임 상 픽셀들의 집합. 두 프레임 간의 픽셀 강도 변화나 이동 크기 등을 기준으로 임계치보다 클 경우 occlusion이 발생한 것으로 판단.
Pixel-Aware Cross-Frame Latent Fusion Sampling step 중반에 적용
Color-Aware Adaptive Latent Adjustment Sampling step 종반에 적용
: AdaIN(style transfer network)을 적용하여 의 channel-wise 평균 및 분산 값을 과 일치시킴. 이를 통해 모든 key frame에 대한 color style이 일관되도록 유도.
Key frames에 대해서만 앞선 adapted diffusion model 적용 후, patch-based frame interpolation algorithm으로 나머지 frames 렌더링.
Patch-Based Propagation
: Guided path-matching algorithm에 color, positional, edge, temporal guidance를 부여하여 인접 frame 간 correspondences map 생성.
Temporal-Aware Blending
: Rendered key frame 와 를 각각 와 로 propagate. 이후 rendered image 과 propagated image 사이의 patch matching error 를 기반으로 pixel selection mask 구성.
: 의 원소는 모두 1로 초기화. 이후 매 frame index 에 대해, 이전 frame의 mask 를 optical flow 로 warping한 뒤 을 갖는 pixel에 대해서만 update 진행. (에서 점차 로 진행되도록)
Fine-Tuning Techniques for Diffusion Models
'Adding Conditional Control to Text-to-Image Diffusion Models' | Zhang et al. | FEB23
Edge map, segmentation map, key points 등의 추가적인 input condition으로 pre-trained diffusion model을 control.
Large diffusion model의 weights를 'trainable copy'와 'locked copy'로 복제하여, 'trainable copy'는 task-specific 데이터셋을 통해 conditional control를 학습시키고, 'locked copy'는 기존 모델의 prior가 유지되도록 함. (단, 데이터셋의 크기가 1M 이상인 경우 locked copy에 대해서도 학습 진행)
두 neural net block은 'zero convolution'과 연결되며, 이는 weights와 bias가 0으로 초기화된 1x1 크기의 conv. layer에 해당. 따라서 학습 초반에는 locked copy에 영향을 미치지 않으며, condition vector의 semantic content에 대해 optimize.
'Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization' | Huang et al. | JUL17
'GMFlow: Learning Optical Flow via Global Matching' | Xu et al. | JUL22
: Optical flow estimation을 global matching problem으로 두어 해결.
Key Frame translation을 수행하는 DDIM sampling pipeline에 아래와 같이 개선.
1.(전부) self-attention layer를 anchor/previous frame에 대한 cross-frame attention layer로 바꾸어 style consistency 부여.
2.(초반) anchor frame의 denoised feature 를 warping 후 target frame의 denoised feature 에 반영하여 shape consistency 부여.
3.(중반) anchor/previous frame의 image pixel 을 warping 후 rough rendered target frame 에 합하여 생성한 pixel reference를 fidelity-oriented encoder에 입력 후 target frame의 noised feature 에 반영하여 structure consistency 부여.
4.(종반) AdaIN으로 denoised feature 의 channel-wise 평균 및 분산 값을 고정하여 color style consistency 부여.
양단의 rendered key frame으로 color, positional, edge, temporal guidance 기반의 correspondences map 생성 후, 그 사이 frame에 대해 각각 patch-based propagation 진행. Patch matching error 기반의 pixel selection mask로 blending하여 전체 영상 완성.