mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
Merge 833af5f3aa into a60b7b86c5
This commit is contained in:
commit
08c927b8cd
32
nodes.py
32
nodes.py
@ -1575,6 +1575,36 @@ class KSamplerAdvanced:
|
|||||||
disable_noise = True
|
disable_noise = True
|
||||||
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
|
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
|
||||||
|
|
||||||
|
class KSamplerBoolean:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {"required":
|
||||||
|
{"model": ("MODEL",),
|
||||||
|
"add_noise": ("BOOLEAN", {"default": True}),
|
||||||
|
"noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}),
|
||||||
|
"steps": ("INT", {"default": 20, "min": 1, "max": 10000}),
|
||||||
|
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}),
|
||||||
|
"sampler_name": (comfy.samplers.KSampler.SAMPLERS, ),
|
||||||
|
"scheduler": (comfy.samplers.KSampler.SCHEDULERS, ),
|
||||||
|
"positive": ("CONDITIONING", ),
|
||||||
|
"negative": ("CONDITIONING", ),
|
||||||
|
"latent_image": ("LATENT", ),
|
||||||
|
"start_at_step": ("INT", {"default": 0, "min": 0, "max": 10000}),
|
||||||
|
"end_at_step": ("INT", {"default": 10000, "min": 0, "max": 10000}),
|
||||||
|
"return_with_leftover_noise": ("BOOLEAN", {"default": False}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = ("LATENT",)
|
||||||
|
FUNCTION = "sample"
|
||||||
|
|
||||||
|
CATEGORY = "sampling"
|
||||||
|
|
||||||
|
def sample(self, model, add_noise, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0):
|
||||||
|
force_full_denoise = not return_with_leftover_noise
|
||||||
|
disable_noise = not add_noise
|
||||||
|
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
|
||||||
|
|
||||||
class SaveImage:
|
class SaveImage:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.output_dir = folder_paths.get_output_directory()
|
self.output_dir = folder_paths.get_output_directory()
|
||||||
@ -2000,6 +2030,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"ConditioningSetAreaStrength": ConditioningSetAreaStrength,
|
"ConditioningSetAreaStrength": ConditioningSetAreaStrength,
|
||||||
"ConditioningSetMask": ConditioningSetMask,
|
"ConditioningSetMask": ConditioningSetMask,
|
||||||
"KSamplerAdvanced": KSamplerAdvanced,
|
"KSamplerAdvanced": KSamplerAdvanced,
|
||||||
|
"KSamplerBoolean": KSamplerBoolean,
|
||||||
"SetLatentNoiseMask": SetLatentNoiseMask,
|
"SetLatentNoiseMask": SetLatentNoiseMask,
|
||||||
"LatentComposite": LatentComposite,
|
"LatentComposite": LatentComposite,
|
||||||
"LatentBlend": LatentBlend,
|
"LatentBlend": LatentBlend,
|
||||||
@ -2041,6 +2072,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
# Sampling
|
# Sampling
|
||||||
"KSampler": "KSampler",
|
"KSampler": "KSampler",
|
||||||
"KSamplerAdvanced": "KSampler (Advanced)",
|
"KSamplerAdvanced": "KSampler (Advanced)",
|
||||||
|
"KSamplerBoolean": "KSampler (Boolean)",
|
||||||
# Loaders
|
# Loaders
|
||||||
"CheckpointLoader": "Load Checkpoint With Config (DEPRECATED)",
|
"CheckpointLoader": "Load Checkpoint With Config (DEPRECATED)",
|
||||||
"CheckpointLoaderSimple": "Load Checkpoint",
|
"CheckpointLoaderSimple": "Load Checkpoint",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user