DetailerDebug (SEGS/pipe)¶
Documentation¶
- Class name:
DetailerForEachDebugPipe
- Category:
ImpactPack/Detailer
- Output node:
False
The DetailerForEachDebugPipe node is designed for debugging purposes within the SEGS/pipe framework. It provides detailed insights and diagnostics for each processing step, facilitating the identification and resolution of issues in the pipeline.
Input types¶
Required¶
image
- unknown
- Comfy dtype:
IMAGE
- Python dtype:
unknown
segs
- unknown
- Comfy dtype:
SEGS
- Python dtype:
unknown
guide_size
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
guide_size_for
- unknown
- Comfy dtype:
BOOLEAN
- Python dtype:
unknown
max_size
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
seed
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
steps
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
cfg
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
sampler_name
- unknown
- Comfy dtype:
COMBO[STRING]
- Python dtype:
unknown
scheduler
- unknown
- Comfy dtype:
COMBO[STRING]
- Python dtype:
unknown
denoise
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
feather
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
noise_mask
- unknown
- Comfy dtype:
BOOLEAN
- Python dtype:
unknown
force_inpaint
- unknown
- Comfy dtype:
BOOLEAN
- Python dtype:
unknown
basic_pipe
- unknown
- Comfy dtype:
BASIC_PIPE
- Python dtype:
unknown
wildcard
- unknown
- Comfy dtype:
STRING
- Python dtype:
unknown
refiner_ratio
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
cycle
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
Optional¶
detailer_hook
- unknown
- Comfy dtype:
DETAILER_HOOK
- Python dtype:
unknown
refiner_basic_pipe_opt
- unknown
- Comfy dtype:
BASIC_PIPE
- Python dtype:
unknown
inpaint_model
- unknown
- Comfy dtype:
BOOLEAN
- Python dtype:
unknown
noise_mask_feather
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
scheduler_func_opt
- unknown
- Comfy dtype:
SCHEDULER_FUNC
- Python dtype:
unknown
Output types¶
image
- Comfy dtype:
IMAGE
- unknown
- Python dtype:
unknown
- Comfy dtype:
segs
- Comfy dtype:
SEGS
- unknown
- Python dtype:
unknown
- Comfy dtype:
basic_pipe
- Comfy dtype:
BASIC_PIPE
- unknown
- Python dtype:
unknown
- Comfy dtype:
cropped
- Comfy dtype:
IMAGE
- unknown
- Python dtype:
unknown
- Comfy dtype:
cropped_refined
- Comfy dtype:
IMAGE
- unknown
- Python dtype:
unknown
- Comfy dtype:
cropped_refined_alpha
- Comfy dtype:
IMAGE
- unknown
- Python dtype:
unknown
- Comfy dtype:
cnet_images
- Comfy dtype:
IMAGE
- unknown
- Python dtype:
unknown
- Comfy dtype:
Usage tips¶
- Infra type:
CPU
- Common nodes:
Source code¶
class DetailerForEachTestPipe(DetailerForEachPipe):
RETURN_TYPES = ("IMAGE", "SEGS", "BASIC_PIPE", "IMAGE", "IMAGE", "IMAGE", "IMAGE", )
RETURN_NAMES = ("image", "segs", "basic_pipe", "cropped", "cropped_refined", "cropped_refined_alpha", 'cnet_images')
OUTPUT_IS_LIST = (False, False, False, True, True, True, True)
FUNCTION = "doit"
CATEGORY = "ImpactPack/Detailer"
def doit(self, image, segs, guide_size, guide_size_for, max_size, seed, steps, cfg, sampler_name, scheduler,
denoise, feather, noise_mask, force_inpaint, basic_pipe, wildcard, cycle=1,
refiner_ratio=None, detailer_hook=None, refiner_basic_pipe_opt=None, inpaint_model=False, noise_mask_feather=0, scheduler_func_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:
refiner_model, refiner_clip, refiner_positive, refiner_negative = None, None, None, None
else:
refiner_model, refiner_clip, _, refiner_positive, refiner_negative = refiner_basic_pipe_opt
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,
force_inpaint, wildcard, detailer_hook,
refiner_ratio=refiner_ratio, refiner_model=refiner_model,
refiner_clip=refiner_clip, refiner_positive=refiner_positive,
refiner_negative=refiner_negative,
cycle=cycle, inpaint_model=inpaint_model, noise_mask_feather=noise_mask_feather, scheduler_func_opt=scheduler_func_opt)
# set fallback image
if len(cropped) == 0:
cropped = [empty_pil_tensor()]
if len(cropped_enhanced) == 0:
cropped_enhanced = [empty_pil_tensor()]
if len(cropped_enhanced_alpha) == 0:
cropped_enhanced_alpha = [empty_pil_tensor()]
if len(cnet_pil_list) == 0:
cnet_pil_list = [empty_pil_tensor()]
return enhanced_img, new_segs, basic_pipe, cropped, cropped_enhanced, cropped_enhanced_alpha, cnet_pil_list