mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-03 02:00:29 +08:00
Mark widgets as advanced across core, comfy_extras, and comfy_api_nodes to support the new collapsible advanced inputs section in the frontend. Changes: - 267 advanced markers in comfy_extras/ - 162 advanced markers in comfy_api_nodes/ - All files pass python3 -m py_compile verification Widgets marked advanced (hidden by default): - Scheduler internals: sigma_max, sigma_min, rho, mu, beta, alpha - Sampler internals: eta, s_noise, order, rtol, atol, h_init, pcoeff, etc. - Memory optimization: tile_size, overlap, temporal_size, temporal_overlap - Pipeline controls: add_noise, start_at_step, end_at_step - Timing controls: start_percent, end_percent - Layer selection: stop_at_clip_layer, layers, block_number - Video encoding: codec, crf, format - Device/dtype: device, noise_device, dtype, weight_dtype Widgets kept basic (always visible): - Core params: strength, steps, cfg, denoise, seed, width, height - Model selectors: ckpt_name, lora_name, vae_name, sampler_name - Common controls: upscale_method, crop, batch_size, fps, opacity Related: frontend PR #11939 Amp-Thread-ID: https://ampcode.com/threads/T-019c1734-6b61-702e-b333-f02c399963fc
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
import nodes
|
|
import folder_paths
|
|
|
|
MAX_RESOLUTION = nodes.MAX_RESOLUTION
|
|
|
|
|
|
class WebcamCapture(nodes.LoadImage):
|
|
SEARCH_ALIASES = ["camera input", "live capture", "camera feed", "snapshot"]
|
|
@classmethod
|
|
def INPUT_TYPES(s):
|
|
return {
|
|
"required": {
|
|
"image": ("WEBCAM", {}),
|
|
"width": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, "advanced": True}),
|
|
"height": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1, "advanced": True}),
|
|
"capture_on_queue": ("BOOLEAN", {"default": True}),
|
|
}
|
|
}
|
|
RETURN_TYPES = ("IMAGE",)
|
|
FUNCTION = "load_capture"
|
|
|
|
CATEGORY = "image"
|
|
|
|
def load_capture(self, image, **kwargs):
|
|
return super().load_image(folder_paths.get_annotated_filepath(image))
|
|
|
|
@classmethod
|
|
def IS_CHANGED(cls, image, width, height, capture_on_queue):
|
|
return super().IS_CHANGED(image)
|
|
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
"WebcamCapture": WebcamCapture,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"WebcamCapture": "Webcam Capture",
|
|
}
|