Skip to content

Instantly share code, notes, and snippets.

@wey-gu
Last active February 22, 2023 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wey-gu/22883e4c2d72bb130c6994253c56c088 to your computer and use it in GitHub Desktop.
Save wey-gu/22883e4c2d72bb130c6994253c56c088 to your computer and use it in GitHub Desktop.
Run ControlNet Video on colab notebook

See also: https://gist.github.com/wey-gu/54db65ac5551b473de2feb34c0985110

Enable GPU

Follow https://web.eecs.umich.edu/~justincj/teaching/eecs442/WI2021/colab.html

Get Demo code and ControlNet

!nvidia-smi
import torch
print(str(torch.cuda.is_available()))
!git clone https://huggingface.co/spaces/fffiloni/ControlNet-Video
%cd ControlNet-Video
!pip install -r requirements.txt -q
!pip install gradio imageio==2.4.1 -q

# modify app.py
!git submodule update --init --recursive

modify app.py for colab

add share=True to launch()

-demo.launch().queue(max_size=12)
+demo.launch(share=True).queue(max_size=12)

fix importing issues

!ln -s ControlNet/annotator/ annotator

ref:

@wey-gu
Copy link
Author

wey-gu commented Feb 20, 2023

ControlNet_Video.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment