mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-30 03:01:18 +00:00
Merge branch 'dev' into main
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2023-07-07
|
||||||
|
|
||||||
|
- v23.7.4
|
||||||
|
- batch count > 1일때 프롬프트의 인덱스 문제 수정
|
||||||
|
|
||||||
## 2023-07-05
|
## 2023-07-05
|
||||||
|
|
||||||
- v23.7.3
|
- v23.7.3
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "23.7.3"
|
__version__ = "23.7.4"
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
return i2i
|
return i2i
|
||||||
|
|
||||||
def save_image(self, p, image, *, condition: str, suffix: str) -> None:
|
def save_image(self, p, image, *, condition: str, suffix: str) -> None:
|
||||||
i = p._ad_idx_all
|
i = p._ad_idx
|
||||||
if p.all_prompts:
|
if p.all_prompts:
|
||||||
i %= len(p.all_prompts)
|
i %= len(p.all_prompts)
|
||||||
save_prompt = p.all_prompts[i]
|
save_prompt = p.all_prompts[i]
|
||||||
@@ -484,11 +484,12 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
def need_call_process(self, p) -> bool:
|
def need_call_process(self, p) -> bool:
|
||||||
i = p._ad_idx
|
i = p._ad_idx
|
||||||
bs = p.batch_size
|
bs = p.batch_size
|
||||||
return i == bs - 1
|
return i % bs == bs - 1
|
||||||
|
|
||||||
def need_call_postprocess(self, p) -> bool:
|
def need_call_postprocess(self, p) -> bool:
|
||||||
i = p._ad_idx
|
i = p._ad_idx
|
||||||
return i == 0
|
bs = p.batch_size
|
||||||
|
return i % bs == 0
|
||||||
|
|
||||||
@rich_traceback
|
@rich_traceback
|
||||||
def process(self, p, *args_):
|
def process(self, p, *args_):
|
||||||
@@ -500,8 +501,6 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
extra_params = self.extra_params(arg_list)
|
extra_params = self.extra_params(arg_list)
|
||||||
p.extra_generation_params.update(extra_params)
|
p.extra_generation_params.update(extra_params)
|
||||||
|
|
||||||
p._ad_idx = -1
|
|
||||||
|
|
||||||
def _postprocess_image(self, p, pp, args: ADetailerArgs, *, n: int = 0) -> bool:
|
def _postprocess_image(self, p, pp, args: ADetailerArgs, *, n: int = 0) -> bool:
|
||||||
"""
|
"""
|
||||||
Returns
|
Returns
|
||||||
@@ -597,7 +596,6 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
return
|
return
|
||||||
|
|
||||||
p._ad_idx = getattr(p, "_ad_idx", -1) + 1
|
p._ad_idx = getattr(p, "_ad_idx", -1) + 1
|
||||||
p._ad_idx_all = getattr(p, "_ad_idx_all", -1) + 1
|
|
||||||
init_image = copy(pp.image)
|
init_image = copy(pp.image)
|
||||||
arg_list = self.get_args(p, *args_)
|
arg_list = self.get_args(p, *args_)
|
||||||
|
|
||||||
@@ -623,7 +621,7 @@ class AfterDetailerScript(scripts.Script):
|
|||||||
p.scripts.process(copy(p))
|
p.scripts.process(copy(p))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ia = p._ad_idx_all
|
ia = p._ad_idx
|
||||||
lenp = len(p.all_prompts)
|
lenp = len(p.all_prompts)
|
||||||
if ia % lenp == lenp - 1:
|
if ia % lenp == lenp - 1:
|
||||||
self.write_params_txt(p)
|
self.write_params_txt(p)
|
||||||
|
|||||||
Reference in New Issue
Block a user