Files
AlekPet 7d76521a01 update IDENode
+ Implemented features save, rename, remove file code
+ Implemented checking save filename and extensions
+ Update visual style buttons and structure
+ Other smaller feature
+ Update version
2026-05-07 13:15:59 +03:00

2.9 KiB

IDE Node

Screenshot IDE Node

IDE Node is an experimental node that allows you to run code written in Python or Javascript directly in the node, it is also possible to receive input data, which is stored in variables, process and output the result.

Changelog:

  • 2026.04.19: Implemented save, load, rename, remove your code and change visual design

  • 2024.08.28: Implemented add output variables and types

Features:

  • Selecting a syntax highlighting theme
  • Choosing a programming language
  • Load, save, rename, remove your written code
  • Feature add inputs and outputs
  • Feature remove inputs and outputs

Note:

The result variable is used for output The F1 key in the editor brings up additional settings (Default-Keyboard-Shortcuts)

IDE Node workflows

Translate code

The OPUS-MT model is used (https://github.com/Helsinki-NLP/Opus-MT), but others can be used if you adjust the code.

To use, you need to select the required model for your language, here https://huggingface.co/Helsinki-NLP?sort_models=downloads#models (I use "Helsinki-NLP/opus-mt-ru-en", you can change the abbreviations at the end to your own)

Simple example: Screenshot IDE Node Translate OPUS-MT Simple

Workflow example: Screenshot IDE Node Translate OPUS-MT Workflow

Drag image to ComfyUI open workflow: Screenshot Drag image to ComfyUI open workflow

Workflow link: Workflow ai_translate_opus-mt_idenode_workflow.json

Updated version IDENode load code Screenshot IDE Node Load Code

Note: There are two folders python and javascipt along the path ..\custom_nodes\ComfyUI_Custom_Nodes_AlekPet\web_alekpet_nodes\lib\idenode\codes where the json files with the codes are saved. There are also test files add.json.example (remove .example for them to work).

Format JSON codes:

{
  "language": "python",
  "inputs": [
    { "name": "a", "type": "*" },
    { "name": "b", "type": "*" }
  ],
  "outputs": [{ "name": "result", "type": "*" }],
  "code": "result = a + b"
}

Properties: language - python or javascript inputs - inputs (name and type) outputs - outputs (name and type) code - the code itself