root
commited on
Commit
•
968d2c9
1
Parent(s):
abe7733
Update to 1.5 and update gradio also
Browse files- README.md +1 -1
- app.py +3 -3
- hacks.sh → hacks/pip-install.sh +0 -0
- hacks/pipenv-install.sh +1 -0
- requirements.txt +16 -156
- test.ipynb +49 -6
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🎼
|
|
4 |
colorFrom: green
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
python_version: 3.9
|
9 |
app_file: app.py
|
10 |
pinned: false
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.11
|
8 |
python_version: 3.9
|
9 |
app_file: app.py
|
10 |
pinned: false
|
app.py
CHANGED
@@ -115,8 +115,8 @@ def animate_images(
|
|
115 |
|
116 |
|
117 |
def get_stable_diffusion_images(prompt) -> str:
|
118 |
-
stable_diffusion = gr.Blocks.load(name="spaces/
|
119 |
-
gallery_dir = stable_diffusion(prompt, fn_index=
|
120 |
return [os.path.join(gallery_dir, img) for img in os.listdir(gallery_dir)][:2]
|
121 |
|
122 |
|
@@ -149,4 +149,4 @@ if __name__ == "__main__":
|
|
149 |
os.chdir(
|
150 |
output_dir
|
151 |
) # change working directory to output_dir because the hf spaces model has no option to specify output directory ¯\_(ツ)_/¯
|
152 |
-
iface.launch()
|
|
|
115 |
|
116 |
|
117 |
def get_stable_diffusion_images(prompt) -> str:
|
118 |
+
stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
|
119 |
+
gallery_dir = stable_diffusion(prompt, fn_index=1)
|
120 |
return [os.path.join(gallery_dir, img) for img in os.listdir(gallery_dir)][:2]
|
121 |
|
122 |
|
|
|
149 |
os.chdir(
|
150 |
output_dir
|
151 |
) # change working directory to output_dir because the hf spaces model has no option to specify output directory ¯\_(ツ)_/¯
|
152 |
+
iface.launch(share=True)
|
hacks.sh → hacks/pip-install.sh
RENAMED
File without changes
|
hacks/pipenv-install.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pipenv run sh ./hacks/pip-install.sh
|
requirements.txt
CHANGED
@@ -1,160 +1,20 @@
|
|
|
|
|
|
|
|
|
|
1 |
absl-py==0.12.0
|
2 |
-
aiohttp==3.8.3
|
3 |
-
aiosignal==1.3.1
|
4 |
-
anyio==3.6.2
|
5 |
-
apache-beam==2.34.0
|
6 |
-
asttokens==2.1.0
|
7 |
-
astunparse==1.6.3
|
8 |
-
async-timeout==4.0.2
|
9 |
-
attrs==22.1.0
|
10 |
-
avro-python3==1.9.2.1
|
11 |
-
backcall==0.2.0
|
12 |
-
bcrypt==4.0.1
|
13 |
-
beautifulsoup4==4.11.1
|
14 |
-
cachetools==4.2.4
|
15 |
-
certifi==2022.9.24
|
16 |
-
cffi==1.15.1
|
17 |
-
charset-normalizer==2.1.1
|
18 |
-
clang==5.0
|
19 |
-
click==8.1.3
|
20 |
-
contourpy==1.0.6
|
21 |
-
crcmod==1.7
|
22 |
-
cryptography==38.0.3
|
23 |
-
cycler==0.11.0
|
24 |
-
decorator==4.4.2
|
25 |
-
defusedxml==0.7.1
|
26 |
-
dill==0.3.1.1
|
27 |
-
docopt==0.6.2
|
28 |
-
executing==1.2.0
|
29 |
-
fastapi==0.74.1
|
30 |
-
fastavro==1.7.0
|
31 |
-
ffmpeg-python==0.2.0
|
32 |
-
ffmpy==0.3.0
|
33 |
-
filelock==3.8.0
|
34 |
-
flatbuffers==1.12
|
35 |
-
fonttools==4.38.0
|
36 |
-
frozenlist==1.3.3
|
37 |
-
fsspec==2022.11.0
|
38 |
-
future==0.18.2
|
39 |
-
gast==0.4.0
|
40 |
gin-config==0.5.0
|
41 |
-
google-api-core==1.33.1
|
42 |
-
google-auth==1.35.0
|
43 |
-
google-auth-oauthlib==0.4.6
|
44 |
-
google-cloud-bigquery-storage==1.1.0
|
45 |
-
google-pasta==0.2.0
|
46 |
-
googleapis-common-protos==1.56.4
|
47 |
-
gradio==3.4.0
|
48 |
-
grpcio==1.50.0
|
49 |
-
grpcio-status==1.48.2
|
50 |
-
h11==0.12.0
|
51 |
-
h5py==3.1.0
|
52 |
-
hdfs==2.7.0
|
53 |
-
httpcore==0.15.0
|
54 |
-
httplib2==0.19.1
|
55 |
-
httpx==0.23.1
|
56 |
-
huggingface-hub==0.11.0
|
57 |
-
idna==3.4
|
58 |
-
ifaddr==0.2.0
|
59 |
-
image-tools==1.0.0
|
60 |
-
imageio==2.22.4
|
61 |
-
imageio-ffmpeg==0.4.7
|
62 |
-
importlib-metadata==5.1.0
|
63 |
-
ipython==8.6.0
|
64 |
-
jedi==0.18.2
|
65 |
-
Jinja2==3.1.2
|
66 |
-
keras==2.6.0
|
67 |
-
Keras-Preprocessing==1.1.2
|
68 |
-
kiwisolver==1.4.4
|
69 |
-
librespot==0.0.7
|
70 |
-
linkify-it-py==1.0.3
|
71 |
-
Markdown==3.4.1
|
72 |
-
markdown-it-py==2.1.0
|
73 |
-
MarkupSafe==2.1.1
|
74 |
-
matplotlib==3.6.2
|
75 |
-
matplotlib-inline==0.1.6
|
76 |
-
mdit-py-plugins==0.3.1
|
77 |
-
mdurl==0.1.2
|
78 |
-
mediapy==1.0.3
|
79 |
-
moviepy==1.0.3
|
80 |
-
multidict==6.0.2
|
81 |
-
natsort==8.1.0
|
82 |
-
networkx==2.8.8
|
83 |
-
numpy==1.19.5
|
84 |
-
oauth2client==4.1.3
|
85 |
-
oauthlib==3.2.2
|
86 |
-
opencv-python==4.6.0.66
|
87 |
-
opt-einsum==3.3.0
|
88 |
-
orjson==3.8.2
|
89 |
-
packaging==21.3
|
90 |
-
pandas==1.4.4
|
91 |
parameterized==0.8.1
|
92 |
-
|
93 |
-
parso==0.8.3
|
94 |
-
pexpect==4.8.0
|
95 |
-
pickleshare==0.7.5
|
96 |
-
Pillow==9.3.0
|
97 |
-
podiant-opengraph==0.1.0
|
98 |
-
proglog==0.1.10
|
99 |
-
promise==2.3
|
100 |
-
prompt-toolkit==3.0.33
|
101 |
-
protobuf==3.20.1
|
102 |
-
ptyprocess==0.7.0
|
103 |
-
pure-eval==0.2.2
|
104 |
-
pyarrow==5.0.0
|
105 |
-
pyasn1==0.4.8
|
106 |
-
pyasn1-modules==0.2.8
|
107 |
-
pybase62==0.5.0
|
108 |
-
pycparser==2.21
|
109 |
-
pycryptodome==3.15.0
|
110 |
-
pycryptodomex==3.15.0
|
111 |
-
pydantic==1.9.2
|
112 |
-
pydot==1.4.2
|
113 |
-
pydub==0.25.1
|
114 |
-
Pygments==2.13.0
|
115 |
-
pymongo==3.13.0
|
116 |
-
PyNaCl==1.5.0
|
117 |
-
PyOgg==0.6.14a1
|
118 |
-
pyparsing==2.4.7
|
119 |
-
python-dateutil==2.8.2
|
120 |
-
python-multipart==0.0.5
|
121 |
-
pytz==2022.6
|
122 |
-
PyWavelets==1.4.1
|
123 |
-
PyYAML==6.0
|
124 |
-
requests==2.28.1
|
125 |
-
requests-oauthlib==1.3.1
|
126 |
-
rfc3986==1.5.0
|
127 |
-
rsa==4.9
|
128 |
scikit-image==0.19.1
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
tensorflow-addons==0.15.0
|
141 |
-
tensorflow-datasets==4.4.0
|
142 |
-
tensorflow-estimator==2.6.0
|
143 |
-
tensorflow-metadata==1.11.0
|
144 |
-
termcolor==1.1.0
|
145 |
-
tifffile==2022.10.10
|
146 |
-
tqdm==4.64.1
|
147 |
-
traitlets==5.5.0
|
148 |
-
typeguard==2.13.3
|
149 |
-
typing-extensions==3.7.4.3
|
150 |
-
uc-micro-py==1.0.1
|
151 |
-
urllib3==1.26.13
|
152 |
-
uvicorn==0.20.0
|
153 |
-
wcwidth==0.2.5
|
154 |
-
websocket-client==1.4.2
|
155 |
-
websockets==10.4
|
156 |
-
Werkzeug==2.2.2
|
157 |
-
wrapt==1.12.1
|
158 |
-
yarl==1.8.1
|
159 |
-
zeroconf==0.39.4
|
160 |
-
zipp==3.10.0
|
|
|
1 |
+
# frame_interpolation dependencies
|
2 |
+
tensorflow==2.6.2 # The latest should include tensorflow-gpu
|
3 |
+
tensorflow-datasets==4.4.0
|
4 |
+
tensorflow-addons==0.15.0
|
5 |
absl-py==0.12.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
gin-config==0.5.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
parameterized==0.8.1
|
8 |
+
mediapy==1.0.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
scikit-image==0.19.1
|
10 |
+
apache-beam==2.34.0
|
11 |
+
google-cloud-bigquery-storage==1.1.0 # Suppresses a harmless error from beam
|
12 |
+
natsort==8.1.0
|
13 |
+
|
14 |
+
gradio==3.11.0 # This is also because of reasons
|
15 |
+
spodcast
|
16 |
+
moviepy
|
17 |
+
huggingface-hub
|
18 |
+
opencv-python
|
19 |
+
image_tools
|
20 |
+
podiant-opengraph
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test.ipynb
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"id": "9f0e1e4b-e36a-4dfe-adfd-6f99fb1d39f6",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
@@ -14,6 +14,49 @@
|
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": 2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
"id": "778fa4aa-cc12-4c33-a866-47ddcedcaf5f",
|
18 |
"metadata": {},
|
19 |
"outputs": [
|
@@ -38,7 +81,7 @@
|
|
38 |
},
|
39 |
{
|
40 |
"cell_type": "code",
|
41 |
-
"execution_count":
|
42 |
"id": "237e3903",
|
43 |
"metadata": {},
|
44 |
"outputs": [
|
@@ -61,7 +104,7 @@
|
|
61 |
},
|
62 |
{
|
63 |
"cell_type": "code",
|
64 |
-
"execution_count":
|
65 |
"id": "de461d9b-bfbb-4d2d-b35e-fc3889494991",
|
66 |
"metadata": {},
|
67 |
"outputs": [],
|
@@ -75,7 +118,7 @@
|
|
75 |
},
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
-
"execution_count":
|
79 |
"id": "99df13fd-bd5d-4964-9300-016fcf7625e6",
|
80 |
"metadata": {},
|
81 |
"outputs": [],
|
@@ -91,7 +134,7 @@
|
|
91 |
],
|
92 |
"metadata": {
|
93 |
"kernelspec": {
|
94 |
-
"display_name": "Python 3.9.
|
95 |
"language": "python",
|
96 |
"name": "python3"
|
97 |
},
|
@@ -109,7 +152,7 @@
|
|
109 |
},
|
110 |
"vscode": {
|
111 |
"interpreter": {
|
112 |
-
"hash": "
|
113 |
}
|
114 |
}
|
115 |
},
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": null,
|
6 |
"id": "9f0e1e4b-e36a-4dfe-adfd-6f99fb1d39f6",
|
7 |
"metadata": {},
|
8 |
"outputs": [],
|
|
|
14 |
{
|
15 |
"cell_type": "code",
|
16 |
"execution_count": 2,
|
17 |
+
"id": "98b2afd2",
|
18 |
+
"metadata": {},
|
19 |
+
"outputs": [
|
20 |
+
{
|
21 |
+
"name": "stdout",
|
22 |
+
"output_type": "stream",
|
23 |
+
"text": [
|
24 |
+
"Fetching Space from: https://huggingface.co/spaces/runwayml/stable-diffusion-v1-5\n",
|
25 |
+
"Gradio Blocks instance: 3 backend functions\n",
|
26 |
+
"-------------------------------------------\n",
|
27 |
+
"fn_index=0\n",
|
28 |
+
" inputs:\n",
|
29 |
+
" |-dataset\n",
|
30 |
+
" outputs:\n",
|
31 |
+
" |-textbox\n",
|
32 |
+
" |-gallery\n",
|
33 |
+
"fn_index=1\n",
|
34 |
+
" inputs:\n",
|
35 |
+
" |-textbox\n",
|
36 |
+
" outputs:\n",
|
37 |
+
" |-gallery\n",
|
38 |
+
"fn_index=2\n",
|
39 |
+
" inputs:\n",
|
40 |
+
" |-textbox\n",
|
41 |
+
" outputs:\n",
|
42 |
+
" |-gallery\n"
|
43 |
+
]
|
44 |
+
}
|
45 |
+
],
|
46 |
+
"source": [
|
47 |
+
"\n",
|
48 |
+
"import gradio as gr\n",
|
49 |
+
"stable_diffusion = gr.Blocks.load(name=\"spaces/runwayml/stable-diffusion-v1-5\")\n",
|
50 |
+
"gallery_dir = stable_diffusion(\"hi\", fn_index=0)\n",
|
51 |
+
"\n",
|
52 |
+
"print(stable_diffusion)\n",
|
53 |
+
"\n",
|
54 |
+
"\n"
|
55 |
+
]
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"cell_type": "code",
|
59 |
+
"execution_count": null,
|
60 |
"id": "778fa4aa-cc12-4c33-a866-47ddcedcaf5f",
|
61 |
"metadata": {},
|
62 |
"outputs": [
|
|
|
81 |
},
|
82 |
{
|
83 |
"cell_type": "code",
|
84 |
+
"execution_count": null,
|
85 |
"id": "237e3903",
|
86 |
"metadata": {},
|
87 |
"outputs": [
|
|
|
104 |
},
|
105 |
{
|
106 |
"cell_type": "code",
|
107 |
+
"execution_count": null,
|
108 |
"id": "de461d9b-bfbb-4d2d-b35e-fc3889494991",
|
109 |
"metadata": {},
|
110 |
"outputs": [],
|
|
|
118 |
},
|
119 |
{
|
120 |
"cell_type": "code",
|
121 |
+
"execution_count": null,
|
122 |
"id": "99df13fd-bd5d-4964-9300-016fcf7625e6",
|
123 |
"metadata": {},
|
124 |
"outputs": [],
|
|
|
134 |
],
|
135 |
"metadata": {
|
136 |
"kernelspec": {
|
137 |
+
"display_name": "Python 3.9.13 ('stablepod-9sY-ATvg')",
|
138 |
"language": "python",
|
139 |
"name": "python3"
|
140 |
},
|
|
|
152 |
},
|
153 |
"vscode": {
|
154 |
"interpreter": {
|
155 |
+
"hash": "da5cbbacbb5b0f4f981824ef371d6caff76d7da138a6d755a2c960f48ddcd478"
|
156 |
}
|
157 |
}
|
158 |
},
|