Diffusers
EVA787797 commited on
Commit
e5930e3
1 Parent(s): a416b36

Upload 8 files

Browse files
CHANGELOG.md ADDED
@@ -0,0 +1,481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ ## 2024-09-02
4
+
5
+ - v24.9.0
6
+ - Dynamic Denoising, Inpaint bbox sizing 기능 (PR #678)
7
+ - `ad_save_images_dir` 옵션 추가 - ad 이미지를 저장하는 장소 지정 (PR #689)
8
+
9
+ - forge와 관련된 버그 몇 개 수정
10
+ - pydantic validation에 실패해도 에러를 일으키지 않고 넘어가도록 수정
11
+
12
+ ## 2024-08-03
13
+
14
+ - v24.8.0
15
+ - 샘플러 선택칸에 Use same sampler 옵션 추가
16
+ - 컨트롤넷 유니온 모델을 선택할 수 있게 함
17
+
18
+ - webui 1.9.0이상에서 기본 스케줄러가 설정되지 않던 문제 수정
19
+ - issus #656의 문제 해결을 위해 v24.4.0에 적용되었던 프롬프트 표시 기능을 되돌림
20
+ - mediapipe에서 에러가 발생하면 추론이 실패한 것으로 처리하고 조용히 넘어감
21
+
22
+ ## 2024-06-16
23
+
24
+ - v24.6.0
25
+ - webui 1.6.0 미만 버전을 위한 기능들을 제거하고, 최소 버전을 1.6.0으로 올림
26
+ - 허깅페이스 연결을 체크하는데 1초만 소요되도록 함
27
+ - 허깅페이스 미러 (hf-mirror.com)도 체크함 (합쳐서 2초)
28
+ - InputAccordion을 적용함
29
+
30
+ ## 2024-05-20
31
+
32
+ - v24.5.1
33
+ - uv를 사용하지 않게 함
34
+ - 모든 허깅페이스 모델을 동시에 다운로드 시도함
35
+ - 기본 탭 수를 2에서 4로 변경
36
+
37
+ ## 2024-05-19
38
+
39
+ - v24.5.0
40
+ - 개별 탭 활성화/비활성화 체크박스 추가
41
+ - ad_extra_model_dir 옵션에 |로 구분된 여러 디렉토리를 추가할 수 있게 함 (PR #596)
42
+ - `hypertile` 빌트인 확장이 지원되도록 함
43
+ - 항상 cond 캐시를 비움
44
+ - 설치 스크립트에 uv를 사용함
45
+ - mediapipe 최소 버전을 올려 protobuf 버전 4를 사용하게 함
46
+
47
+ ## 2024-04-17
48
+
49
+ - v24.4.2
50
+ - `params.txt` 파일이 없을 때 에러가 발생하지 않도록 수정
51
+ - 파이썬 3.9 이하에서 유니온 타입 에러 방지
52
+
53
+ ## 2024-04-14
54
+
55
+ - v24.4.1
56
+ - webui 1.9.0에서 발생한 에러 수정
57
+ - extra generation params에 callable이 들어와서 생긴 문제
58
+ - assign_current_image에 None이 들어갈 수 있던 문제
59
+ - webui 1.9.0에서 변경된 scheduler 지원
60
+ - 컨트롤넷 모델을 찾을 때, 대소문자 구분을 하지 않음 (PR #577)
61
+ - 몇몇 기능을 스크립트에서 분리하여 별도 파일로 빼냄
62
+
63
+ ## 2024-04-10
64
+
65
+ - v24.4.0
66
+ - txt2img에서 hires를 설정했을 때, 이미지의 exif에서 Denoising Strength가 adetailer의 denoisiog stregnth로 덮어 쓰이는 문제 수정
67
+ - ad prompt, ad negative prompt에 프롬프트를 변경하는 기능을 적용했을 때(와일드카드 등), 적용된 프롬프트가 이미지의 exif에 제대로 표시됨
68
+
69
+ ## 2024-03-29
70
+
71
+ - v24.3.5
72
+ - 알 수 없는 이유로 인페인팅을 확인하는 과정에서 Txt2Img 인스턴스가 들어오는 문제에 대한 임시 해결
73
+
74
+ ## 2024-03-28
75
+
76
+ - v24.3.4
77
+ - 인페인트에서, 이미지 해상도가 16의 배수가 아닐 때 사이즈 불일치로 인한 opencv 에러 방지
78
+
79
+ ## 2024-03-25
80
+
81
+ - v24.3.3
82
+ - webui 1.6.0 미만 버전에서 create_binary_mask 함수에 대해 ImportError가 발생하는 것 수정
83
+
84
+ ## 2024-03-21
85
+
86
+ - v24.3.2
87
+ - UI를 거치지 않은 입력에 대해, image_mask를 입력했을 때 opencv 에러가 발생하는 것 수정
88
+ - img2img inpaint에서 skip img2img 옵션을 활성화할 경우, adetailer를 비활성화함
89
+ - 마스크 크기에 대해 해결하기 힘든 문제가 있음
90
+
91
+ ## 2024-03-16
92
+
93
+ - v24.3.1
94
+ - YOLO World v2, YOLO9 지원가능한 버전으로 ultralytics 업데이트
95
+ - inpaint full res인 경우 인페인트 모드에서 동작하게 변경
96
+ - inpaint full res가 아닌 경우, 사용자가 입력한 마스크와 교차점이 있는 마스크만 선택하여 사용함
97
+
98
+ ## 2024-03-01
99
+
100
+ - v24.3.0
101
+ - YOLO World 모델 추가: 가장 큰 yolov8x-world.pt 모델만 기본적으로 선택할 수 있게 함.
102
+ - lllyasviel/stable-diffusion-webui-forge에서 컨트롤넷을 사용가능하게 함 (PR #517)
103
+ - 기본 스크립트 목록에 soft_inpainting 추가 (https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14208)
104
+
105
+ - 기존에 설치한 사람에게 소급적용되지는 않음
106
+
107
+ - 감지모델에 대한 간단한 pytest 추가함
108
+ - xyz grid 컨트롤넷 모델 옵션에 `Passthrough` 추가함
109
+
110
+ ## 2024-01-23
111
+
112
+ - v24.1.2
113
+ - controlnet 모델에 `Passthrough` 옵션 추가. 입력으로 들어온 컨트롤넷 옵션을 그대로 사용
114
+ - fastapi 엔드포인트 추가
115
+
116
+ ## 2024-01-10
117
+
118
+ - v24.1.1
119
+ - SDNext 호환 업데이트 (issue #466)
120
+ - 설정 값 state에 초기값 추가
121
+ - 위젯 값을 변경할 때마다 state도 변경되게 함 (기존에는 생성 버튼을 누를 때 적용되었음)
122
+ - `inpaint_depth_hand` 컨트롤넷 모델이 depth 모델로 인식되게 함 (issue #463)
123
+
124
+ ## 2024-01-04
125
+
126
+ - v24.1.0
127
+ - `depth_hand_refiner` ControlNet 추가 (PR #460)
128
+
129
+ ## 2023-12-30
130
+
131
+ - v23.12.0
132
+ - 파일을 인자로 추가하는 몇몇 스크립트에 대해 deepcopy의 에러를 피하기 위해 script_args 복사 방법을 변경함
133
+ - skip img2img 기능을 사용할 때 너비, 높이를 128로 고정하여 스킵 과정이 조금 더 나아짐
134
+ - img2img inpainting 모드에서 adetailer 자동 비활성화
135
+ - 처음 생성된 params.txt 파일을 항상 유지하도록 변경함
136
+
137
+ ## 2023-11-19
138
+
139
+ - v23.11.1
140
+ - 기본 스크립트 목록에 negpip 추가
141
+ - 기존에 설치한 사람에게 소급적용되지는 않음
142
+ - skip img2img 옵션이 2스텝 이상일 때, 제대로 적용되지 않는 문제 수정
143
+ - SD.Next에서 이미지가 np.ndarray로 입력되는 경우 수정
144
+ - 컨트롤넷 경로를 sys.path에 추가하여 --data-dir등을 지정한 경우에도 임포트 에러가 일어나지 않게 함.
145
+
146
+ ## 2023-10-30
147
+
148
+ - v23.11.0
149
+ - 이미지의 인덱스 계산방법 변경
150
+ - webui 1.1.0 미만에서 adetailer 실행 불가능하게 함
151
+ - 컨트롤넷 preprocessor 선택지 늘림
152
+ - 추가 yolo 모델 디렉터리를 설정할 수 있는 옵션 추가
153
+ - infotext에 `/`가 있는 항목이 exif에서 복원되지 않는 문제 수정
154
+ - 이전 버전에 생성된 이미지는 여전히 복원안됨
155
+ - 같은 탭에서 항상 같은 시드를 적용하게 하는 옵션 추가
156
+ - 컨트롤넷 1.1.411 (f2aafcf2beb99a03cbdf7db73852228ccd6bd1d6) 버전을 사용중일 경우,
157
+ webui 버전 1.6.0 미만에서 사용할 수 없다는 메세지 출력
158
+
159
+ ## 2023-10-15
160
+
161
+ - v23.10.1
162
+ - xyz grid에 prompt S/R 추가
163
+ - img2img에서 steps가 1일때 에러가 발생하는 샘플러의 처리를 위해 샘플러 이름도 변경하게 수정
164
+
165
+ ## 2023-10-07
166
+
167
+ - v23.10.0
168
+ - 허깅페이스 모델을 다운로드 실패했을 때, 계속 다운로드를 시도하지 않음
169
+ - img2img에서 img2img단계를 건너뛰는 기능 추가
170
+ - live preview에서 감지 단계를 보여줌 (PR #352)
171
+
172
+ ## 2023-09-20
173
+
174
+ - v23.9.3
175
+ - ultralytics 버전 8.0.181로 업데이트 (https://github.com/ultralytics/ultralytics/pull/4891)
176
+ - mediapipe와 ultralytics의 lazy import
177
+
178
+ ## 2023-09-10
179
+
180
+ - v23.9.2
181
+ - (실험적) VAE 선택 기능
182
+
183
+ ## 2023-09-01
184
+
185
+ - v23.9.1
186
+ - webui 1.6.0에 추가된 인자를 사용해서 생긴 하위 호환 문제 수정
187
+
188
+ ## 2023-08-31
189
+
190
+ - v23.9.0
191
+ - (실험적) 체크포인트 선택기능
192
+ - 버그가 있어 리프레시 버튼은 구현에서 빠짐
193
+ - 1.6.0 업데이트에 따라 img2img에서 사용불가능한 샘플러를 선택했을 때 더이상 Euler로 변경하지 않음
194
+ - 유효하지 않은 인자가 전달되었을 때, 에러를 일으키지 않고 대신 adetailer를 비활성화함
195
+
196
+ ## 2023-08-25
197
+
198
+ - v23.8.1
199
+ - xyz grid에서 model을 `None`으로 설정한 이후에 adetailer가 비활성화 되는 문제 수정
200
+ - skip을 눌렀을 때 진행을 멈춤
201
+ - `--medvram-sdxl`을 설정했을 때에도 cpu를 사용하게 함
202
+
203
+ ## 2023-08-14
204
+
205
+ - v23.8.0
206
+ - `[PROMPT]` 키워드 추가. `ad_prompt` 또는 `ad_negative_prompt`에 사용하면 입력 프롬프트로 대체됨 (PR #243)
207
+ - Only top k largest 옵션 추가 (PR #264)
208
+ - ultralytics 버전 업데이트
209
+
210
+ ## 2023-07-31
211
+
212
+ - v23.7.11
213
+ - separate clip skip 옵션 추가
214
+ - install requirements 정리 (ultralytics 새 버전, mediapipe~=3.20)
215
+
216
+ ## 2023-07-28
217
+
218
+ - v23.7.10
219
+ - ultralytics, mediapipe import문 정리
220
+ - traceback에서 컬러를 없앰 (api 때문), 라이브러리 버전도 보여주게 설정.
221
+ - huggingface_hub, pydantic을 install.py에서 없앰
222
+ - 안쓰는 컨트롤넷 관련 코드 삭제
223
+
224
+ ## 2023-07-23
225
+
226
+ - v23.7.9
227
+ - `ultralytics.utils` ModuleNotFoundError 해결 (https://github.com/ultralytics/ultralytics/issues/3856)
228
+ - `pydantic` 2.0 이상 버전 설치안되도록 함
229
+ - `controlnet_dir` cmd args 문제 수정 (PR #107)
230
+
231
+ ## 2023-07-20
232
+
233
+ - v23.7.8
234
+ - `paste_field_names` 추가했던 것을 되돌림
235
+
236
+ ## 2023-07-19
237
+
238
+ - v23.7.7
239
+ - 인페인팅 단계에서 별도의 샘플러를 선택할 수 있게 옵션을 추가함 (xyz그리드에도 추가)
240
+ - webui 1.0.0-pre 이하 버전에서 batch index 문제 수정
241
+ - 스크립트에 `paste_field_names`을 추가함. 사용되는지는 모르겠음
242
+
243
+ ## 2023-07-16
244
+
245
+ - v23.7.6
246
+ - `ultralytics 8.0.135`에 추가된 cpuinfo 기능을 위해 `py-cpuinfo`를 미리 설치하게 함. (미리 설치 안하면 cpu나 mps사용할 때 재시작해야함)
247
+ - init_image가 RGB 모드가 아닐 때 RGB로 변경.
248
+
249
+ ## 2023-07-07
250
+
251
+ - v23.7.4
252
+ - batch count > 1일때 프롬프트의 인덱스 문제 수정
253
+
254
+ - v23.7.5
255
+ - i2i의 `cached_uc`와 `cached_c`가 p의 `cached_uc`와 `cached_c`가 다른 인스턴스가 되도록 수정
256
+
257
+ ## 2023-07-05
258
+
259
+ - v23.7.3
260
+ - 버그 수정
261
+ - `object()`가 json 직렬화 안되는 문제
262
+ - `process`를 호출함에 따라 배치 카운트가 2이상일 때, all_prompts가 고정되는 문제
263
+ - `ad-before`와 `ad-preview` 이미지 파일명이 실제 파일명과 다른 문제
264
+ - pydantic 2.0 호환성 문제
265
+
266
+ ## 2023-07-04
267
+
268
+ - v23.7.2
269
+ - `mediapipe_face_mesh_eyes_only` 모델 추가: `mediapipe_face_mesh`로 감지한 뒤 눈만 사용함.
270
+ - 매 배치 시작 전에 `scripts.postprocess`를, 후에 `scripts.process`를 호출함.
271
+ - 컨트롤넷을 사용하면 소요 시간이 조금 늘��나지만 몇몇 문제 해결에 도움이 됨.
272
+ - `lora_block_weight`를 스크립트 화이트리스트에 추가함.
273
+ - 한번이라도 ADetailer를 사용한 사람은 수동으로 추가해야함.
274
+
275
+ ## 2023-07-03
276
+
277
+ - v23.7.1
278
+ - `process_images`를 진행한 뒤 `StableDiffusionProcessing` 오브젝트의 close를 호출함
279
+ - api 호출로 사용했는지 확인하는 속성 추가
280
+ - `NansException`이 발생했을 때 중지하지 않고 남은 과정 계속 진행함
281
+
282
+ ## 2023-07-02
283
+
284
+ - v23.7.0
285
+ - `NansException`이 발생하면 로그에 표시하고 원본 이미지를 반환하게 설정
286
+ - `rich`를 사용한 에러 트레이싱
287
+ - install.py에 `rich` 추가
288
+ - 생성 중에 컴포넌트의 값을 변경하면 args의 값도 함께 변경되는 문제 수정 (issue #180)
289
+ - 터미널 로그로 ad_prompt와 ad_negative_prompt에 적용된 실제 프롬프트 확인할 수 있음 (입력과 다를 경우에만)
290
+
291
+ ## 2023-06-28
292
+
293
+ - v23.6.4
294
+ - 최대 모델 수 5 -> 10개
295
+ - ad_prompt와 ad_negative_prompt에 빈칸으로 놔두면 입력 프롬프트가 사용된다는 문구 추가
296
+ - huggingface 모델 다운로드 실패시 로깅
297
+ - 1st 모델이 `None`일 경우 나머지 입력을 무시하던 문제 수정
298
+ - `--use-cpu` 에 `adetailer` 입력 시 cpu로 yolo모델을 사용함
299
+
300
+ ## 2023-06-20
301
+
302
+ - v23.6.3
303
+ - 컨트롤넷 inpaint 모델에 대해, 3가지 모듈을 사용할 수 있도록 함
304
+ - Noise Multiplier 옵션 추가 (PR #149)
305
+ - pydantic 최소 버전 1.10.8로 설정 (Issue #146)
306
+
307
+ ## 2023-06-05
308
+
309
+ - v23.6.2
310
+ - xyz_grid에서 ADetailer를 사용할 수 있게함.
311
+ - 8가지 옵션만 1st 탭에 적용되도록 함.
312
+
313
+ ## 2023-06-01
314
+
315
+ - v23.6.1
316
+ - `inpaint, scribble, lineart, openpose, tile` 5가지 컨트롤넷 모델 지원 (PR #107)
317
+ - controlnet guidance start, end 인자 추가 (PR #107)
318
+ - `modules.extensions`를 사용하여 컨트롤넷 확장을 불러오고 경로를 알아내로록 변경
319
+ - ui에서 컨트롤넷을 별도 함수로 분리
320
+
321
+ ## 2023-05-30
322
+
323
+ - v23.6.0
324
+ - 스크립트의 이름을 `After Detailer`에서 `ADetailer`로 변경
325
+ - API 사용자는 변경 필요함
326
+ - 몇몇 설정 변경
327
+ - `ad_conf` → `ad_confidence`. 0~100 사이의 int → 0.0~1.0 사이의 float
328
+ - `ad_inpaint_full_res` → `ad_inpaint_only_masked`
329
+ - `ad_inpaint_full_res_padding` → `ad_inpaint_only_masked_padding`
330
+ - mediapipe face mesh 모델 추가
331
+
332
+ - mediapipe 최소 버전 `0.10.0`
333
+
334
+ - rich traceback 제거함
335
+ - huggingface 다운로드 실패할 때 에러가 나지 않게 하고 해당 모델을 제거함
336
+
337
+ ## 2023-05-26
338
+
339
+ - v23.5.19
340
+ - 1번째 탭에도 `None` 옵션을 추가함
341
+ - api로 ad controlnet model에 inpaint가 아닌 다른 컨트롤넷 모델을 사용하지 못하도록 막음
342
+ - adetailer 진행중에 total tqdm 진행바 업데이트를 멈춤
343
+ - state.inturrupted 상태에서 adetailer 과정을 중지함
344
+ - 컨트롤넷 process를 각 batch가 끝난 순간에만 호출하도록 변경
345
+
346
+ ### 2023-05-25
347
+
348
+ - v23.5.18
349
+ - 컨트롤넷 관련 수정
350
+ - unit의 `input_mode`를 `SIMPLE`로 모두 변경
351
+ - 컨트롤넷 유넷 훅과 하이잭 함수들을 adetailer를 실행할 때에만 되돌리는 기능 추가
352
+ - adetailer 처리가 끝난 뒤 컨트롤넷 스크립트의 process를 다시 진행함. (batch count 2 이상일때의 문제 해결)
353
+ - 기본 활성 스크립트 목록에서 컨트롤넷을 뺌
354
+
355
+ ### 2023-05-22
356
+
357
+ - v23.5.17
358
+ - 컨트롤넷 확장이 있으면 컨트롤넷 스크립트를 활성화함. (컨트롤넷 관련 문제 해결)
359
+ - 모든 컴포넌트에 elem_id 설정
360
+ - ui에 버전을 표시함
361
+
362
+ ### 2023-05-19
363
+
364
+ - v23.5.16
365
+ - 추가한 옵션
366
+ - Mask min/max ratio
367
+ - Mask merge mode
368
+ - Restore faces after ADetailer
369
+ - 옵션들을 Accordion으로 묶음
370
+
371
+ ### 2023-05-18
372
+
373
+ - v23.5.15
374
+ - 필요한 것만 임포트하도록 변경 (vae 로딩 오류 없어짐. 로딩 속도 빨라짐)
375
+
376
+ ### 2023-05-17
377
+
378
+ - v23.5.14
379
+ - `[SKIP]`으로 ad prompt 일부를 건너뛰는 기능 추가
380
+ - bbox 정렬 옵션 추가
381
+ - sd_webui 타입힌트를 만들어냄
382
+ - enable checker와 관련된 api 오류 수정?
383
+
384
+ ### 2023-05-15
385
+
386
+ - v23.5.13
387
+ - `[SEP]`으로 ad prompt를 분리하여 적용하는 기능 추가
388
+ - enable checker를 다시 pydantic으로 변경함
389
+ - ui 관련 함수를 adetailer.ui 폴더로 분리함
390
+ - controlnet을 사용할 때 모든 controlnet unit 비활성화
391
+ - adetailer 폴더가 없으면 만들게 함
392
+
393
+ ### 2023-05-13
394
+
395
+ - v23.5.12
396
+ - `ad_enable`을 제외한 입력이 dict타입으로 들어오도록 변경
397
+ - web api로 사용할 때에 특히 사용하기 쉬움
398
+ - web api breaking change
399
+ - `mask_preprocess` 인자를 넣지 않았던 오류 수정 (PR #47)
400
+ - huggingface에서 모델을 다운로드하지 않는 옵션 추가 `--ad-no-huggingface`
401
+
402
+ ### 2023-05-12
403
+
404
+ - v23.5.11
405
+ - `ultralytics` 알람 제거
406
+ - 필요없는 exif 인자 더 제거함
407
+ - `use separate steps` 옵션 추가
408
+ - ui 배치를 조정함
409
+
410
+ ### 2023-05-09
411
+
412
+ - v23.5.10
413
+ - 선택한 스크립트만 ADetailer에 적용하는 옵션 추가, 기본값 `True`. 설정 탭에서 지정가능.
414
+ - 기본값: `dynamic_prompting,dynamic_thresholding,wildcards,wildcard_recursive`
415
+ - `person_yolov8s-seg.pt` 모델 추가
416
+ - `ultralytics`의 최소 버전을 `8.0.97`로 설정 (C:\\ 문제 해결된 버전)
417
+
418
+ ### 2023-05-08
419
+
420
+ - v23.5.9
421
+ - 2가지 이상의 모델을 사용할 수 있음. 기본값: 2, 최대: 5
422
+ - segment 모델을 사용할 수 있게 함. `person_yolov8n-seg.pt` 추가
423
+
424
+ ### 2023-05-07
425
+
426
+ - v23.5.8
427
+ - 프롬프트와 네거티브 프롬프트에 방향키 지원 (PR #24)
428
+ - `mask_preprocess`를 추가함. 이전 버전과 시드값이 달라질 가능성 있음!
429
+ - 이미지 처리가 일어났을 때에만 before이미지를 저장함
430
+ - 설정창의 레이블을 ADetailer 대신 더 적절하게 수정함
431
+
432
+ ### 2023-05-06
433
+
434
+ - v23.5.7
435
+ - `ad_use_cfg_scale` 옵션 추가. cfg 스케일을 따로 사용할지 말지 결정함.
436
+ - `ad_enable` 기본값을 `True`에서 `False`로 변경
437
+ - `ad_model`의 기본값을 `None`에서 첫번째 모델로 변경
438
+ - 최소 2개의 입력(ad_enable, ad_model)만 들어오면 작동하게 변경.
439
+
440
+ - v23.5.7.post0
441
+ - `init_controlnet_ext`을 controlnet_exists == True일때에만 실행
442
+ - webui를 C드라이브 바로 밑에 설치한 사람들에게 `ultralytics` 경고 표시
443
+
444
+ ### 2023-05-05 (어린이날)
445
+
446
+ - v23.5.5
447
+ - `Save images before ADetailer` 옵션 추가
448
+ - 입력으로 들어온 인자와 ALL_ARGS의 길이가 다르면 에러메세지
449
+ - README.md에 설치방법 추가
450
+
451
+ - v23.5.6
452
+ - get_args에서 IndexError가 발생하면 자세한 에러메세지를 볼 수 있음
453
+ - AdetailerArgs에 extra_params 내장
454
+ - scripts_args를 딥카피함
455
+ - postprocess_image를 약간 분리함
456
+
457
+ - v23.5.6.post0
458
+ - `init_controlnet_ext`에서 에러메세지를 자세히 볼 수 있음
459
+
460
+ ### 2023-05-04
461
+
462
+ - v23.5.4
463
+ - use pydantic for arguments validation
464
+ - revert: ad_model to `None` as default
465
+ - revert: `__future__` imports
466
+ - lazily import yolo and mediapipe
467
+
468
+ ### 2023-05-03
469
+
470
+ - v23.5.3.post0
471
+ - remove `__future__` imports
472
+ - change to copy scripts and scripts args
473
+
474
+ - v23.5.3.post1
475
+ - change default ad_model from `None`
476
+
477
+ ### 2023-05-02
478
+
479
+ - v23.5.3
480
+ - Remove `None` from model list and add `Enable ADetailer` checkbox.
481
+ - install.py `skip_install` fix.
LICENSE (1).md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **FLUX.1 \[dev\] Non-Commercial License**
2
+
3
+ Black Forest Labs, Inc. (“**we**” or “**our**” or “**Company**”) is pleased to make available the weights, parameters and inference code for the FLUX.1 \[dev\] Model (as defined below) freely available for your non-commercial and non-production use as set forth in this FLUX.1 \[dev\] Non-Commercial License (“**License**”). The “**FLUX.1 \[dev\] Model**” means the FLUX.1 \[dev\] text-to-image AI model and its elements which includes algorithms, software, checkpoints, parameters, source code (inference code, evaluation code, and if applicable, fine-tuning code) and any other materials associated with the FLUX.1 \[dev\] AI model made available by Company under this License, including if any, the technical documentation, manuals and instructions for the use and operation thereof (collectively, “**FLUX.1 \[dev\] Model**”).
4
+
5
+ By downloading, accessing, use, Distributing (as defined below), or creating a Derivative (as defined below) of the FLUX.1 \[dev\] Model, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to access, use, Distribute or create a Derivative of the FLUX.1 \[dev\] Model and you must immediately cease using the FLUX.1 \[dev\] Model. If you are agreeing to be bound by the terms of this License on behalf of your employer or other entity, you represent and warrant to us that you have full legal authority to bind your employer or such entity to this License. If you do not have the requisite authority, you may not accept the License or access the FLUX.1 \[dev\] Model on behalf of your employer or other entity.
6
+
7
+ 1. **Definitions**. Capitalized terms used in this License but not defined herein have the following meanings:
8
+
9
+ 1. “**Derivative**” means any (i) modified version of the FLUX.1 \[dev\] Model (including but not limited to any customized or fine-tuned version thereof), (ii) work based on the FLUX.1 \[dev\] Model, or (iii) any other derivative work thereof. For the avoidance of doubt, Outputs are not considered Derivatives under this License.
10
+
11
+ 1. “**Distribution**” or “**Distribute**” or “**Distributing**” means providing or making available, by any means, a copy of the FLUX.1 \[dev\] Models and/or the Derivatives as the case may be.
12
+
13
+ 1. “**Non-Commercial Purpose**” means any of the following uses, but only so far as you do not receive any direct or indirect payment arising from the use of the model or its output: (i) personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, or otherwise not directly or indirectly connected to any commercial activities, business operations, or employment responsibilities; (ii) use by commercial or for-profit entities for testing, evaluation, or non-commercial research and development in a non-production environment, (iii) use by any charitable organization for charitable purposes, or for testing or evaluation. For clarity, use for revenue-generating activity or direct interactions with or impacts on end users, or use to train, fine tune or distill other models for commercial use is not a Non-Commercial purpose.
14
+
15
+ 1. “**Outputs**” means any content generated by the operation of the FLUX.1 \[dev\] Models or the Derivatives from a prompt (i.e., text instructions) provided by users. For the avoidance of doubt, Outputs do not include any components of a FLUX.1 \[dev\] Models, such as any fine-tuned versions of the FLUX.1 \[dev\] Models, the weights, or parameters.
16
+
17
+ 1. “**you**” or “**your**” means the individual or entity entering into this License with Company.
18
+
19
+ 1. **License Grant**.
20
+
21
+ 1. License. Subject to your compliance with this License, Company grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty free and limited license to access, use, create Derivatives of, and Distribute the FLUX.1 \[dev\] Models solely for your Non-Commercial Purposes. The foregoing license is personal to you, and you may not assign or sublicense this License or any other rights or obligations under this License without Company’s prior written consent; any such assignment or sublicense will be void and will automatically and immediately terminate this License. Any restrictions set forth herein in regarding the FLUX.1 \[dev\] Model also applies to any Derivative you create or that are created on your behalf.
22
+
23
+ 1. Non-Commercial Use Only. You may only access, use, Distribute, or creative Derivatives of or the FLUX.1 \[dev\] Model or Derivatives for Non-Commercial Purposes. If You want to use a FLUX.1 \[dev\] Model a Derivative for any purpose that is not expressly authorized under this License, such as for a commercial activity, you must request a license from Company, which Company may grant to you in Company’s sole discretion and which additional use may be subject to a fee, royalty or other revenue share. Please contact Company at the following e-mail address if you want to discuss such a license: info@blackforestlabs.ai.
24
+
25
+ 1. Reserved Rights. The grant of rights expressly set forth in this License are the complete grant of rights to you in the FLUX.1 \[dev\] Model, and no other licenses are granted, whether by waiver, estoppel, implication, equity or otherwise. Company and its licensors reserve all rights not expressly granted by this License.
26
+
27
+ 1. Outputs. We claim no ownership rights in and to the Outputs. You are solely responsible for the Outputs you generate and their subsequent uses in accordance with this License. You may use Output for any purpose (including for commercial purposes), except as expressly prohibited herein. You may not use the Output to train, fine-tune or distill a model that is competitive with the FLUX.1 \[dev\] Model.
28
+
29
+ 1. **Distribution**. Subject to this License, you may Distribute copies of the FLUX.1 \[dev\] Model and/or Derivatives made by you, under the following conditions:
30
+
31
+ 1. you must make available a copy of this License to third-party recipients of the FLUX.1 \[dev\] Models and/or Derivatives you Distribute, and specify that any rights to use the FLUX.1 \[dev\] Models and/or Derivatives shall be directly granted by Company to said third-party recipients pursuant to this License;
32
+
33
+ 1. you must make prominently display the following notice alongside the Distribution of the FLUX.1 \[dev\] Model or Derivative (such as via a “Notice” text file distributed as part of such FLUX.1 \[dev\] Model or Derivative) (the “**Attribution Notice**”):
34
+
35
+ “The FLUX.1 \[dev\] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 \[dev\] Non-Commercial License. Copyright Black Forest Labs. Inc.
36
+
37
+ IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.”
38
+
39
+ 1. in the case of Distribution of Derivatives made by you, you must also include in the Attribution Notice a statement that you have modified the applicable FLUX.1 \[dev\] Model; and
40
+
41
+ 1. in the case of Distribution of Derivatives made by you, any terms and conditions you impose on any third-party recipients relating to Derivatives made by or for you shall neither limit such third-party recipients’ use of the FLUX.1 \[dev\] Model or any Derivatives made by or for Company in accordance with this License nor conflict with any of its terms and conditions.
42
+
43
+ 1. In the case of Distribution of Derivatives made by you, you must not misrepresent or imply, through any means, that the Derivatives made by or for you and/or any modified version of the FLUX.1 \[dev\] Model you Distribute under your name and responsibility is an official product of the Company or has been endorsed, approved or validated by the Company, unless you are authorized by Company to do so in writing.
44
+
45
+ 1. **Restrictions**. You will not, and will not permit, assist or cause any third party to
46
+
47
+ 1. use, modify, copy, reproduce, create Derivatives of, or Distribute the FLUX.1 \[dev\] Model (or any Derivative thereof, or any data produced by the FLUX.1 \[dev\] Model), in whole or in part, for (i) any commercial or production purposes, (ii) military purposes, (iii) purposes of surveillance, including any research or development relating to surveillance, (iv) biometric processing, (v) in any manner that infringes, misappropriates, or otherwise violates any third-party rights, or (vi) in any manner that violates any applicable law and violating any privacy or security laws, rules, regulations, directives, or governmental requirements (including the General Data Privacy Regulation (Regulation (EU) 2016/679), the California Consumer Privacy Act, and any and all laws governing the processing of biometric information), as well as all amendments and successor laws to any of the foregoing;
48
+
49
+ 1. alter or remove copyright and other proprietary notices which appear on or in any portion of the FLUX.1 \[dev\] Model;
50
+
51
+ 1. utilize any equipment, device, software, or other means to circumvent or remove any security or protection used by Company in connection with the FLUX.1 \[dev\] Model, or to circumvent or remove any usage restrictions, or to enable functionality disabled by FLUX.1 \[dev\] Model; or
52
+
53
+ 1. offer or impose any terms on the FLUX.1 \[dev\] Model that alter, restrict, or are inconsistent with the terms of this License.
54
+
55
+ 1. violate any applicable U.S. and non-U.S. export control and trade sanctions laws (“**Export Laws**”) in connection with your use or Distribution of any FLUX.1 \[dev\] Model;
56
+
57
+ 1. directly or indirectly Distribute, export, or otherwise transfer FLUX.1 \[dev\] Model (a) to any individual, entity, or country prohibited by Export Laws; (b) to anyone on U.S. or non-U.S. government restricted parties lists; or (c) for any purpose prohibited by Export Laws, including nuclear, chemical or biological weapons, or missile technology applications; 3\) use or download FLUX.1 \[dev\] Model if you or they are (a) located in a comprehensively sanctioned jurisdiction, (b) currently listed on any U.S. or non-U.S. restricted parties list, or (c) for any purpose prohibited by Export Laws; and (4) will not disguise your location through IP proxying or other methods.
58
+
59
+ 1. **DISCLAIMERS**. THE FLUX.1 \[dev\] MODEL IS PROVIDED “AS IS” AND “WITH ALL FAULTS” WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. COMPANY EXPRESSLY DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, WHETHER BY STATUTE, CUSTOM, USAGE OR OTHERWISE AS TO ANY MATTERS RELATED TO THE FLUX.1 \[dev\] MODEL, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, SATISFACTORY QUALITY, OR NON-INFRINGEMENT. COMPANY MAKES NO WARRANTIES OR REPRESENTATIONS THAT THE FLUX.1 \[dev\] MODEL WILL BE ERROR FREE OR FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR PRODUCE ANY PARTICULAR RESULTS.
60
+
61
+ 1. **LIMITATION OF LIABILITY**. TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL COMPANY BE LIABLE TO YOU OR YOUR EMPLOYEES, AFFILIATES, USERS, OFFICERS OR DIRECTORS (A) UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, WARRANTY, OR OTHERWISE UNDER THIS LICENSE, OR (B) FOR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, PUNITIVE OR SPECIAL DAMAGES OR LOST PROFITS, EVEN IF COMPANY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE FLUX.1 \[dev\] MODEL, ITS CONSTITUENT COMPONENTS, AND ANY OUTPUT (COLLECTIVELY, “MODEL MATERIALS”) ARE NOT DESIGNED OR INTENDED FOR USE IN ANY APPLICATION OR SITUATION WHERE FAILURE OR FAULT OF THE MODEL MATERIALS COULD REASONABLY BE ANTICIPATED TO LEAD TO SERIOUS INJURY OF ANY PERSON, INCLUDING POTENTIAL DISCRIMINATION OR VIOLATION OF AN INDIVIDUAL’S PRIVACY RIGHTS, OR TO SEVERE PHYSICAL, PROPERTY, OR ENVIRONMENTAL DAMAGE (EACH, A “**HIGH-RISK USE**”). IF YOU ELECT TO USE ANY OF THE MODEL MATERIALS FOR A HIGH-RISK USE, YOU DO SO AT YOUR OWN RISK. YOU AGREE TO DESIGN AND IMPLEMENT APPROPRIATE DECISION-MAKING AND RISK-MITIGATION PROCEDURES AND POLICIES IN CONNECTION WITH A HIGH-RISK USE SUCH THAT EVEN IF THERE IS A FAILURE OR FAULT IN ANY OF THE MODEL MATERIALS, THE SAFETY OF PERSONS OR PROPERTY AFFECTED BY THE ACTIVITY STAYS AT A LEVEL THAT IS REASONABLE, APPROPRIATE, AND LAWFUL FOR THE FIELD OF THE HIGH-RISK USE.
62
+
63
+ 1. **INDEMNIFICATION**
64
+
65
+ You will indemnify, defend and hold harmless Company and our subsidiaries and affiliates, and each of our respective shareholders, directors, officers, employees, agents, successors, and assigns (collectively, the “**Company Parties**”) from and against any losses, liabilities, damages, fines, penalties, and expenses (including reasonable attorneys’ fees) incurred by any Company Party in connection with any claim, demand, allegation, lawsuit, proceeding, or investigation (collectively, “**Claims**”) arising out of or related to (a) your access to or use of the FLUX.1 \[dev\] Model (as well as any Output, results or data generated from such access or use), including any High-Risk Use (defined below); (b) your violation of this License; or (c) your violation, misappropriation or infringement of any rights of another (including intellectual property or other proprietary rights and privacy rights). You will promptly notify the Company Parties of any such Claims, and cooperate with Company Parties in defending such Claims. You will also grant the Company Parties sole control of the defense or settlement, at Company’s sole option, of any Claims. This indemnity is in addition to, and not in lieu of, any other indemnities or remedies set forth in a written agreement between you and Company or the other Company Parties.
66
+
67
+ 1. **Termination; Survival**.
68
+
69
+ 1. This License will automatically terminate upon any breach by you of the terms of this License.
70
+
71
+ 1. We may terminate this License, in whole or in part, at any time upon notice (including electronic) to you.
72
+
73
+ 1. If You initiate any legal action or proceedings against Company or any other entity (including a cross-claim or counterclaim in a lawsuit), alleging that the FLUX.1 \[dev\] Model or any Derivative, or any part thereof, infringe upon intellectual property or other rights owned or licensable by you, then any licenses granted to you under this License will immediately terminate as of the date such legal action or claim is filed or initiated.
74
+
75
+ 1. Upon termination of this License, you must cease all use, access or Distribution of the FLUX.1 \[dev\] Model and any Derivatives. The following sections survive termination of this License 2(c), 2(d), 4-11.
76
+
77
+ 1. **Third Party Materials**. The FLUX.1 \[dev\] Model may contain third-party software or other components (including free and open source software) (all of the foregoing, “**Third Party Materials**”), which are subject to the license terms of the respective third-party licensors. Your dealings or correspondence with third parties and your use of or interaction with any Third Party Materials are solely between you and the third party. Company does not control or endorse, and makes no representations or warranties regarding, any Third Party Materials, and your access to and use of such Third Party Materials are at your own risk.
78
+
79
+ 1. **Trademarks**. You have not been granted any trademark license as part of this License and may not use any name or mark associated with Company without the prior written permission of Company, except to the extent necessary to make the reference required in the Attribution Notice as specified above or as is reasonably necessary in describing the FLUX.1 \[dev\] Model and its creators.
80
+
81
+ 1. **General**. This License will be governed and construed under the laws of the State of Delaware without regard to conflicts of law provisions. If any provision or part of a provision of this License is unlawful, void or unenforceable, that provision or part of the provision is deemed severed from this License, and will not affect the validity and enforceability of any remaining provisions. The failure of Company to exercise or enforce any right or provision of this License will not operate as a waiver of such right or provision. This License does not confer any third-party beneficiary rights upon any other person or entity. This License, together with the Documentation, contains the entire understanding between you and Company regarding the subject matter of this License, and supersedes all other written or oral agreements and understandings between you and Company regarding such subject matter. No change or addition to any provision of this License will be binding unless it is in writing and signed by an authorized representative of both you and Company.
82
+
README (11).md ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADetailer
2
+
3
+ ADetailer is an extension for the stable diffusion webui that does automatic masking and inpainting. It is similar to the Detection Detailer.
4
+
5
+ ## Install
6
+
7
+ You can install it directly from the Extensions tab.
8
+
9
+ ![image](https://i.imgur.com/qaXtoI6.png)
10
+
11
+ Or
12
+
13
+ (from Mikubill/sd-webui-controlnet)
14
+
15
+ 1. Open "Extensions" tab.
16
+ 2. Open "Install from URL" tab in the tab.
17
+ 3. Enter `https://github.com/Bing-su/adetailer.git` to "URL for extension's git repository".
18
+ 4. Press "Install" button.
19
+ 5. Wait 5 seconds, and you will see the message "Installed into stable-diffusion-webui\extensions\adetailer. Use Installed tab to restart".
20
+ 6. Go to "Installed" tab, click "Check for updates", and then click "Apply and restart UI". (The next time you can also use this method to update extensions.)
21
+ 7. Completely restart A1111 webui including your terminal. (If you do not know what is a "terminal", you can reboot your computer: turn your computer off and turn it on again.)
22
+
23
+ ## Options
24
+
25
+ | Model, Prompts | | |
26
+ | --------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
27
+ | ADetailer model | Determine what to detect. | `None` = disable |
28
+ | ADetailer model classes | Comma separated class names to detect. only available when using YOLO World models | If blank, use default values.<br/>default = [COCO 80 classes](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml) |
29
+ | ADetailer prompt, negative prompt | Prompts and negative prompts to apply | If left blank, it will use the same as the input. |
30
+ | Skip img2img | Skip img2img. In practice, this works by changing the step count of img2img to 1. | img2img only |
31
+
32
+ | Detection | | |
33
+ | ------------------------------------ | -------------------------------------------------------------------------------------------- | ------------ |
34
+ | Detection model confidence threshold | Only objects with a detection model confidence above this threshold are used for inpainting. | |
35
+ | Mask min/max ratio | Only use masks whose area is between those ratios for the area of the entire image. | |
36
+ | Mask only the top k largest | Only use the k objects with the largest area of the bbox. | 0 to disable |
37
+
38
+ If you want to exclude objects in the background, try setting the min ratio to around `0.01`.
39
+
40
+ | Mask Preprocessing | | |
41
+ | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
42
+ | Mask x, y offset | Moves the mask horizontally and vertically by | |
43
+ | Mask erosion (-) / dilation (+) | Enlarge or reduce the detected mask. | [opencv example](https://docs.opencv.org/4.7.0/db/df6/tutorial_erosion_dilatation.html) |
44
+ | Mask merge mode | `None`: Inpaint each mask<br/>`Merge`: Merge all masks and inpaint<br/>`Merge and Invert`: Merge all masks and Invert, then inpaint | |
45
+
46
+ Applied in this order: x, y offset → erosion/dilation → merge/invert.
47
+
48
+ #### Inpainting
49
+
50
+ Each option corresponds to a corresponding option on the inpaint tab. Therefore, please refer to the inpaint tab for usage details on how to use each option.
51
+
52
+ ## ControlNet Inpainting
53
+
54
+ You can use the ControlNet extension if you have ControlNet installed and ControlNet models.
55
+
56
+ Support `inpaint, scribble, lineart, openpose, tile, depth` controlnet models. Once you choose a model, the preprocessor is set automatically. It works separately from the model set by the Controlnet extension.
57
+
58
+ If you select `Passthrough`, the controlnet settings you set outside of ADetailer will be used.
59
+
60
+ ## Advanced Options
61
+
62
+ API request example: [wiki/REST-API](https://github.com/Bing-su/adetailer/wiki/REST-API)
63
+
64
+ `[SEP], [SKIP], [PROMPT]` tokens: [wiki/Advanced](https://github.com/Bing-su/adetailer/wiki/Advanced)
65
+
66
+ ## Media
67
+
68
+ - 🎥 [どこよりも詳しい After Detailer (adetailer)の使い方 ① 【Stable Diffusion】](https://youtu.be/sF3POwPUWCE)
69
+ - 🎥 [どこよりも詳しい After Detailer (adetailer)の使い方 ② 【Stable Diffusion】](https://youtu.be/urNISRdbIEg)
70
+
71
+ - 📜 [ADetailer Installation and 5 Usage Methods](https://kindanai.com/en/manual-adetailer/)
72
+
73
+ ## Model
74
+
75
+ | Model | Target | mAP 50 | mAP 50-95 |
76
+ | --------------------- | --------------------- | ----------------------------- | ----------------------------- |
77
+ | face_yolov8n.pt | 2D / realistic face | 0.660 | 0.366 |
78
+ | face_yolov8s.pt | 2D / realistic face | 0.713 | 0.404 |
79
+ | hand_yolov8n.pt | 2D / realistic hand | 0.767 | 0.505 |
80
+ | person_yolov8n-seg.pt | 2D / realistic person | 0.782 (bbox)<br/>0.761 (mask) | 0.555 (bbox)<br/>0.460 (mask) |
81
+ | person_yolov8s-seg.pt | 2D / realistic person | 0.824 (bbox)<br/>0.809 (mask) | 0.605 (bbox)<br/>0.508 (mask) |
82
+ | mediapipe_face_full | realistic face | - | - |
83
+ | mediapipe_face_short | realistic face | - | - |
84
+ | mediapipe_face_mesh | realistic face | - | - |
85
+
86
+ The YOLO models can be found on huggingface [Bingsu/adetailer](https://huggingface.co/Bingsu/adetailer).
87
+
88
+ For a detailed description of the YOLO8 model, see: https://docs.ultralytics.com/models/yolov8/#overview
89
+
90
+ YOLO World model: https://docs.ultralytics.com/models/yolo-world/
91
+
92
+ ### Additional Model
93
+
94
+ Put your [ultralytics](https://github.com/ultralytics/ultralytics) yolo model in `models/adetailer`. The model name should end with `.pt`.
95
+
96
+ It must be a bbox detection or segment model and use all label.
97
+
98
+ ## How it works
99
+
100
+ ADetailer works in three simple steps.
101
+
102
+ 1. Create an image.
103
+ 2. Detect object with a detection model and create a mask image.
104
+ 3. Inpaint using the image from 1 and the mask from 2.
105
+
106
+ ## Development
107
+
108
+ ADetailer is developed and tested using the stable-diffusion 1.5 model, for the latest version of [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) repository only.
109
+
110
+ ## License
111
+
112
+ ADetailer is a derivative work that uses two AGPL-licensed works (stable-diffusion-webui, ultralytics) and is therefore distributed under the AGPL license.
113
+
114
+ ## See Also
115
+
116
+ - https://github.com/ototadana/sd-face-editor
117
+ - https://github.com/continue-revolution/sd-webui-segment-anything
118
+ - https://github.com/portu-sim/sd-webui-bmab
gitattributes (11) ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.sft filter=lfs diff=lfs merge=lfs -text
37
+ grid.png filter=lfs diff=lfs merge=lfs -text
38
+ dev_grid.jpg filter=lfs diff=lfs merge=lfs -text
install.py ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import importlib.util
4
+ import subprocess
5
+ import sys
6
+ from importlib.metadata import version # python >= 3.8
7
+
8
+ from packaging.version import parse
9
+
10
+ import_name = {"py-cpuinfo": "cpuinfo", "protobuf": "google.protobuf"}
11
+
12
+
13
+ def is_installed(
14
+ package: str, min_version: str | None = None, max_version: str | None = None
15
+ ):
16
+ name = import_name.get(package, package)
17
+ try:
18
+ spec = importlib.util.find_spec(name)
19
+ except ModuleNotFoundError:
20
+ return False
21
+
22
+ if spec is None:
23
+ return False
24
+
25
+ if not min_version and not max_version:
26
+ return True
27
+
28
+ if not min_version:
29
+ min_version = "0.0.0"
30
+ if not max_version:
31
+ max_version = "99999999.99999999.99999999"
32
+
33
+ try:
34
+ pkg_version = version(package)
35
+ return parse(min_version) <= parse(pkg_version) <= parse(max_version)
36
+ except Exception:
37
+ return False
38
+
39
+
40
+ def run_pip(*args):
41
+ subprocess.run([sys.executable, "-m", "pip", "install", *args], check=True)
42
+
43
+
44
+ def install():
45
+ deps = [
46
+ # requirements
47
+ ("ultralytics", "8.2.0", None),
48
+ ("mediapipe", "0.10.13", None),
49
+ ("rich", "13.0.0", None),
50
+ ]
51
+
52
+ pkgs = []
53
+ for pkg, low, high in deps:
54
+ if not is_installed(pkg, low, high):
55
+ if low and high:
56
+ cmd = f"{pkg}>={low},<={high}"
57
+ elif low:
58
+ cmd = f"{pkg}>={low}"
59
+ elif high:
60
+ cmd = f"{pkg}<={high}"
61
+ else:
62
+ cmd = pkg
63
+ pkgs.append(cmd)
64
+
65
+ if pkgs:
66
+ run_pip(*pkgs)
67
+
68
+
69
+ try:
70
+ import launch
71
+
72
+ skip_install = launch.args.skip_install
73
+ except Exception:
74
+ skip_install = False
75
+
76
+ if not skip_install:
77
+ install()
pre-commit-config (1).yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ci:
2
+ autoupdate_branch: "dev"
3
+
4
+ exclude: ^modules/
5
+
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v4.6.0
9
+ hooks:
10
+ - id: check-added-large-files
11
+ args: [--maxkb=100]
12
+ - id: check-merge-conflict
13
+ - id: check-case-conflict
14
+ - id: check-ast
15
+ - id: check-yaml
16
+ - id: trailing-whitespace
17
+ args: [--markdown-linebreak-ext=md]
18
+ - id: end-of-file-fixer
19
+ - id: mixed-line-ending
20
+
21
+ - repo: https://github.com/rbubley/mirrors-prettier
22
+ rev: v3.3.3
23
+ hooks:
24
+ - id: prettier
25
+
26
+ - repo: https://github.com/astral-sh/ruff-pre-commit
27
+ rev: v0.5.7
28
+ hooks:
29
+ - id: ruff
30
+ args: [--fix, --exit-non-zero-on-fix]
31
+ - id: ruff-format
pre-commit-config.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ci:
2
+ autoupdate_branch: "dev"
3
+
4
+ exclude: ^modules/
5
+
6
+ repos:
7
+ - repo: https://github.com/pre-commit/pre-commit-hooks
8
+ rev: v4.6.0
9
+ hooks:
10
+ - id: check-added-large-files
11
+ args: [--maxkb=100]
12
+ - id: check-merge-conflict
13
+ - id: check-case-conflict
14
+ - id: check-ast
15
+ - id: check-yaml
16
+ - id: trailing-whitespace
17
+ args: [--markdown-linebreak-ext=md]
18
+ - id: end-of-file-fixer
19
+ - id: mixed-line-ending
20
+
21
+ - repo: https://github.com/rbubley/mirrors-prettier
22
+ rev: v3.3.3
23
+ hooks:
24
+ - id: prettier
25
+
26
+ - repo: https://github.com/astral-sh/ruff-pre-commit
27
+ rev: v0.5.7
28
+ hooks:
29
+ - id: ruff
30
+ args: [--fix, --exit-non-zero-on-fix]
31
+ - id: ruff-format
pyproject.toml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "adetailer"
3
+ description = "An object detection and auto-mask extension for stable diffusion webui."
4
+ authors = [{ name = "dowon", email = "ks2515@naver.com" }]
5
+ requires-python = ">=3.9"
6
+ readme = "README.md"
7
+ license = { text = "AGPL-3.0" }
8
+ dependencies = [
9
+ "ultralytics>=8.2",
10
+ "mediapipe>=0.10.13",
11
+ "pydantic<3",
12
+ "rich>=13",
13
+ "huggingface_hub",
14
+ ]
15
+ keywords = [
16
+ "stable-diffusion",
17
+ "stable-diffusion-webui",
18
+ "adetailer",
19
+ "ultralytics",
20
+ ]
21
+ classifiers = [
22
+ "License :: OSI Approved :: GNU Affero General Public License v3",
23
+ "Topic :: Scientific/Engineering :: Image Recognition",
24
+ ]
25
+ dynamic = ["version"]
26
+
27
+ [project.urls]
28
+ repository = "https://github.com/Bing-su/adetailer"
29
+
30
+ [project.optional-dependencies]
31
+ dev = ["ruff", "pre-commit", "devtools"]
32
+ test = ["pytest", "hypothesis"]
33
+
34
+ [build-system]
35
+ requires = ["hatchling"]
36
+ build-backend = "hatchling.build"
37
+
38
+ [tool.hatch.version]
39
+ path = "adetailer/__version__.py"
40
+
41
+ [tool.isort]
42
+ profile = "black"
43
+ known_first_party = ["launch", "modules"]
44
+
45
+ [tool.ruff]
46
+ target-version = "py39"
47
+ extend-exclude = ["modules"]
48
+
49
+ [tool.ruff.lint]
50
+ select = [
51
+ "A",
52
+ "B",
53
+ "C4",
54
+ "C90",
55
+ "E",
56
+ "EM",
57
+ "F",
58
+ "FA",
59
+ "I001",
60
+ "ISC",
61
+ "N",
62
+ "PD",
63
+ "PERF",
64
+ "PL",
65
+ "PIE",
66
+ "PT",
67
+ "PTH",
68
+ "RET",
69
+ "RUF",
70
+ "SIM",
71
+ "T20",
72
+ "TRY",
73
+ "UP",
74
+ "W",
75
+ ]
76
+ ignore = ["B905", "E501", "PLR2004", "PLW0603"]
77
+ unfixable = ["F401"]
78
+
79
+ [tool.ruff.lint.isort]
80
+ known-first-party = ["launch", "modules"]
81
+
82
+ [tool.ruff.lint.pyupgrade]
83
+ keep-runtime-typing = true