diff --git a/README.md b/README.md index 4a5d778..00e12c3 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ This custom node helps to conveniently enhance images through Detector, Detailer * CoreMLDetailerHookProvider - CoreML supports only 512x512, 512x768, 768x512, 768x768 size sampling. CoreMLDetailerHookProvider precisely fixes the upscale of the crop_region to this size. When using this hook, it will always be selected size, regardless of the guide_size. However, if the guide_size is too small, skipping will occur. * DetailerHookCombine - This is used to connect two DETAILER_HOOKs. Similar to PixelKSampleHookCombine. -* Iterative Upscale (Latent) - The upscaler takes the input upscaler and splits the scale_factor into steps, then iteratively performs upscaling. +* Iterative Upscale (Latent/on Pixel Space) - The upscaler takes the input upscaler and splits the scale_factor into steps, then iteratively performs upscaling. This takes latent as input and outputs latent as the result. * Iterative Upscale (Image) - The upscaler takes the input upscaler and splits the scale_factor into steps, then iteratively performs upscaling. This takes image as input and outputs image as the result. * Internally, this node uses 'Iterative Upscale (Latent)'. diff --git a/__init__.py b/__init__.py index 33983d1..4bc6ce6 100644 --- a/__init__.py +++ b/__init__.py @@ -352,7 +352,7 @@ NODE_DISPLAY_NAME_MAPPINGS = { "EditDetailerPipe": "Edit DetailerPipe", "LatentPixelScale": "Latent Scale (on Pixel Space)", - "IterativeLatentUpscale": "Iterative Upscale (Latent)", + "IterativeLatentUpscale": "Iterative Upscale (Latent/on Pixel Space)", "IterativeImageUpscale": "Iterative Upscale (Image)", "TwoSamplersForMaskUpscalerProvider": "TwoSamplersForMask Upscaler Provider", diff --git a/modules/impact/config.py b/modules/impact/config.py index ea71448..d39434c 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import configparser import os -version = "V4.50" +version = "V4.50.1" dependency_version = 19 diff --git a/modules/impact/impact_pack.py b/modules/impact/impact_pack.py index 2b246f9..1d3676d 100644 --- a/modules/impact/impact_pack.py +++ b/modules/impact/impact_pack.py @@ -180,6 +180,10 @@ class DetailerForEach: def do_detail(image, segs, model, clip, vae, guide_size, guide_size_for_bbox, max_size, seed, steps, cfg, sampler_name, scheduler, positive, negative, denoise, feather, noise_mask, force_inpaint, wildcard_opt=None, detailer_hook=None, refiner_ratio=None, refiner_model=None, refiner_clip=None, refiner_positive=None, refiner_negative=None, cycle=1): + + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: DetailerForEach does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + image = image.clone() enhanced_alpha_list = [] enhanced_list = [] @@ -319,6 +323,9 @@ class DetailerForEachPipe: denoise, feather, noise_mask, force_inpaint, basic_pipe, wildcard, refiner_ratio=None, detailer_hook=None, refiner_basic_pipe_opt=None, cycle=1): + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: DetailerForEach does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + model, clip, vae, positive, negative = basic_pipe if refiner_basic_pipe_opt is None: @@ -1251,6 +1258,9 @@ class MaskDetailerPipe: feather, crop_factor, drop_size, refiner_ratio, batch_size, cycle=1, refiner_basic_pipe_opt=None, detailer_hook=None): + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: MaskDetailer does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + model, clip, vae, positive, negative = basic_pipe if refiner_basic_pipe_opt is None: @@ -1309,6 +1319,9 @@ class DetailerForEachTest(DetailerForEach): scheduler, positive, negative, denoise, feather, noise_mask, force_inpaint, wildcard, detailer_hook=None, cycle=1): + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: DetailerForEach does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + enhanced_img, cropped, cropped_enhanced, cropped_enhanced_alpha, cnet_pil_list, new_segs = \ DetailerForEach.do_detail(image, segs, model, clip, vae, guide_size, guide_size_for, max_size, seed, steps, cfg, sampler_name, scheduler, positive, negative, denoise, feather, noise_mask, @@ -1343,6 +1356,9 @@ class DetailerForEachTestPipe(DetailerForEachPipe): denoise, feather, noise_mask, force_inpaint, basic_pipe, wildcard, cycle=1, refiner_ratio=None, detailer_hook=None, refiner_basic_pipe_opt=None): + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: DetailerForEach does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + model, clip, vae, positive, negative = basic_pipe if refiner_basic_pipe_opt is None: diff --git a/modules/impact/segs_nodes.py b/modules/impact/segs_nodes.py index c851750..739e480 100644 --- a/modules/impact/segs_nodes.py +++ b/modules/impact/segs_nodes.py @@ -107,6 +107,9 @@ class SEGSDetailer: denoise, noise_mask, force_inpaint, basic_pipe, refiner_ratio=None, batch_size=1, cycle=1, refiner_basic_pipe_opt=None): + if len(image) > 1: + raise Exception('[Impact Pack] ERROR: SEGSDetailer does not allow image batches.\nPlease refer to https://github.com/ltdrdata/ComfyUI-extension-tutorials/blob/Main/ComfyUI-Impact-Pack/tutorial/batching-detailer.md for more information.') + segs, cnet_pil_list = SEGSDetailer.do_detail(image, segs, guide_size, guide_size_for, max_size, seed, steps, cfg, sampler_name, scheduler, denoise, noise_mask, force_inpaint, basic_pipe, refiner_ratio, batch_size, cycle=cycle, refiner_basic_pipe_opt=refiner_basic_pipe_opt) @@ -224,8 +227,8 @@ class SEGSPaste: segs = core.segs_scale_match(segs, image.shape) result = None - for i in range(image.shape[0]): - image_i = image[i].unsqueeze(0).clone() + for i, single_image in enumerate(image): + image_i = single_image.unsqueeze(0).clone() for seg in segs[1]: ref_image = None