ginipick commited on
Commit
f90b620
β€’
1 Parent(s): 6f3a0c2

Upload 8 files

Browse files
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Lagon Technologies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README (3).md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Finegrain Object Cutter
3
+ emoji: βœ‚οΈ
4
+ colorFrom: indigo
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 4.42.0
8
+ app_file: src/app.py
9
+ pinned: false
10
+ license: mit
11
+ short_description: Create high-quality HD cutouts with just a text prompt
12
+ tags:
13
+ - refiners
14
+ ---
15
+
16
+ # Finegrain Object Cutter
17
+
18
+ ## Links
19
+
20
+ - https://github.com/finegrain-ai/refiners
21
+ - https://finegrain.ai/
gradio_image_annotation-0.2.3-py3-none-any.whl ADDED
Binary file (85.3 kB). View file
 
gradio_imageslider-0.0.20-py3-none-any.whl ADDED
Binary file (85.4 kB). View file
 
pyproject.toml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "cutter"
3
+ version = "0.1.0"
4
+ description = "Finegrain Object Cutter (Gradio)"
5
+ authors = [
6
+ { name = "Pierre Chapuis", email = "pierre@lagon.tech" }
7
+ ]
8
+ dependencies = [
9
+ "gradio>=4.42.0",
10
+ "gradio-image-annotation @ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_image_annotation-0.2.3-py3-none-any.whl",
11
+ "gradio-imageslider @ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_imageslider-0.0.20-py3-none-any.whl",
12
+ "pillow>=10.4.0",
13
+ "pillow-heif>=0.18.0",
14
+ "refiners @ git+https://github.com/finegrain-ai/refiners",
15
+ "numba>=0.60.0",
16
+ "pymatting>=1.1.12",
17
+ "transformers>=4.44.2",
18
+ "spaces>=0.29.3",
19
+ "numpy<2.0.0",
20
+ ]
21
+ readme = "README.md"
22
+ requires-python = ">= 3.12, <3.13"
23
+
24
+ [build-system]
25
+ requires = ["hatchling"]
26
+ build-backend = "hatchling.build"
27
+
28
+ [tool.rye]
29
+ managed = true
30
+ dev-dependencies = []
31
+
32
+ [tool.hatch.metadata]
33
+ allow-direct-references = true
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/cutter"]
37
+
38
+ [tool.ruff]
39
+ line-length = 120
40
+ target-version = "py312"
41
+
42
+ [tool.ruff.lint]
43
+ select = [
44
+ "E", # pycodestyle errors
45
+ "W", # pycodestyle warnings
46
+ "F", # pyflakes
47
+ "UP", # pyupgrade
48
+ "A", # flake8-builtins
49
+ "B", # flake8-bugbear
50
+ "Q", # flake8-quotes
51
+ "I", # isort
52
+ ]
53
+
54
+ [tool.pyright]
55
+ include = ["src"]
56
+ exclude = ["**/__pycache__"]
requirements (8).txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_image_annotation-0.2.3-py3-none-any.whl
2
+ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_imageslider-0.0.20-py3-none-any.whl
3
+ pillow>=10.4.0
4
+ pillow-heif>=0.18.0
5
+ git+https://github.com/finegrain-ai/refiners@7ca1774b5f8f172708db647a26c3be68858f285a
6
+ numba>=0.60.0
7
+ pymatting>=1.1.12
8
+ transformers>=4.44.2
9
+ spaces>=0.29.3
10
+ numpy<2.0.0
11
+
12
+ accelerate
13
+ diffusers==0.30.0
14
+ invisible_watermark
15
+ torch
16
+ xformers
17
+ sentencepiece
18
+ peft
requirements.lock ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # generated by rye
2
+ # use `rye lock` or `rye sync` to update this lockfile
3
+ #
4
+ # last locked with the following flags:
5
+ # pre: false
6
+ # features: []
7
+ # all-features: false
8
+ # with-sources: false
9
+ # generate-hashes: false
10
+ # universal: false
11
+
12
+ -e file:.
13
+ aiofiles==23.2.1
14
+ # via gradio
15
+ annotated-types==0.7.0
16
+ # via pydantic
17
+ anyio==4.4.0
18
+ # via gradio
19
+ # via httpx
20
+ # via starlette
21
+ build==1.2.1
22
+ # via gradio-imageslider
23
+ certifi==2024.8.30
24
+ # via httpcore
25
+ # via httpx
26
+ # via requests
27
+ charset-normalizer==3.3.2
28
+ # via requests
29
+ click==8.1.7
30
+ # via typer
31
+ # via uvicorn
32
+ contourpy==1.3.0
33
+ # via matplotlib
34
+ cycler==0.12.1
35
+ # via matplotlib
36
+ fastapi==0.112.2
37
+ # via gradio
38
+ ffmpy==0.4.0
39
+ # via gradio
40
+ filelock==3.15.4
41
+ # via huggingface-hub
42
+ # via torch
43
+ # via transformers
44
+ # via triton
45
+ fonttools==4.53.1
46
+ # via matplotlib
47
+ fsspec==2024.6.1
48
+ # via gradio-client
49
+ # via huggingface-hub
50
+ # via torch
51
+ gradio==4.42.0
52
+ # via cutter
53
+ # via gradio-image-annotation
54
+ # via gradio-imageslider
55
+ # via spaces
56
+ gradio-client==1.3.0
57
+ # via gradio
58
+ gradio-image-annotation @ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_image_annotation-0.2.3-py3-none-any.whl
59
+ # via cutter
60
+ gradio-imageslider @ https://huggingface.co/spaces/finegrain/finegrain-object-cutter/resolve/main/gradio_imageslider-0.0.20-py3-none-any.whl
61
+ # via cutter
62
+ h11==0.14.0
63
+ # via httpcore
64
+ # via uvicorn
65
+ httpcore==1.0.5
66
+ # via httpx
67
+ httpx==0.27.2
68
+ # via gradio
69
+ # via gradio-client
70
+ # via spaces
71
+ huggingface-hub==0.24.6
72
+ # via gradio
73
+ # via gradio-client
74
+ # via tokenizers
75
+ # via transformers
76
+ idna==3.8
77
+ # via anyio
78
+ # via httpx
79
+ # via requests
80
+ importlib-resources==6.4.4
81
+ # via gradio
82
+ jaxtyping==0.2.34
83
+ # via refiners
84
+ jinja2==3.1.4
85
+ # via gradio
86
+ # via torch
87
+ kiwisolver==1.4.5
88
+ # via matplotlib
89
+ llvmlite==0.43.0
90
+ # via numba
91
+ markdown-it-py==3.0.0
92
+ # via rich
93
+ markupsafe==2.1.5
94
+ # via gradio
95
+ # via jinja2
96
+ matplotlib==3.9.2
97
+ # via gradio
98
+ mdurl==0.1.2
99
+ # via markdown-it-py
100
+ mpmath==1.3.0
101
+ # via sympy
102
+ networkx==3.3
103
+ # via torch
104
+ numba==0.60.0
105
+ # via cutter
106
+ # via pymatting
107
+ numpy==1.26.4
108
+ # via contourpy
109
+ # via cutter
110
+ # via gradio
111
+ # via matplotlib
112
+ # via numba
113
+ # via pandas
114
+ # via pymatting
115
+ # via refiners
116
+ # via scipy
117
+ # via transformers
118
+ nvidia-cublas-cu12==12.1.3.1
119
+ # via nvidia-cudnn-cu12
120
+ # via nvidia-cusolver-cu12
121
+ # via torch
122
+ nvidia-cuda-cupti-cu12==12.1.105
123
+ # via torch
124
+ nvidia-cuda-nvrtc-cu12==12.1.105
125
+ # via torch
126
+ nvidia-cuda-runtime-cu12==12.1.105
127
+ # via torch
128
+ nvidia-cudnn-cu12==9.1.0.70
129
+ # via torch
130
+ nvidia-cufft-cu12==11.0.2.54
131
+ # via torch
132
+ nvidia-curand-cu12==10.3.2.106
133
+ # via torch
134
+ nvidia-cusolver-cu12==11.4.5.107
135
+ # via torch
136
+ nvidia-cusparse-cu12==12.1.0.106
137
+ # via nvidia-cusolver-cu12
138
+ # via torch
139
+ nvidia-nccl-cu12==2.20.5
140
+ # via torch
141
+ nvidia-nvjitlink-cu12==12.6.68
142
+ # via nvidia-cusolver-cu12
143
+ # via nvidia-cusparse-cu12
144
+ nvidia-nvtx-cu12==12.1.105
145
+ # via torch
146
+ orjson==3.10.7
147
+ # via gradio
148
+ packaging==24.1
149
+ # via build
150
+ # via gradio
151
+ # via gradio-client
152
+ # via huggingface-hub
153
+ # via matplotlib
154
+ # via refiners
155
+ # via spaces
156
+ # via transformers
157
+ pandas==2.2.2
158
+ # via gradio
159
+ pillow==10.4.0
160
+ # via cutter
161
+ # via gradio
162
+ # via gradio-imageslider
163
+ # via matplotlib
164
+ # via pillow-heif
165
+ # via pymatting
166
+ # via refiners
167
+ pillow-heif==0.18.0
168
+ # via cutter
169
+ psutil==5.9.8
170
+ # via spaces
171
+ pydantic==2.8.2
172
+ # via fastapi
173
+ # via gradio
174
+ # via spaces
175
+ pydantic-core==2.20.1
176
+ # via pydantic
177
+ pydub==0.25.1
178
+ # via gradio
179
+ pygments==2.18.0
180
+ # via rich
181
+ pymatting==1.1.12
182
+ # via cutter
183
+ pyparsing==3.1.4
184
+ # via matplotlib
185
+ pyproject-hooks==1.1.0
186
+ # via build
187
+ python-dateutil==2.9.0.post0
188
+ # via matplotlib
189
+ # via pandas
190
+ python-multipart==0.0.9
191
+ # via gradio
192
+ pytz==2024.1
193
+ # via pandas
194
+ pyyaml==6.0.2
195
+ # via gradio
196
+ # via huggingface-hub
197
+ # via transformers
198
+ refiners @ git+https://github.com/finegrain-ai/refiners@a8efe5eab0505886411b6a7abf4927d4be6fcc0b
199
+ # via cutter
200
+ regex==2024.7.24
201
+ # via transformers
202
+ requests==2.32.3
203
+ # via huggingface-hub
204
+ # via spaces
205
+ # via transformers
206
+ rich==13.8.0
207
+ # via typer
208
+ ruff==0.6.3
209
+ # via gradio
210
+ safetensors==0.4.4
211
+ # via refiners
212
+ # via transformers
213
+ scipy==1.14.1
214
+ # via pymatting
215
+ semantic-version==2.10.0
216
+ # via gradio
217
+ setuptools==74.1.0
218
+ # via torch
219
+ shellingham==1.5.4
220
+ # via typer
221
+ six==1.16.0
222
+ # via python-dateutil
223
+ sniffio==1.3.1
224
+ # via anyio
225
+ # via httpx
226
+ spaces==0.29.6
227
+ # via cutter
228
+ starlette==0.38.4
229
+ # via fastapi
230
+ sympy==1.13.2
231
+ # via torch
232
+ tokenizers==0.19.1
233
+ # via transformers
234
+ tomlkit==0.12.0
235
+ # via gradio
236
+ torch==2.4.0
237
+ # via refiners
238
+ tqdm==4.66.5
239
+ # via huggingface-hub
240
+ # via transformers
241
+ transformers==4.44.2
242
+ # via cutter
243
+ triton==3.0.0
244
+ # via torch
245
+ typeguard==2.13.3
246
+ # via jaxtyping
247
+ typer==0.12.5
248
+ # via gradio
249
+ typing-extensions==4.12.2
250
+ # via fastapi
251
+ # via gradio
252
+ # via gradio-client
253
+ # via huggingface-hub
254
+ # via pydantic
255
+ # via pydantic-core
256
+ # via spaces
257
+ # via torch
258
+ # via typer
259
+ tzdata==2024.1
260
+ # via pandas
261
+ urllib3==2.2.2
262
+ # via gradio
263
+ # via requests
264
+ uvicorn==0.30.6
265
+ # via gradio
266
+ websockets==12.0
267
+ # via gradio-client
text.jpg ADDED