From 8aabf633e9f9f2713f7fbee734974bd1b8e61114 Mon Sep 17 00:00:00 2001 From: Dowon Date: Mon, 15 Apr 2024 22:50:53 +0900 Subject: [PATCH 1/8] fix(install): mediapipe protobuf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 언제 배포되냐 --- adetailer/__version__.py | 2 +- install.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adetailer/__version__.py b/adetailer/__version__.py index de57016..53ff718 100644 --- a/adetailer/__version__.py +++ b/adetailer/__version__.py @@ -1 +1 @@ -__version__ = "24.4.1" +__version__ = "24.4.2-dev.0" diff --git a/install.py b/install.py index 10efe7b..fcd8598 100644 --- a/install.py +++ b/install.py @@ -45,10 +45,10 @@ def install(): deps = [ # requirements ("ultralytics", "8.1.29", None), - ("mediapipe", "0.10.9", None), + ("mediapipe", "0.10.12", None), ("rich", "13.0.0", None), # mediapipe - ("protobuf", "3.20", "3.9999"), + ("protobuf", "4.25.3", "4.9999"), ] for pkg, low, high in deps: From ca20a29bbbb59a8ed9a761ffee5bc610b2cec443 Mon Sep 17 00:00:00 2001 From: Dowon Date: Tue, 16 Apr 2024 21:06:21 +0900 Subject: [PATCH 2/8] =?UTF-8?q?chore(github):=20=EC=A7=88=EB=AC=B8=20?= =?UTF-8?q?=ED=83=AD=EC=9D=B4=20=EB=B2=84=EA=B7=B8=20=EC=A0=9C=EB=B3=B4?= =?UTF-8?q?=EC=9A=A9=EC=9C=BC=EB=A1=9C=EB=A7=8C=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/question.yaml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/question.yaml diff --git a/.github/ISSUE_TEMPLATE/question.yaml b/.github/ISSUE_TEMPLATE/question.yaml deleted file mode 100644 index 3c79454..0000000 --- a/.github/ISSUE_TEMPLATE/question.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Question -description: Write a question -labels: - - question - -body: - - type: textarea - attributes: - label: Question - description: Please do not write bug reports or feature requests here. From b6a1d82878f32c6cbb21156b93fcb73456dcff68 Mon Sep 17 00:00:00 2001 From: Dowon Date: Tue, 16 Apr 2024 21:14:37 +0900 Subject: [PATCH 3/8] ci: fix lint action --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ .github/workflows/notlint.yml | 19 ------------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/notlint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..ffa7ba6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: Empirical Implementation of JDD + +on: + pull_request: + types: + - opened + +jobs: + lint: + permissions: + pull-requests: write + runs-on: ubuntu-latest + + steps: + - uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + ![Imgur](https://i.imgur.com/ESow3BL.png) + + LGTM + reactions: hooray diff --git a/.github/workflows/notlint.yml b/.github/workflows/notlint.yml deleted file mode 100644 index faa3343..0000000 --- a/.github/workflows/notlint.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Not Lint - -on: - pull_request: - types: - - opened - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - uses: wow-actions/auto-comment@v1 - with: - GITHUB_TOKEN: ${{ github.token }} - pullRequestOpened: | - ![Imgur](https://i.imgur.com/ESow3BL.png) - - LGTM From 6ca27572bc178c55cd5bbb938403ca59f6a89175 Mon Sep 17 00:00:00 2001 From: Dowon Date: Tue, 16 Apr 2024 21:17:21 +0900 Subject: [PATCH 4/8] chore(ci): add check-yaml hook --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3b0f8d..20cd974 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,7 @@ repos: - id: check-merge-conflict - id: check-case-conflict - id: check-ast + - id: check-yaml - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - id: end-of-file-fixer From 8a948b80ee49f51b2ad9a6ca89bd9f42fdcb9915 Mon Sep 17 00:00:00 2001 From: Dowon Date: Tue, 16 Apr 2024 21:22:44 +0900 Subject: [PATCH 5/8] fix: python <= 3.9 union error --- aaaaaa/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aaaaaa/helper.py b/aaaaaa/helper.py index 2bcda32..27dd6a9 100644 --- a/aaaaaa/helper.py +++ b/aaaaaa/helper.py @@ -2,7 +2,7 @@ from contextlib import contextmanager from copy import copy -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, Union import torch @@ -21,7 +21,7 @@ StableDiffusionProcessingTxt2Img, ) -PT = StableDiffusionProcessingTxt2Img | StableDiffusionProcessingImg2Img +PT = Union[StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img] @contextmanager From 93d223f130d39b04f0a5f4ca2a193e9acc85f1ab Mon Sep 17 00:00:00 2001 From: Dowon Date: Wed, 17 Apr 2024 19:47:08 +0900 Subject: [PATCH 6/8] fix(scripts): --no-prompt-history error --- scripts/!adetailer.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 0ec861d..b3fb1c6 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -4,7 +4,6 @@ import re import sys import traceback -from contextlib import suppress from copy import copy from functools import partial from pathlib import Path @@ -71,6 +70,8 @@ if TYPE_CHECKING: from fastapi import FastAPI +PARAMS_TXT = "params.txt" + no_huggingface = getattr(cmd_opts, "ad_no_huggingface", False) adetailer_dir = Path(paths.models_path, "adetailer") safe_mkdir(adetailer_dir) @@ -409,9 +410,15 @@ def infotext(p) -> str: p, p.all_prompts, p.all_seeds, p.all_subseeds, None, 0, 0 ) + def read_params_txt(self) -> str: + params_txt = Path(paths.data_path, PARAMS_TXT) + if params_txt.exists(): + return params_txt.read_text(encoding="utf-8") + return "" + def write_params_txt(self, content: str) -> None: - params_txt = Path(paths.data_path, "params.txt") - with suppress(Exception): + params_txt = Path(paths.data_path, PARAMS_TXT) + if params_txt.exists() and content: params_txt.write_text(content, encoding="utf-8") @staticmethod @@ -783,7 +790,7 @@ def postprocess_image(self, p, pp, *args_): pp.image = ensure_pil_image(pp.image, "RGB") init_image = copy(pp.image) arg_list = self.get_args(p, *args_) - params_txt_content = Path(paths.data_path, "params.txt").read_text("utf-8") + params_txt_content = self.read_params_txt() if need_call_postprocess(p): dummy = Processed(p, [], p.seed, "") From fbda52a0d719266ea0f09a7b2cd53134ffabff87 Mon Sep 17 00:00:00 2001 From: Dowon Date: Wed, 17 Apr 2024 19:47:23 +0900 Subject: [PATCH 7/8] Revert "fix(install): mediapipe protobuf" This reverts commit 8aabf633e9f9f2713f7fbee734974bd1b8e61114. --- adetailer/__version__.py | 2 +- install.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adetailer/__version__.py b/adetailer/__version__.py index 53ff718..de57016 100644 --- a/adetailer/__version__.py +++ b/adetailer/__version__.py @@ -1 +1 @@ -__version__ = "24.4.2-dev.0" +__version__ = "24.4.1" diff --git a/install.py b/install.py index fcd8598..10efe7b 100644 --- a/install.py +++ b/install.py @@ -45,10 +45,10 @@ def install(): deps = [ # requirements ("ultralytics", "8.1.29", None), - ("mediapipe", "0.10.12", None), + ("mediapipe", "0.10.9", None), ("rich", "13.0.0", None), # mediapipe - ("protobuf", "4.25.3", "4.9999"), + ("protobuf", "3.20", "3.9999"), ] for pkg, low, high in deps: From 7fe43014afc360378a29b1d46b6deff9d2582667 Mon Sep 17 00:00:00 2001 From: Dowon Date: Wed, 17 Apr 2024 19:57:23 +0900 Subject: [PATCH 8/8] chore: v24.4.2 --- CHANGELOG.md | 6 ++++++ adetailer/__version__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70572b9..8481da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2024-04-17 + +- v24.4.2 +- `params.txt` 파일이 없을 때 에러가 발생하지 않도록 수정 +- 파이썬 3.9 이하에서 유니온 타입 에러 방지 + ## 2024-04-14 - v24.4.1 diff --git a/adetailer/__version__.py b/adetailer/__version__.py index de57016..5068bd4 100644 --- a/adetailer/__version__.py +++ b/adetailer/__version__.py @@ -1 +1 @@ -__version__ = "24.4.1" +__version__ = "24.4.2"