ComfyUI > Nodes > ComfyUI > Float

ComfyUI Node: Float

Class Name

PrimitiveFloat

Category
utils/primitive
Author
ComfyAnonymous (Account age: 872days)
Extension
ComfyUI
Latest Updated
2025-05-13
Github Stars
76.71K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Float Description

Handle floating-point numbers within a specified range for AI art projects.

Float:

The PrimitiveFloat node is designed to handle floating-point numbers within a specified range, providing a flexible and precise way to work with numerical data in your AI art projects. This node is particularly useful when you need to input or manipulate decimal values, offering a straightforward method to incorporate floating-point numbers into your workflows. By allowing you to define a float value, the PrimitiveFloat node ensures that your numerical inputs are accurately processed, which is essential for tasks that require precision, such as adjusting parameters in generative models or fine-tuning effects in digital art. Its primary function is to take a float input and return it, making it a simple yet powerful tool for managing numerical data.

Float Input Parameters:

value

The value parameter is the core input for the PrimitiveFloat node, representing the floating-point number you wish to work with. This parameter accepts any float value within the range defined by the system's maximum and minimum size, which is typically from -sys.maxsize to sys.maxsize. This wide range allows for great flexibility in the values you can input, accommodating both very large and very small numbers. The value parameter is crucial as it directly influences the node's output, ensuring that the precise float you input is the one that gets processed and returned. This parameter does not have a default value, meaning you must specify a float value for the node to function.

Float Output Parameters:

value

The output parameter, also named value, is the float number that the node returns after processing the input. This output is significant because it allows you to pass the exact float value you input through the node, ensuring that your numerical data remains consistent and accurate throughout your workflow. The value output is essential for tasks that require precise numerical manipulation, as it guarantees that the float you input is the same one you receive as output, without any alteration or loss of precision.

Float Usage Tips:

  • Ensure that the float value you input is within the acceptable range of -sys.maxsize to sys.maxsize to avoid errors and ensure accurate processing.
  • Use the PrimitiveFloat node when you need to handle precise decimal values in your AI art projects, such as adjusting model parameters or fine-tuning effects.
  • Consider the precision required for your task; if you need very high precision, ensure your input value reflects that level of detail.

Float Common Errors and Solutions:

ValueError: Input value is out of range

  • Explanation: This error occurs when the float value you input exceeds the allowable range of -sys.maxsize to sys.maxsize.
  • Solution: Check the value you are inputting and ensure it falls within the specified range. Adjust the value accordingly to fit within the limits.

TypeError: Input value is not a float

  • Explanation: This error happens when the input provided is not a float, which is the expected data type for this node.
  • Solution: Verify that the input value is indeed a float. If it's not, convert it to a float before inputting it into the node.

Float Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.