diff --git a/CHANGELOG.md b/CHANGELOG.md index 454c34c..9729161 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.4.10 - 2023 Nov.01 +- Better **Hires. fix** logic + ### v1.4.9 - 2023 Nov.01 - Improve Sliders values refresh diff --git a/scripts/cc.py b/scripts/cc.py index 82c748c..ab8f554 100644 --- a/scripts/cc.py +++ b/scripts/cc.py @@ -134,6 +134,7 @@ class VectorscopeCC(scripts.Script): raise ValueError(f"Invalid Value: {string}") def process(self, p, enable:bool, latent:bool, bri:float, con:float, sat:float, r:float, g:float, b:float, doHR:bool, method:str, scaling:str): + KDiffusionSampler.isHR_Pass = False if 'Enable' in self.xyzCache.keys(): enable = self.parse_bool(self.xyzCache['Enable']) @@ -237,21 +238,8 @@ class VectorscopeCC(scripts.Script): # Channel 2: Violet | Yellow def callback_state(self, d): - if not doHR: - if hasattr(p, 'enable_hr') and p.enable_hr: - if not hasattr(p, 'hr_pass'): - p.hr_pass = 0 - - if p.hr_pass == 0: - if d["i"] == 0: - p.hr_pass = 1 - - elif p.hr_pass == 1: - if d["i"] == 0: - p.hr_pass = 2 - - if p.hr_pass == 2: - return og_callback(self, d) + if not doHR and self.isHR_Pass is True: + return og_callback(self, d) source = d[mode] @@ -299,9 +287,8 @@ class VectorscopeCC(scripts.Script): KDiffusionSampler.callback_state = callback_state return p - def postprocess_image(self, p, *args): - if hasattr(p, 'hr_pass'): - del p.hr_pass + def before_hr(self, p, *args): + KDiffusionSampler.isHR_Pass = True def postprocess(self, p, processed, *args): KDiffusionSampler.callback_state = og_callback diff --git a/scripts/cc_version.py b/scripts/cc_version.py index 984c4ea..13c10a5 100644 --- a/scripts/cc_version.py +++ b/scripts/cc_version.py @@ -2,7 +2,7 @@ from modules import script_callbacks import modules.scripts as scripts import json -VERSION = 'v1.4.9' +VERSION = 'v1.4.10' def clean_outdated(EXT_NAME:str): with open(scripts.basedir() + '/' + 'ui-config.json', 'r') as json_file: