Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Add video2video mode (with in-painting and outpainting analogues for making vid from keyframes and AI-continuing vids) #4

Open
7 tasks done
kabachuha opened this issue Mar 20, 2023 · 8 comments · Fixed by #37 or #38
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed script candidate vid2vid

Comments

@kabachuha
Copy link
Owner

kabachuha commented Mar 20, 2023

Just like stable diffusion is transforming one picture into another one (or noise, if the input is not specified), this model is theoretically capable of transforming a video into another video, using text hints if we initialize the latents with the input video frames

https://github.com/deforum-art/sd-webui-modelscope-text2video/blob/857594d61ea776794296ffa6d256bf93eaa7fcd2/scripts/t2v_pipeline.py#L153


The proposed scheme (like img2img, but to videos)

  • Prepare input videos for the input mode (rescaling, cutting to the input length)
  • Encode videos to the latent representation by running the VAE
  • Configure the DDIM scheduler to use Denoising strength
  • Pass the latents to the pipeline and test it
  • Configure denoising strength influence
  • Bonus: In-framing —pass an input video, add a few keyframes, mask them, fill the rest with latent noise or keep the original, vid2vid diffuse not masked area. Just like in-painting, but for vid2vid
  • Bonus 2: Video continuation — extending the vid with latent noise frames and moving a 'window' making the aforementioned 'in-framing', thus allowing the video to extend beyond vram bounds, but losing some of its temporal coherence
@kabachuha kabachuha added enhancement New feature or request help wanted Extra attention is needed labels Mar 20, 2023
@Pythonpa
Copy link

Does adding this line of code allow us to go from video to video?

@kabachuha
Copy link
Owner Author

This line of code points only to that we can replace latents with the video to process encoded via VAE. So it will require one more extra step

@kabachuha kabachuha changed the title [Feature request] Add video2video mode [Feature request] Add video2video mode (with in-painting and outpainting analogues for making vid from keyframes and AI-continuing vids) Mar 21, 2023
@kabachuha kabachuha self-assigned this Mar 21, 2023
@kabachuha kabachuha pinned this issue Mar 21, 2023
@kabachuha
Copy link
Owner Author

PR adding denoising strength

#34

@nagolinc
Copy link
Contributor

WIP

#37

If anyone knows how to fix it so the results don't look all washed out, that would be super helpful.

@kabachuha kabachuha linked a pull request Mar 22, 2023 that will close this issue
@kabachuha kabachuha mentioned this issue Mar 22, 2023
3 tasks
@kabachuha kabachuha reopened this Mar 23, 2023
@Kamekos
Copy link

Kamekos commented Mar 24, 2023

Can we get a Controlnet Pose video 2 video ?

Basically analyzing the frames poses of the character with the open pose model, saving these Controlnet pictures, loading them back with the controlnet plugin on and the openpose model off, rendering the rest of the vid 2 vid

the controlnet frames check needs to be done sequentially, to limit the Vram usage

@kabachuha
Copy link
Owner Author

@Apatiste sounds like a good idea for the future Deforum/text2vid integration, since Deforum already has ControlNet support

@nagolinc
Copy link
Contributor

I have inpainting working!

Github is acting up atm but I will push a branch as soon as I can.

inpainting_Screenshot 2023-03-27 091243

00128-395674870-cute redhead standing in a  field of wheat, freckles, realistic skin texture

inpainting.mp4

@nagolinc
Copy link
Contributor

#74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed script candidate vid2vid
Projects
None yet
4 participants