{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "d6bdd156-e441-4f7b-bd7e-d397fc335428", "metadata": {}, "outputs": [], "source": [ "!kill -9 $(ps -ef | grep 'relauncher.py' | grep -v 'grep' | awk '{print $2}')\n", "!kill -9 $(ps -ef | grep 'webui' | grep -v 'grep' | awk '{print $2}')\n", "!kill -9 $(ps -ef | grep 'launch.py' | grep -v 'grep' | awk '{print $2}')\n", "!kill -9 $(ps -ef | grep 'run.sh' | grep -v 'grep' | awk '{print $2}')\n", "!kill -9 $(ps -ef | grep 'run.py' | grep -v 'grep' | awk '{print $2}')" ] }, { "cell_type": "code", "execution_count": null, "id": "f34d6131-8170-4173-ac5c-f835c9fa6ea5", "metadata": { "scrolled": true }, "outputs": [], "source": [ "%cd /workspace\n", "!sh /workspace/run.sh\n", "#final_args = f\"python /workspace/SD/launch.py --port 7860 --api --theme dark --allow-code --enable-insecure-extension-access --listen --share --cuda-malloc --cuda-stream --pin-shared-memory\"\n", "#!{final_args}" ] }, { "cell_type": "code", "execution_count": null, "id": "1778d96c-dca4-4d2a-bbe6-3ee6b29fc504", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "a6dc2425-7df8-4d99-80b3-312bac52019f", "metadata": {}, "outputs": [], "source": [ "!git -C /workspace/SD/models fetch --all\n", "!git -C /workspace/SD/models reset --hard origin/main\n", "!git -C /workspace/SD/models pull\n", "!git -C /workspace/SD/models repack -a -d --depth=250 --window=250\n", "!rsync -r \"/workspace/SD/models/embeddings/\" \"/workspace/SD/embeddings/\"\n", "!rm -r \"/workspace/SD/models/.git/lfs\"" ] }, { "cell_type": "code", "execution_count": null, "id": "6d5e74dc-c597-4182-927b-fb506987d7ca", "metadata": {}, "outputs": [], "source": [ "!sh /workspace/out.sh 0" ] }, { "cell_type": "code", "execution_count": null, "id": "23bbfe13-0ac5-4881-848b-a94008e045ff", "metadata": {}, "outputs": [], "source": [ "!curl -L -O https://huggingface.co/zuv0/SDXLRF11001/resolve/main/autoUpload.sh | bash -c 'sleep 1; . ./autoUpload.sh xxxx'" ] }, { "cell_type": "code", "execution_count": null, "id": "abb78189-95bc-4d04-b897-b75ffa5ec539", "metadata": {}, "outputs": [], "source": [ "import os\n", "if os.path.exists(\"/workspace/SD/output\"):\n", " !runpodctl send /workspace/SD/output\n", "else:\n", " if os.path.exists(\"/workspace/output\"):\n", " !runpodctl send /workspace/output" ] }, { "cell_type": "code", "execution_count": null, "id": "9ebbbb83-c8ef-47d2-b038-92145196385e", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "94503b7f-e460-4eda-8679-058497ae771a", "metadata": { "scrolled": true }, "outputs": [], "source": [ "%cd /workspace/SD\n", "!curl -L -O https://huggingface.co/zuv0/SDXLF17/resolve/main/downs.sh | bash -c 'sleep 1; . ./downs.sh d3 0'" ] }, { "cell_type": "code", "execution_count": null, "id": "645dbd2b-0f6f-4791-8b30-435649d27ed2", "metadata": {}, "outputs": [], "source": [ "import torch\n", "import torchvision\n", "print(torch.__version__)\n", "print(torchvision.__version__)" ] }, { "cell_type": "code", "execution_count": null, "id": "87d3aadd-7a32-4132-a1ec-0d53b75518be", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "c7f291ff-c792-454e-9a20-211759f9e208", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "93a28067-28c7-47eb-88ef-cb8864eee7a4", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" }, "vscode": { "interpreter": { "hash": "c36c8ff63afb68809d72fa6323bde02fb9b90fe01b492d36c13befd021790766" } } }, "nbformat": 4, "nbformat_minor": 5 }