From 11459bb550a90ed6e328f1e6f5caa01ac348aca9 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 5 May 2024 18:18:56 +0300 Subject: [PATCH] import error fix --- nodes/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes/nodes.py b/nodes/nodes.py index 1472ec8..f327045 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -9,6 +9,7 @@ import json, re, os, io, time import model_management import folder_paths from nodes import MAX_RESOLUTION +from comfy.utils import common_upscale script_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) folder_paths.add_model_folder_path("kjnodes_fonts", os.path.join(script_directory, "fonts")) @@ -1009,7 +1010,6 @@ class StableZero123_BatchSchedule: CATEGORY = "KJNodes/experimental" def encode(self, clip_vision, init_image, vae, width, height, batch_size, azimuth_points_string, elevation_points_string, interpolation): - from comfy.utils import common_upscale output = clip_vision.encode_image(init_image) pooled = output.image_embeds.unsqueeze(0) pixels = common_upscale(init_image.movedim(-1,1), width, height, "bilinear", "center").movedim(1,-1) @@ -1150,7 +1150,7 @@ https://huggingface.co/stabilityai/sv3d def encode(self, clip_vision, init_image, vae, width, height, batch_size, azimuth_points_string, elevation_points_string, interpolation): output = clip_vision.encode_image(init_image) pooled = output.image_embeds.unsqueeze(0) - pixels = comfy.utils.common_upscale(init_image.movedim(-1,1), width, height, "bilinear", "center").movedim(1,-1) + pixels = common_upscale(init_image.movedim(-1,1), width, height, "bilinear", "center").movedim(1,-1) encode_pixels = pixels[:,:,:,:3] t = vae.encode(encode_pixels)