change Sampler hook

pull/20/head
Haoming 2024-02-29 12:19:26 +08:00
parent da328b7198
commit d5e308a5a4
18 changed files with 8 additions and 10 deletions

2
.gitattributes vendored
View File

@ -1,2 +0,0 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text

View File

@ -1,3 +1,6 @@
### v2.0.0 - 2024 Feb.29
- Removed **LFS**
### v1.5.1 - 2023 Dec.03 ### v1.5.1 - 2023 Dec.03
- Bug Fix by. **catboxanon** - Bug Fix by. **catboxanon**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 452 KiB

BIN
samples/Skip.jpg (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -1,9 +1,9 @@
from modules.sd_samplers_kdiffusion import KDiffusionSampler from modules.sd_samplers_common import Sampler
from modules import script_callbacks from modules import script_callbacks
from scripts.cc_scaling import apply_scaling from scripts.cc_scaling import apply_scaling
from scripts.cc_noise import * from scripts.cc_noise import *
original_callback = KDiffusionSampler.callback_state original_callback = Sampler.callback_state
def cc_callback(self, d): def cc_callback(self, d):
if not self.vec_cc['enable']: if not self.vec_cc['enable']:
@ -60,9 +60,9 @@ def cc_callback(self, d):
return original_callback(self, d) return original_callback(self, d)
KDiffusionSampler.callback_state = cc_callback Sampler.callback_state = cc_callback
def restore_callback(): def restore_callback():
KDiffusionSampler.callback_state = original_callback Sampler.callback_state = original_callback
script_callbacks.on_script_unloaded(restore_callback) script_callbacks.on_script_unloaded(restore_callback)

View File

@ -2,7 +2,7 @@ from modules import script_callbacks
import modules.scripts as scripts import modules.scripts as scripts
import json import json
VERSION = 'v1.5.1' VERSION = 'v2.0.0'
def clean_outdated(EXT_NAME:str): def clean_outdated(EXT_NAME:str):
with open(scripts.basedir() + '/' + 'ui-config.json', 'r', encoding='utf8') as json_file: with open(scripts.basedir() + '/' + 'ui-config.json', 'r', encoding='utf8') as json_file:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 2.7 KiB