Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c0a0c4c26 | |||
| 7dfe959f4b | |||
| 8f64dad282 | |||
| 821adc3041 | |||
| e2b177c508 | |||
| e837124f4b | |||
| 3fdc3cfbbf | |||
| e9809de651 | |||
| 61f6479ea9 |
@@ -1,3 +1,13 @@
|
|||||||
|
## 1.9.3
|
||||||
|
|
||||||
|
### Bug Fixes:
|
||||||
|
* fix get_crop_region_v2 ([#15594](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15594))
|
||||||
|
|
||||||
|
## 1.9.2
|
||||||
|
|
||||||
|
### Extensions and API:
|
||||||
|
* restore 1.8.0-style naming of scripts
|
||||||
|
|
||||||
## 1.9.1
|
## 1.9.1
|
||||||
|
|
||||||
### Minor:
|
### Minor:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from modules import scripts
|
from modules import scripts
|
||||||
from modules.shared import opts
|
from modules.shared import opts
|
||||||
|
|
||||||
xyz_grid = [x for x in scripts.scripts_data if x.script_class.__module__ == "scripts.xyz_grid"][0].module
|
xyz_grid = [x for x in scripts.scripts_data if x.script_class.__module__ == "xyz_grid.py"][0].module
|
||||||
|
|
||||||
def int_applier(value_name:str, min_range:int = -1, max_range:int = -1):
|
def int_applier(value_name:str, min_range:int = -1, max_range:int = -1):
|
||||||
"""
|
"""
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ def get_crop_region_v2(mask, pad=0):
|
|||||||
mask = mask if isinstance(mask, Image.Image) else Image.fromarray(mask)
|
mask = mask if isinstance(mask, Image.Image) else Image.fromarray(mask)
|
||||||
if box := mask.getbbox():
|
if box := mask.getbbox():
|
||||||
x1, y1, x2, y2 = box
|
x1, y1, x2, y2 = box
|
||||||
return max(x1 - pad, 0), max(y1 - pad, 0), min(x2 + pad, mask.size[0]), min(y2 + pad, mask.size[1]) if pad else box
|
return (max(x1 - pad, 0), max(y1 - pad, 0), min(x2 + pad, mask.size[0]), min(y2 + pad, mask.size[1])) if pad else box
|
||||||
|
|
||||||
|
|
||||||
def get_crop_region(mask, pad=0):
|
def get_crop_region(mask, pad=0):
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ loaded_scripts = {}
|
|||||||
|
|
||||||
|
|
||||||
def load_module(path):
|
def load_module(path):
|
||||||
module_name, _ = os.path.splitext(os.path.basename(path))
|
module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path)
|
||||||
full_module_name = "scripts." + module_name
|
|
||||||
module_spec = importlib.util.spec_from_file_location(full_module_name, path)
|
|
||||||
module = importlib.util.module_from_spec(module_spec)
|
module = importlib.util.module_from_spec(module_spec)
|
||||||
module_spec.loader.exec_module(module)
|
module_spec.loader.exec_module(module)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user