mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-10 16:27:33 +08:00
Fix default value logic
duh
This commit is contained in:
parent
97b8498fc9
commit
fac894fe1e
6
nodes.py
6
nodes.py
@ -519,7 +519,7 @@ class LatentUpscale:
|
||||
return {"required": { "samples": ("LATENT",), "upscale_method": (s.upscale_methods,),
|
||||
"width": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 64}),
|
||||
"height": ("INT", {"default": 512, "min": 64, "max": MAX_RESOLUTION, "step": 64}),
|
||||
"crop": ("BOOL", {"default": "false", "on": "center", "off": "disabled"}),}}
|
||||
"crop": ("BOOL", {"default": False, "on": "center", "off": "disabled"}),}}
|
||||
RETURN_TYPES = ("LATENT",)
|
||||
FUNCTION = "upscale"
|
||||
|
||||
@ -783,7 +783,7 @@ class KSamplerAdvanced:
|
||||
"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": ("BOOL", {"default": "false", "on": "enable", "off": "disable"}),
|
||||
"return_with_leftover_noise": ("BOOL", {"default": False, "on": "enable", "off": "disable"}),
|
||||
}}
|
||||
|
||||
RETURN_TYPES = ("LATENT",)
|
||||
@ -966,7 +966,7 @@ class ImageScale:
|
||||
return {"required": { "image": ("IMAGE",), "upscale_method": (s.upscale_methods,),
|
||||
"width": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
|
||||
"height": ("INT", {"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
|
||||
"crop": ("BOOL", {"default": "false", "on": "center", "off": "disabled"})}}
|
||||
"crop": ("BOOL", {"default": False, "on": "center", "off": "disabled"})}}
|
||||
RETURN_TYPES = ("IMAGE",)
|
||||
FUNCTION = "upscale"
|
||||
|
||||
|
||||
@ -369,8 +369,8 @@ export const ComfyWidgets = {
|
||||
let defaultVal = true;
|
||||
let defaultOn = "true";
|
||||
let defaultOff = "false";
|
||||
if (inputData[1] && inputData[1].default) {
|
||||
defaultVal = inputData[1].default == "true" ? true : false
|
||||
if (inputData[1] && "default" in inputData[1]) {
|
||||
defaultVal = inputData[1].default
|
||||
}
|
||||
if (inputData[1] && inputData[1].on) {
|
||||
defaultOn = inputData[1].on;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user