File size: 3,946 Bytes
833b7f2 f21946d 833b7f2 f21946d 833b7f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "02bc524b-76ce-45ee-a3c2-56ce6fd9ebc8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[35m[\u001b[0m#23908a 2.7GiB/6.4GiB\u001b[36m(41%)\u001b[0m CN:16 DL:\u001b[32m5.7MiB\u001b[0m ETA:\u001b[33m11m12s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mSD未启动3\n",
" *** Download Progress Summary as of Sun Nov 24 23:29:21 2024 *** m11m3s\u001b[0m\u001b[35m]\u001b[0m\u001b[0m\n",
"===============================================================================\n",
"[#23908a 2.7GiB/6.4GiB(42%) CN:16 DL:5.6MiB ETA:11m21s]\n",
"FILE: /tmp/code/sd/stable-diffusion-webui/models/Stable-diffusion/动漫-NoobAI-XL_Epsilon-pred.1.0-Version.safetensors\n",
"-------------------------------------------------------------------------------\n",
"\n",
"\u001b[35m[\u001b[0m#23908a 2.7GiB/6.4GiB\u001b[36m(42%)\u001b[0m CN:16 DL:\u001b[32m5.9MiB\u001b[0m ETA:\u001b[33m10m43s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mSD未启动3\n",
"\u001b[35m[\u001b[0m#23908a 2.7GiB/6.4GiB\u001b[36m(42%)\u001b[0m CN:16 DL:\u001b[32m5.6MiB\u001b[0m ETA:\u001b[33m11m13s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mSD未启动3\n",
"\u001b[35m[\u001b[0m#23908a 2.7GiB/6.4GiB\u001b[36m(43%)\u001b[0m CN:16 DL:\u001b[32m5.7MiB\u001b[0m ETA:\u001b[33m10m53s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mSD未启动3\n",
" *** Download Progress Summary as of Sun Nov 24 23:29:37 2024 *** m10m19s\u001b[0m\u001b[35m]\u001b[0m\u001b[0m\n",
"===============================================================================\n",
"[#23908a 2.8GiB/6.4GiB(43%) CN:16 DL:5.9MiB ETA:10m24s]\n",
"FILE: /tmp/code/sd/stable-diffusion-webui/models/Stable-diffusion/动漫-NoobAI-XL_Epsilon-pred.1.0-Version.safetensors\n",
"-------------------------------------------------------------------------------\n",
"\n",
"\u001b[35m[\u001b[0m#23908a 2.8GiB/6.4GiB\u001b[36m(43%)\u001b[0m CN:16 DL:\u001b[32m5.9MiB\u001b[0m ETA:\u001b[33m10m26s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mSD未启动3\n",
"\u001b[35m[\u001b[0m#23908a 2.8GiB/6.4GiB\u001b[36m(43%)\u001b[0m CN:16 DL:\u001b[32m5.7MiB\u001b[0m ETA:\u001b[33m10m51s\u001b[0m\u001b[35m]\u001b[0m\u001b[0m"
]
}
],
"source": [
"import time\n",
"from IPython.display import clear_output\n",
"import os\n",
"import threading\n",
"server_lock = threading.Lock()\n",
"def server():\n",
" while True:\n",
" with server_lock:\n",
" !mr -r /tmp/code/main.py\n",
" !wget -O /tmp/code/main.py 'https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/main.py'\n",
" !python /tmp/code/main.py\n",
" time.sleep(60)\n",
"\n",
"def clear_output_periodically():\n",
" while True:\n",
" clear_output()\n",
" time.sleep(600)\n",
"threading.Thread(target=server, daemon=True).start()\n",
"!rm /tmp/code/server.py\n",
"!wget -O /tmp/code/server.py https://hf-mirror.com/datasets/Qi28/SD_QZ/resolve/main/server.py\n",
"threading.Thread(target=clear_output_periodically, daemon=True).start()\n",
"!python /tmp/code/server.py"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "84d9ec6d-c37b-4f34-8b55-f5622c335dfd",
"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"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|