Merge branch 'comfyanonymous:master' into fix/secure-combo

This commit is contained in:
Dr.Lt.Data 2023-07-08 17:29:18 +09:00 committed by GitHub
commit 012391d6fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -3,7 +3,6 @@ from PIL import Image, ImageOps
from io import BytesIO from io import BytesIO
import struct import struct
import numpy as np import numpy as np
from comfy.cli_args import args, LatentPreviewMethod from comfy.cli_args import args, LatentPreviewMethod
from comfy.taesd.taesd import TAESD from comfy.taesd.taesd import TAESD
import folder_paths import folder_paths
@ -16,7 +15,13 @@ class LatentPreviewer:
def decode_latent_to_preview_image(self, preview_format, x0): def decode_latent_to_preview_image(self, preview_format, x0):
preview_image = self.decode_latent_to_preview(x0) preview_image = self.decode_latent_to_preview(x0)
preview_image = ImageOps.contain(preview_image, (MAX_PREVIEW_RESOLUTION, MAX_PREVIEW_RESOLUTION), Image.ANTIALIAS)
if hasattr(Image, 'Resampling'):
resampling = Image.Resampling.BILINEAR
else:
resampling = Image.ANTIALIAS
preview_image = ImageOps.contain(preview_image, (MAX_PREVIEW_RESOLUTION, MAX_PREVIEW_RESOLUTION), resampling)
preview_type = 1 preview_type = 1
if preview_format == "JPEG": if preview_format == "JPEG":

View File

@ -369,7 +369,11 @@ export class ComfyApp {
shiftY = w.last_y; shiftY = w.last_y;
if (w.computeSize) { if (w.computeSize) {
shiftY += w.computeSize()[1] + 4; shiftY += w.computeSize()[1] + 4;
} else { }
else if(w.computedHeight) {
shiftY += w.computedHeight;
}
else {
shiftY += LiteGraph.NODE_WIDGET_HEIGHT + 4; shiftY += LiteGraph.NODE_WIDGET_HEIGHT + 4;
} }
} else { } else {

View File

@ -129,6 +129,7 @@ function addMultilineWidget(node, name, opts, app) {
w.y = y; w.y = y;
if (w.type === "customtext") { if (w.type === "customtext") {
y += freeSpace; y += freeSpace;
w.computedHeight = freeSpace - multi.length*4;
} else if (w.computeSize) { } else if (w.computeSize) {
y += w.computeSize()[1] + 4; y += w.computeSize()[1] + 4;
} else { } else {