diff --git a/README.md b/README.md index 836d9d4..371f6fd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/gradio_app.py b/gradio_app.py index 86cb771..42f30d7 100644 --- a/gradio_app.py +++ b/gradio_app.py @@ -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 @@ -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)