PixelKSampleUpscalerProvider¶
Documentation¶
- Class name:
PixelKSampleUpscalerProvider
- Category:
ImpactPack/Upscale
- Output node:
False
This node serves as a provider for pixel-wise K-sample upscaling, facilitating the enhancement of image resolution through advanced sampling techniques. It acts as a foundational component in image processing pipelines, offering a method to upscale images with high fidelity.
Input types¶
Required¶
scale_method
- unknown
- Comfy dtype:
COMBO[STRING]
- Python dtype:
unknown
model
- unknown
- Comfy dtype:
MODEL
- Python dtype:
unknown
vae
- unknown
- Comfy dtype:
VAE
- 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
positive
- unknown
- Comfy dtype:
CONDITIONING
- Python dtype:
unknown
negative
- unknown
- Comfy dtype:
CONDITIONING
- Python dtype:
unknown
denoise
- unknown
- Comfy dtype:
FLOAT
- Python dtype:
unknown
use_tiled_vae
- unknown
- Comfy dtype:
BOOLEAN
- Python dtype:
unknown
tile_size
- unknown
- Comfy dtype:
INT
- Python dtype:
unknown
Optional¶
upscale_model_opt
- unknown
- Comfy dtype:
UPSCALE_MODEL
- Python dtype:
unknown
pk_hook_opt
- unknown
- Comfy dtype:
PK_HOOK
- Python dtype:
unknown
Output types¶
upscaler
- Comfy dtype:
UPSCALER
- unknown
- Python dtype:
unknown
- Comfy dtype:
Usage tips¶
- Infra type:
GPU
- Common nodes:
Source code¶
class PixelKSampleUpscalerProvider:
upscale_methods = ["nearest-exact", "bilinear", "lanczos", "area"]
@classmethod
def INPUT_TYPES(s):
return {"required": {
"scale_method": (s.upscale_methods,),
"model": ("MODEL",),
"vae": ("VAE",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0}),
"sampler_name": (comfy.samplers.KSampler.SAMPLERS, ),
"scheduler": (comfy.samplers.KSampler.SCHEDULERS, ),
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ),
"denoise": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}),
"use_tiled_vae": ("BOOLEAN", {"default": False, "label_on": "enabled", "label_off": "disabled"}),
"tile_size": ("INT", {"default": 512, "min": 320, "max": 4096, "step": 64}),
},
"optional": {
"upscale_model_opt": ("UPSCALE_MODEL", ),
"pk_hook_opt": ("PK_HOOK", ),
}
}
RETURN_TYPES = ("UPSCALER",)
FUNCTION = "doit"
CATEGORY = "ImpactPack/Upscale"
def doit(self, scale_method, model, vae, seed, steps, cfg, sampler_name, scheduler, positive, negative, denoise,
use_tiled_vae, upscale_model_opt=None, pk_hook_opt=None, tile_size=512):
upscaler = core.PixelKSampleUpscaler(scale_method, model, vae, seed, steps, cfg, sampler_name, scheduler,
positive, negative, denoise, use_tiled_vae, upscale_model_opt, pk_hook_opt,
tile_size=tile_size)
return (upscaler, )