Skip to content

Commit f2109d0

Browse files
authored
Add files via upload
1 parent f4c58eb commit f2109d0

File tree

1 file changed

+149
-0
lines changed

1 file changed

+149
-0
lines changed

Roop_Unleashed4.2.5.ipynb

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"provenance": [],
7+
"gpuType": "T4",
8+
"collapsed_sections": [
9+
"UdQ1VHdI8lCf"
10+
]
11+
},
12+
"kernelspec": {
13+
"name": "python3",
14+
"display_name": "Python 3"
15+
},
16+
"language_info": {
17+
"name": "python"
18+
},
19+
"accelerator": "GPU"
20+
},
21+
"cells": [
22+
{
23+
"cell_type": "markdown",
24+
"source": [
25+
"Install CUDA V11.8 on Google Cloud Compute"
26+
],
27+
"metadata": {
28+
"id": "CanIXgLJgaOj"
29+
}
30+
},
31+
{
32+
"cell_type": "code",
33+
"source": [
34+
"!apt-get update\n",
35+
"!apt-get install cuda-toolkit-11-8\n",
36+
"import os\n",
37+
"os.environ[\"LD_LIBRARY_PATH\"] += \":\" + \"/usr/local/cuda-11/lib64\"\n",
38+
"os.environ[\"LD_LIBRARY_PATH\"] += \":\" + \"/usr/local/cuda-11.8/lib64\""
39+
],
40+
"metadata": {
41+
"id": "96GE4UgYg3Ej"
42+
},
43+
"execution_count": null,
44+
"outputs": []
45+
},
46+
{
47+
"cell_type": "markdown",
48+
"source": [
49+
"Installing & preparing requirements"
50+
],
51+
"metadata": {
52+
"id": "0ZYRNb0AWLLW"
53+
}
54+
},
55+
{
56+
"cell_type": "code",
57+
"source": [
58+
"import codecs\n",
59+
"\n",
60+
"giturl = codecs.decode('uggcf://tvguho.pbz/P0hagSyblq/ebbc-hayrnfurq.tvg','rot_13')\n",
61+
"gitdir = codecs.decode('ebbc-hayrnfurq','rot_13')\n",
62+
"\n",
63+
"!git clone {giturl}\n",
64+
"%cd /content/{gitdir}\n",
65+
"!mv config_colab.yaml config.yaml\n",
66+
"!pip install -r requirements.txt\n"
67+
],
68+
"metadata": {
69+
"id": "jtxXFUoC3orX"
70+
},
71+
"execution_count": null,
72+
"outputs": []
73+
},
74+
{
75+
"cell_type": "markdown",
76+
"source": [
77+
":Running roop-unleashed with Gradio"
78+
],
79+
"metadata": {
80+
"id": "u_4JQiSlV9Fi"
81+
}
82+
},
83+
{
84+
"cell_type": "code",
85+
"source": [
86+
"!python run.py"
87+
],
88+
"metadata": {
89+
"id": "ORmiFOwL3tDu"
90+
},
91+
"execution_count": null,
92+
"outputs": []
93+
},
94+
{
95+
"cell_type": "markdown",
96+
"source": [],
97+
"metadata": {
98+
"id": "MrcoL5Qzqkee"
99+
}
100+
},
101+
{
102+
"cell_type": "markdown",
103+
"source": [
104+
"# Run With Local Tunnel"
105+
],
106+
"metadata": {
107+
"id": "OWt8tq7CqRO_"
108+
}
109+
},
110+
{
111+
"cell_type": "code",
112+
"source": [
113+
"\n",
114+
"!npm install -g localtunnel\n",
115+
"!pip install colorama\n",
116+
"import subprocess\n",
117+
"import threading\n",
118+
"import time\n",
119+
"import socket\n",
120+
"import urllib.request\n",
121+
"def iframe_thread(port):\n",
122+
" while True:\n",
123+
" time.sleep(0.5)\n",
124+
" sock= socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
125+
" result = sock.connect_ex(('127.0.0.1', port))\n",
126+
" if result == 0:\n",
127+
" break\n",
128+
" sock.close()\n",
129+
"\n",
130+
" from colorama import Fore, Style\n",
131+
" print (Fore.GREEN + \"\\nIP: \", Fore. RED, urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"), \"\\n\", Style. RESET_ALL)\n",
132+
" p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n",
133+
" for line in p.stdout:\n",
134+
" print(line.decode(), end='')\n",
135+
"threading.Thread (target=iframe_thread, daemon=True, args=(7860,)).start()\n",
136+
"\n",
137+
"\n",
138+
"\n",
139+
"\n",
140+
"!python run.py"
141+
],
142+
"metadata": {
143+
"id": "cGqQtGUPp6-3"
144+
},
145+
"execution_count": null,
146+
"outputs": []
147+
}
148+
]
149+
}

0 commit comments

Comments
 (0)