ACCA225 commited on
Commit
cbc8ea8
·
verified ·
1 Parent(s): aece1d9

Upload 2 files

Browse files
Files changed (2) hide show
  1. sd.sh +9 -0
  2. tunnel.ipynb +57 -0
sd.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ cd /root
2
+ aria2c -x 16 -s 16 -c -k 1M https://huggingface.co/datasets/ACCC1380/private-model/resolve/9befd0d6f2fa6cae98ded19011dde41423943611/upload/sd.tar -o sd.tar
3
+ tar -xvf sd.tar
4
+ cd /root/stable-diffusion-webui/models/Stable-diffusion && aria2c -x 16 -s 16 -c -k 1M "https://civitai.com/api/download/models/2031265?type=Model&format=SafeTensor&size=full&fp=fp16" -o Compilative_G_model.safetensors
5
+
6
+ cd /root/stable-diffusion-webui/models/Lora && aria2c -x 16 -s 16 -c -k 1M "https://huggingface.co/xssxsxk/cunnyfunky-style/resolve/main/cunnyfunky3.2-000082.safetensors?download=true" -o cunnyfunky3.2-000082.safetensors
7
+ cd /root/stable-diffusion-webui/
8
+ /root/stable-diffusion-webui/venv/bin/python launch.py --xformers --api --listen
9
+
tunnel.ipynb ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "bea26831-aace-41ec-b150-ce950c88490a",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "name": "stdout",
11
+ "output_type": "stream",
12
+ "text": [
13
+ "http://r435.modal.host:34797\n"
14
+ ]
15
+ }
16
+ ],
17
+ "source": [
18
+ "import modal\n",
19
+ "import os\n",
20
+ "import time\n",
21
+ "local_port = 7860\n",
22
+ "with modal.forward(local_port, unencrypted=True) as tunnel:\n",
23
+ " hostname, remote_port = tunnel.tcp_socket\n",
24
+ " url = f\"http://{hostname}:{remote_port}\"\n",
25
+ " print(url)\n",
26
+ " \n",
27
+ " # 保持连接\n",
28
+ " try:\n",
29
+ " while True:\n",
30
+ " time.sleep(1)\n",
31
+ " except KeyboardInterrupt:\n",
32
+ " pass"
33
+ ]
34
+ }
35
+ ],
36
+ "metadata": {
37
+ "kernelspec": {
38
+ "display_name": "Python 3 (ipykernel)",
39
+ "language": "python",
40
+ "name": "python3"
41
+ },
42
+ "language_info": {
43
+ "codemirror_mode": {
44
+ "name": "ipython",
45
+ "version": 3
46
+ },
47
+ "file_extension": ".py",
48
+ "mimetype": "text/x-python",
49
+ "name": "python",
50
+ "nbconvert_exporter": "python",
51
+ "pygments_lexer": "ipython3",
52
+ "version": "3.10.15"
53
+ }
54
+ },
55
+ "nbformat": 4,
56
+ "nbformat_minor": 5
57
+ }