mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-05 03:32:37 +00:00
readme extras for VRAM for
added missing packages to requirements for #74 add support for negative numbers in X/Y plot (plus ranges) #73 changed progressbar to work properly with custom modes
This commit is contained in:
@@ -9,6 +9,7 @@ from modules import images
|
||||
from modules.processing import process_images, Processed
|
||||
from modules.shared import opts, cmd_opts, state
|
||||
import modules.sd_samplers
|
||||
import re
|
||||
|
||||
|
||||
def apply_field(field):
|
||||
@@ -89,6 +90,8 @@ def draw_xy_grid(xs, ys, x_label, y_label, cell):
|
||||
return first_pocessed
|
||||
|
||||
|
||||
re_range = re.compile(r"\s*([+-]?\s*\d+)\s*-\s*([+-]?\s*\d+)(?:\s*\(([+-]\d+)\s*\))?\s*")
|
||||
|
||||
class Script(scripts.Script):
|
||||
def title(self):
|
||||
return "X/Y plot"
|
||||
@@ -118,11 +121,13 @@ class Script(scripts.Script):
|
||||
valslist_ext = []
|
||||
|
||||
for val in valslist:
|
||||
if "-" in val:
|
||||
s = val.split("-")
|
||||
start = int(s[0])
|
||||
end = int(s[1])+1
|
||||
step = 1 if len(s) < 3 else int(s[2])
|
||||
m = re_range.fullmatch(val)
|
||||
if m is not None:
|
||||
|
||||
start = int(m.group(1))
|
||||
end = int(m.group(2))+1
|
||||
step = int(m.group(3)) if m.group(3) is not None else 1
|
||||
|
||||
valslist_ext += list(range(start, end, step))
|
||||
else:
|
||||
valslist_ext.append(val)
|
||||
|
Reference in New Issue
Block a user