Merge branch 'comfyanonymous:master' into bugfix/extra_data

This commit is contained in:
Dr.Lt.Data 2023-07-10 09:15:54 +09:00 committed by GitHub
commit 132550cf30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -11,10 +11,10 @@ class SD15(LatentFormat):
self.scale_factor = scale_factor self.scale_factor = scale_factor
self.latent_rgb_factors = [ self.latent_rgb_factors = [
# R G B # R G B
[0.298, 0.207, 0.208], # L1 [ 0.3512, 0.2297, 0.3227],
[0.187, 0.286, 0.173], # L2 [ 0.3250, 0.4974, 0.2350],
[-0.158, 0.189, 0.264], # L3 [-0.2829, 0.1762, 0.2721],
[-0.184, -0.271, -0.473], # L4 [-0.2120, -0.2616, -0.7177]
] ]
self.taesd_decoder_name = "taesd_decoder.pth" self.taesd_decoder_name = "taesd_decoder.pth"
@ -23,9 +23,9 @@ class SDXL(LatentFormat):
self.scale_factor = 0.13025 self.scale_factor = 0.13025
self.latent_rgb_factors = [ #TODO: these are the factors for SD1.5, need to estimate new ones for SDXL self.latent_rgb_factors = [ #TODO: these are the factors for SD1.5, need to estimate new ones for SDXL
# R G B # R G B
[0.298, 0.207, 0.208], # L1 [ 0.3920, 0.4054, 0.4549],
[0.187, 0.286, 0.173], # L2 [-0.2634, -0.0196, 0.0653],
[-0.158, 0.189, 0.264], # L3 [ 0.0568, 0.1687, -0.0755],
[-0.184, -0.271, -0.473], # L4 [-0.3112, -0.2359, -0.2076]
] ]
self.taesd_decoder_name = "taesdxl_decoder.pth" self.taesd_decoder_name = "taesdxl_decoder.pth"

View File

@ -163,11 +163,12 @@ function addMultilineWidget(node, name, opts, app) {
.multiplySelf(ctx.getTransform()) .multiplySelf(ctx.getTransform())
.translateSelf(margin, margin + y); .translateSelf(margin, margin + y);
const scale = new DOMMatrix().scaleSelf(transform.a, transform.d)
Object.assign(this.inputEl.style, { Object.assign(this.inputEl.style, {
transformOrigin: "0 0", transformOrigin: "0 0",
transform: transform, transform: scale,
left: "0px", left: `${transform.a + transform.e}px`,
top: "0px", top: `${transform.d + transform.f}px`,
width: `${widgetWidth - (margin * 2)}px`, width: `${widgetWidth - (margin * 2)}px`,
height: `${this.parent.inputHeight - (margin * 2)}px`, height: `${this.parent.inputHeight - (margin * 2)}px`,
position: "absolute", position: "absolute",