Dmitrii Tochilkin Profile picture
Aug 21, 2022 8 tweets 4 min read Read on X
Inpainting mode in #DiscoDiffusion!
I've finally made the parametrised guided inpainting for disco, and applied it for more stable 2D and 3D animations. In the thread i show what's in there

colab.research.google.com/github/kostari…
Inpainting can be used to repaint unwanted parts of the still image using binary mask. Mask can be drawn inside colab if you check 'draw_mask' flag, or by specifying the path.
I've also applied inpainting to the 2D and 3D animation processes to make them more stable. Previously we've had a tradeoff: either a stable animation with high skip_steps (but you get trails and poor details in the regions that were missing in the previous frame)
...or low skip_steps but then the animation is very shaky. Instead, we can dynamically calculate the missing part for the current frame camera movement and ✨inpaint✨only that. So, you get stable animation AND good details. 2D example:
It works for 3D animations also!
Actually, it can also be used for Video Source animation to make stable&detailed warps (by inpainting only occluded areas). But my current implementation works on top of @devdef's consistency checks from the #warpfusion patreon colab, so probably it will remain closed for now
How Disco Diffusion inpainting works: it messes up the diffusion process, enforcing the pixels outside of the mask to match the original image mixed with the amount of noise that corresponds to the current diffusion step.
Also, there is an option to add blur to the mask edges for smooth blending. The whiter the mask, the more diffusion steps is applied to this area. On the 'skip_steps' step # we start inverse-diffussing the area where mask=1, and then continuously expand for less bright areas

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dmitrii Tochilkin

Dmitrii Tochilkin Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @cut_pow

Oct 3, 2022
"A Year"

AI animation artwork made in colab using my custom stable 3D animation algorithm on top of #stablediffusion model. In the thread I share some details about the algo and when i plan to release it, and talk about the joy and future of AI filmmaking

🎶 DakhaBrakha - Vesna
1.1 Algorithm. Сore idea of the algorithm is to keep image parts known from the previous frame intact and inpaint only image areas that are missing. We can determine what is known and what is missing from a depth map and a camera transform. Algo steps overview below🎦
1.2 It heavily relies on the quality of depth maps, and uses the assumption that SD has implicit knowledge of the scene geometry in an image. So therefore it can plausibly inpaint missing parts without explicitly knowing underneath 3D meshes of the scene
Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(