lint
parent
558fb2e826
commit
39a4aeba45
|
|
@ -1,3 +1,6 @@
|
|||
### v2.3.2 - 2024 Nov.06
|
||||
- Linting *(`internal`)*
|
||||
|
||||
### v2.3.1 - 2024 Nov.04
|
||||
- Implement **Range** Settings
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ class VectorscopeCC {
|
|||
*/
|
||||
static updateCursor(r, g, b, mode) {
|
||||
const mag = Math.abs(r) + Math.abs(g) + Math.abs(b);
|
||||
var condX, condY;
|
||||
let condX, condY;
|
||||
|
||||
if (mag < Number.EPSILON) {
|
||||
condX = 0.0;
|
||||
|
|
@ -44,9 +44,9 @@ class VectorscopeCC {
|
|||
const x = ((e.clientX - rect.left) - 100.0) / 25;
|
||||
const y = ((e.clientY - rect.top) - 100.0) / 25;
|
||||
|
||||
var r = -0.077 * (4.33 * x + 7.5 * y);
|
||||
var g = y / 0.866 + r;
|
||||
var b = x + 0.5 * r + 0.5 * g;
|
||||
let r = -0.077 * (4.33 * x + 7.5 * y);
|
||||
let g = y / 0.866 + r;
|
||||
let b = x + 0.5 * r + 0.5 * g;
|
||||
|
||||
const mag = Math.sqrt(r * r + g * g + b * b);
|
||||
const len = Math.abs(r) + Math.abs(g) + Math.abs(b);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class NoiseMethods:
|
|||
return noise / noise.std()
|
||||
|
||||
|
||||
def RGB_2_CbCr(r: float, g: float, b: float) -> tuple[float, float]:
|
||||
def RGB2CbCr(r: float, g: float, b: float) -> tuple[float, float]:
|
||||
"""Convert RGB channels into YCbCr for SDXL"""
|
||||
cb = -0.17 * r - 0.33 * g + 0.5 * b
|
||||
cr = 0.5 * r - 0.42 * g - 0.08 * b
|
||||
|
|
@ -151,7 +151,7 @@ def cc_callback(self, d):
|
|||
source[i][3] *= sat
|
||||
|
||||
else:
|
||||
cb, cr = RGB_2_CbCr(r, g, b)
|
||||
cb, cr = RGB2CbCr(r, g, b)
|
||||
|
||||
for i in range(batchSize):
|
||||
# Brightness
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ class Param:
|
|||
return round(random.uniform(self.minimum, self.maximum), 2)
|
||||
|
||||
|
||||
Brightness: Param = None
|
||||
Contrast: Param = None
|
||||
Saturation: Param = None
|
||||
Color: Param = None
|
||||
Brightness: Param
|
||||
Contrast: Param
|
||||
Saturation: Param
|
||||
Color: Param
|
||||
|
||||
|
||||
def init():
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@ import os
|
|||
|
||||
|
||||
STYLE_FILE = os.path.join(scripts.basedir(), "styles.json")
|
||||
|
||||
EMPTY_STYLE = {"styles": {}, "deleted": {}}
|
||||
|
||||
|
||||
class StyleManager:
|
||||
|
||||
def __init__(self):
|
||||
self.STYLE_SHEET: dict = None
|
||||
self.STYLE_SHEET: dict = {}
|
||||
|
||||
def load_styles(self):
|
||||
if os.path.isfile(STYLE_FILE):
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from random import seed
|
|||
import gradio as gr
|
||||
|
||||
|
||||
VERSION = "2.3.1"
|
||||
VERSION = "2.3.2"
|
||||
|
||||
|
||||
style_manager = StyleManager()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import numpy as np
|
|||
import cv2 as cv
|
||||
|
||||
|
||||
def _merge_HDR(imgs: list, path: str, depth: str, fmt: str, gamma: float):
|
||||
def mergeHDR(imgs: list, path: str, depth: str, fmt: str, gamma: float):
|
||||
"""https://docs.opencv.org/4.8.0/d2/df0/tutorial_py_hdr.html"""
|
||||
|
||||
import datetime
|
||||
|
|
@ -131,7 +131,7 @@ class VectorHDR(scripts.Script):
|
|||
imgs[it] = proc.images[0]
|
||||
|
||||
if auto:
|
||||
_merge_HDR(imgs, p.outpath_samples, depth, fmt, gamma)
|
||||
mergeHDR(imgs, p.outpath_samples, depth, fmt, gamma)
|
||||
|
||||
baseline.images = imgs
|
||||
return baseline
|
||||
|
|
|
|||
Loading…
Reference in New Issue