# Core PyTorch dependencies torch>=2.0.0 torchvision>=0.15.0 torchaudio>=2.0.0 # Essential ML dependencies numpy>=1.24.0 scipy>=1.11.0 scikit-learn>=1.3.0 # Utility dependencies tqdm>=4.64.0 pyyaml>=6.0.0 packaging>=23.1 # For configuration management coqpit>=0.0.16 # For data handling h5py # Optional but commonly used transformers>=4.33.0 einops>=0.6.0
[](https://www.gnu.org/licenses/agpl-3.0)
[](https://pytorch.org/)
[](https://www.python.org/)
A comprehensive collection of PyTorch nodes for ComfyUI, enabling advanced machine learning workflows with neural network training, inference, and data manipulation capabilities.
cd ComfyUI/custom_nodes
git clone https://github.com/TashaSkyUp/EternalKernelPyTorchNodes.git
cd EternalKernelPyTorchNodes
pip install -r requirements.txt
requirements.txt for full listPyTorchDatasetDownloader – Download popular ML datasetsDatasetSplitter – Split datasets into train/test/validationTensorsToDataset – Create datasets from tensor collectionsDatasetToDataloader – Generate DataLoaders with batchingAddLinearLayerNode – Fully connected layersAddConvLayer – Convolutional layers with customizable parametersAddBatchNormLayer – Batch normalization for stable trainingAddDropoutLayer – Regularization through dropoutAddTransformerLayer – Modern attention-based layersAddReshapeLayer – Dynamic tensor reshapingSequentialModelProvider – Build sequential neural networksPyTorchInferenceNode – Run inference on trained modelsTrainModel – Complete training loops with optimizationGridSearchTraining – Automated hyperparameter tuningSaveModel / LoadModel – Model persistence with metadataFlattenTensor – Flatten multi-dimensional tensorsReshapeTensor – Reshape tensors to desired dimensionsSliceTensor – Extract tensor slices and subsetsChangeTensorType – Convert between tensor data typesPyTorchToDevice – Move tensors between CPU/GPURandomTensor – Generate random tensors for testingExtractLayersAsModel – Extract sublayers as standalone modelsAddModelAsLayer – Embed existing models as layersSetModelTrainable – Freeze/unfreeze model parametersFuncModifyModel – Apply custom functions to modelsPlotSeriesString – Visualize training metricsCreate and train a neural network with just a few nodes:
Automatically find the best hyperparameters for your model with the GridSearchTraining node.
Seamlessly convert between ComfyUI images and PyTorch tensors for ML processing in your workflows.
Run the comprehensive test suite:
cd EternalKernelPyTorchNodes
python -m pytest tests/ -v
Tests cover all node functionality, model training/inference, tensor operations, and GPU/CPU compatibility.
Contributions welcome! Please:
GNU Affero General Public License v3.0 – see LICENSE file for details.
Built for the ComfyUI community, powered by PyTorch.
Made with ❤️ for the ComfyUI and PyTorch communities
For support: GitHub Issues