diff --git a/README.md b/README.md index 7b728a9..9e890d2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ # :wrench: Installation +Clone the repository: + +```bash +git clone --recursive https://github.com/Stability-AI/stable-virtual-camera +``` + To setup the virtual environment and install all necessary model dependencies, simply run: ```bash diff --git a/demo_gr.py b/demo_gr.py index 0936105..542fb68 100644 --- a/demo_gr.py +++ b/demo_gr.py @@ -852,7 +852,8 @@ def main(server_port: int | None = None, share: bool = True): with gr.Row(): with gr.Column(): with gr.Group(): - preprocess_btn = gr.Button("Preprocess images") + # Initially disable the Preprocess Images button until an image is selected. + preprocess_btn = gr.Button("Preprocess images", interactive=False) preprocess_progress = gr.Textbox( label="", visible=False, @@ -875,6 +876,12 @@ def main(server_port: int | None = None, share: bool = True): render=False, ) preprocessed = gr.State() + # Enable the Preprocess Images button only if an image is selected. + input_imgs.change( + lambda img: gr.update(interactive=bool(img)), + inputs=input_imgs, + outputs=preprocess_btn, + ) preprocess_btn.click( lambda r, *args: [ *r.preprocess(*args), @@ -1051,7 +1058,8 @@ def main(server_port: int | None = None, share: bool = True): with gr.Row(): with gr.Column(): with gr.Group(): - preprocess_btn = gr.Button("Preprocess images") + # Initially disable the Preprocess Images button until images are selected. + preprocess_btn = gr.Button("Preprocess images", interactive=False) preprocess_progress = gr.Textbox( label="", visible=False, @@ -1112,6 +1120,7 @@ def main(server_port: int | None = None, share: bool = True): gr.update(visible=False), gr.update(visible=False), gr.update(visible=True), + gr.update(interactive=bool(x)) ), inputs=[example_imgs_expander], outputs=[ @@ -1120,6 +1129,7 @@ def main(server_port: int | None = None, share: bool = True): example_imgs_confirmer, example_imgs_backer, example_imgs, + preprocess_btn ], ) example_imgs_backer.click( diff --git a/pyproject.toml b/pyproject.toml index da9502c..cfe2030 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ name = "seva" version = "0.0.0" requires-python = ">=3.10" dependencies = [ + "torch>=2.6.0", "roma", "viser", "tyro",