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

Added --share option so that it can also be used with Google Colab #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ Because the processing time, in most cases, is significantly longer than most ta

If you do not have required computation devices and still wants an online solution, one option is to wait us to release a Colab notebook (but I am not sure if Colab free tier will work).

## Use Google Colab
To use with Google Colab, please use the following command:

!git clone https://github.com/lllyasviel/Paints-UNDO.git
%cd Paints-UNDO
!pip install xformers
!pip install -r requirements.txt
!python gradio_app.py --share

# Model Notes

We currently release two models `paints_undo_single_frame` and `paints_undo_multi_frame`. Let's call them single-frame model and multi-frame model.
Expand Down
8 changes: 7 additions & 1 deletion gradio_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import wd14tagger
import memory_management
import uuid
import argparse

from PIL import Image
from diffusers_helper.code_cond import unet_add_coded_conds
Expand Down Expand Up @@ -318,4 +319,9 @@ def process_video(keyframes, prompt, steps, cfg, fps, seed, progress=gr.Progress
examples_per_page=1024
)

block.queue().launch(server_name='0.0.0.0')

# command line arguments
parser = argparse.ArgumentParser(description='Run the Paints-UNDO')
parser.add_argument('--share', action='store_true', help='Share the app on Gradio')
args = parser.parse_args()
block.queue().launch(server_name='0.0.0.0', share=args.share)