AI

[Stable Diffusion] AnimateDiff-CLI Prompt-Travel 사용방법

codens 2023. 9. 24. 04:14

[Stable Diffusion] AnimateDiff-CLI Prompt-Travel
AnimateDiff-CLI 를 이용하여 여러 이미지로 전환가능
controlnet 사용가능
영상을 다른 스타일의 영상으로 변환 


s9roll7    /    animatediff-cli-prompt-travel
https://github.com/s9roll7/animatediff-cli-prompt-travel - 234

neggles    /    animatediff-cli
https://github.com/neggles/animatediff-cli - 129

guoyww / AnimateDiff
https://github.com/guoyww/AnimateDiff - 3.8k

 

 

//-------------------------------------

사용예) Stylize Video
https://github.com/s9roll7/animatediff-cli-prompt-travel/issues/29

 

//-------------------------------------

The Unknown Woman QR_code_ControlNet + AnimateDiff 13 seconds + upscale to 1920x1080

https://www.reddit.com/r/StableDiffusion/comments/16lo7p6/the_unknown_woman_qr_code_controlnet_animatediff/

The Unknown Woman QR_code_ControlNet + AnimateDiff 13 seconds + upscale to 1920x1080
byu/Dartmoor26 inStableDiffusion

 


//-------------------------------------
    - 설치
git clone https://github.com/s9roll7/animatediff-cli-prompt-travel.git
cd animatediff-cli-prompt-travel
py -3.10 -m venv venv

venv\Scripts\activate.bat

python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
python -m pip install -e .
python -m pip install xformers

    - stylize 기능 사용시
python -m pip install -e .[stylize]

    - dwpose를 controlnet_openpose 의 preprocessor로 사용시
python -m pip install -e .[dwpose]


//-------------------------------------
    - 추가 정보
https://www.reddit.com/r/StableDiffusion/comments/157c0wl/working_animatediff_cli_windows_install/

    - 모델 다운로드
https://huggingface.co/guoyww/animatediff/tree/main 에서 파일 다운로드 해서 data\models\motion-module 폴더로 이동

    - stable diffusion 모델을 다운로드 해서 data\models\sd 폴더로 이동

//-------------------------------------
    - help
animatediff -h
animatediff generate -h
animatediff stylize -h

    --context  -C    Number of frames to condition on
        - 같은 condition 프레임수, 적을 수록 변화가 빠르다.

//-------------------------------------
    - 사용법 예시 - controlnet_openpose 사용하여 여러 단계로 변하는 영상 만들기

    - 파일 복사
변경하려는 원본 이미지(단계별 이미지)를 data\controlnet_image\test\controlnet_openpose 폴더에 복사
파일 이름 예) 0000.png , 0016.png, 0032.png


    - 설정 파일 수정
config\prompts\prompt_travel.json

"prompt_map": {
    "0":  "smile standing,((spider webs:1.0))",
    "32":  "(((walking))),((spider webs:1.0))",
    "64":  "(((running))),((spider webs:2.0)),wide angle lens, fish eye effect",
    "96":  "(((sitting))),((spider webs:1.0))"
  },

...

"controlnet_map": {
    "input_image_dir" : "controlnet_image/test",

...

"controlnet_openpose":{
      "enable": true,
      "use_preprocessor":true,
      "guess_mode":false,
      "controlnet_conditioning_scale": 1.0,
      "control_guidance_start": 0.0,
      "control_guidance_end": 1.0,
      "control_scale_list":[0.5,0.4,0.3,0.2,0.1]
    },


//-------------------------------------
    - 실행 방법
animatediff generate -c config/prompts/prompt_travel.json -W 512 -H 768 -L32 -C16

 

반응형