CivArchive
    ← All articles
    Published November 10, 2024by CManzione

    Clean Temp Folder Custom Node

    76 views1 reactions0 comments on CivitAI2 collected
    space saverresource guidetemp foldertempcomfy

    CREDIT: Rogue_fromearth

    Entry notes

    This custom node implements a temp folder cleaner with the following features:

    1. Takes an image input so it can be added at the end of any workflow

    2. Passes through the image unchanged (allowing for workflow continuation if needed)

    3. Configurable options:

      • Custom temp folder path

      • Option to skip hidden files/folders (default: true)

      • Option to preserve empty folders (default: true)

    4. Error handling for file operations

    5. Progress reporting through console output

    To use this node:

    1. Install via Git or copy all contents in your ComfyUI custom_nodes folder - https://github.com/Roguefromearth/temp_cleaner

    2. Restart ComfyUI

    You can then add the "Temp Folder Cleaner" node at the end of your workflow and connect your image output to it. The node will:

    1. Process any images passed to it

    2. Clear the specified temp folder

    3. Pass the images through unchanged

    Configuration options:

    • temp_folder: Path to the temp folder

    • skip_hidden: Whether to skip hidden files/folders (starting with '.')

    • preserve_folders: Whether to keep empty folders after cleanup