Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installation:
- - Install Stable Diffusion Web UI from https://github.com/AUTOMATIC1111/stable-diffusion-webui (Make sure to run update.bat before you run it.)
- - Install sd-webui-segment-anything from https://github.com/continue-revolution/sd-webui-segment-anything
- - Download sam_hq_vit_l.pth (https://huggingface.co/lkeab/hq-sam/resolve/main/sam_hq_vit_l.pth) and put it in extensions/sd-webui-segment-anything/models/sam
- - Download lcm-lora-sdv1-5 (https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/blob/main/pytorch_lora_weights.safetensors) Rename it to "lcm-lora-sdv1-5.safetensors" and put it in models/Lora
- - Install sd-webui-replacer from https://github.com/light-and-ray/sd-webui-replacer
- - Install inpainting models and put them into models/Stable-diffusion
- I used one of these inpainting models but I can't recall which:
- https://civitai.com/models/2661?modelVersionId=15670
- https://civitai.com/models/80473?modelVersionId=426300
- https://civitai.com/models/4201?modelVersionId=245627
- https://civitai.com/models/4384?modelVersionId=131004
- I also got an error when inpainting about GroundingDINO, to remove the error you can enable "Use local groundingdino to bypass C++ problem" in the settings.
- - Extract frames of clip using FFMPEG. The command I use is: ffmpeg -i "path/to/video/here" -r videoframeratehere "output/path/here/%04d.png"
- - In the WebUI select the inpainting model
- - Detection prompt: "Sports Bra, shirt"
- - Positive prompt: "RAW photo of a nude Asian girl, naked, slim body, realistic anatomy, high quality"
- - I also used a Lora (https://civitai.com/models/25727/jk-small-breasts-lite) for this clip, because without the breasts were too big. So I added "<lora:jkSmallBreastsLite_V01:1>, jkSmallBreastsLite" to the positive prompt.
- - Negative prompt: "((clothing)), (monochrome:1.3), (deformed, distorted, disfigured:1.3), (hair), jeans, tattoo, wet, water, clothing, shadow, 3d render, cartoon, ((blurry)), duplicate, ((duplicate body parts)), (disfigured), (poorly drawn), ((missing limbs)), logo, signature, text, words, low res, childish, boring, artifacts, bad art, gross, ugly, poor quality, low quality, poorly drawn, bad anatomy, wrong anatomy"
- - In the advanced settings I increased the steps to 25, I entered the videos resolution in the height/width fields and set the seed to something random. Having the seed set to something (Not -1) is important for consistency!
- - You can set an avoidance prompt if needed. In the clip I made maybe "pants"
- - Increase the inpainting padding. I use about 60
- - Finally, use FFMPEG to merge the frames into a video again. The command I use is: ffmpeg -r videoframeratehere -i "path/to/frames/%04d.png" -c:v libx264 -vf fps=videoframeratehere -pix_fmt yuv420p "output/folder/output.mp4"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement