{"cells":[{"cell_type":"markdown","metadata":{},"source":["# Motion Studio — free GPU run\n","\n","Genjutsu-style motion transfer on Colab's free tier.\n","\n","**Before running:** set Runtime → Change runtime type → **GPU** (T4).\n","\n","What this does:\n","1. Downloads the Motion Studio app (from the free Hugging Face Space).\n","2. Installs dependencies.\n","3. Launches the Gradio app with a public share link.\n","\n","The Depth Anonymizer tab works on CPU. The Motion Transfer tab needs the GPU — first run downloads the DWPose models (~150MB) and the MimicMotion checkpoint (~5GB), then caches them.\n","\n","You will need a Hugging Face token with access to the gated `stabilityai/stable-video-diffusion-img2vid-xt-1-1` model for motion transfer. Accept the licence on the model page, create a token, and paste it when asked below."]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["!curl -sL -o motion-studio.zip https://huggingface.co/spaces/ayoinc/motion-studio/resolve/main/motion-studio.zip\n","!unzip -q -o motion-studio.zip -d motion-studio\n","!ls motion-studio"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["%cd motion-studio\n","!pip install -q -r requirements.txt"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["import os\n","hf_token = input(\"Hugging Face token (needed for motion transfer, blank to skip): \").strip()\n","if hf_token:\n","    os.environ[\"HF_TOKEN\"] = hf_token\n","    print(\"Token set.\")\n","else:\n","    print(\"No token — the Depth Anonymizer tab will still work.\")"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["import app as m\n","m.demo.queue(max_size=8).launch(share=True)"]}],"metadata":{"colab":{"provenance":[]},"kernelspec":{"display_name":"Python 3","name":"python3"}},"nbformat":4,"nbformat_minor":5}