ComfyUI > Nodes > Basic data handling > set extension

ComfyUI Node: set extension

Class Name

Basic data handling: PathSetExtension

Category
Basic/Path
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling 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

set extension Description

PathSetExtension node modifies file extensions for format conversion and naming consistency.

set extension:

The PathSetExtension node is designed to modify the file extension of a given path. This node is particularly useful when you need to change the format of a file by altering its extension, such as converting a .txt file to a .jpg file. By replacing the current extension with a new one, this node simplifies the process of managing file types and ensures consistency in file naming conventions. The node automatically handles the inclusion of the dot in the extension, making it user-friendly and reducing the likelihood of errors. This functionality is essential for workflows that involve file format conversions or when preparing files for specific applications that require particular extensions.

set extension Input Parameters:

path

The path parameter is a string that represents the file path whose extension you wish to change. This parameter is crucial as it specifies the target file whose extension will be modified. There are no specific minimum or maximum values for this parameter, but it should be a valid file path. The node will process the path to identify and replace its current extension.

extension

The extension parameter is a string that specifies the new file extension to be applied to the path. It should include the dot (e.g., .jpg) to ensure proper formatting. If the dot is omitted, the node will automatically add it. The default value for this parameter is .txt, but it can be changed to any valid file extension. This parameter determines the new format of the file, making it a key component in file type conversion processes.

set extension Output Parameters:

path

The path output parameter is a string that represents the modified file path with the new extension. This output is crucial as it provides the updated path that reflects the change in file format. The new path can be used in subsequent operations or saved as needed, ensuring that the file is correctly identified by its new extension.

set extension Usage Tips:

  • Ensure that the extension parameter includes the dot to avoid formatting issues, although the node will add it if missing.
  • Use this node when you need to prepare files for applications that require specific file extensions, ensuring compatibility and proper file handling.
  • Consider using this node in conjunction with other path manipulation nodes to streamline file management tasks in your workflow.

set extension Common Errors and Solutions:

Invalid file path

  • Explanation: The provided path parameter is not a valid file path.
  • Solution: Verify that the path is correctly specified and points to an existing file or intended file location.

Missing or incorrect extension format

  • Explanation: The extension parameter is missing the dot or is incorrectly formatted.
  • Solution: Ensure that the extension includes the dot (e.g., .jpg). The node will add the dot if it's missing, but it's good practice to include it.

Empty path or extension

  • Explanation: Either the path or extension parameter is an empty string.
  • Solution: Provide a valid file path and a non-empty extension to ensure the node functions correctly.

set extension Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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 Models, enabling artists to harness the latest AI tools to create incredible art.

set extension