Nodes Browser
ComfyDeploy: How ComfyUI-Pt-Wrapper works in ComfyUI?
What is ComfyUI-Pt-Wrapper?
PyTorch extension for ComfyUI featuring extensive PyTorch wrapper nodes for seamless tensor operations and PyTorch model training.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-Pt-Wrapper
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Update (3/26/2025)
LSTM & GRU support has been added.
Check out new example workflows at examples/workflows/lstm_classification.json
& examples/workflows/gru_classification.json
. Both of them achieve approximately 87% validation accuracy for IMDB sentiment classification (which is in the expected range for LSTM & GRU).
ComfyUI-Pt-Wrapper
ComfyUI-Pt-Wrapper is a spin-off of ComfyUI-Data-Analysis, designed as a dedicated extension for PyTorch wrapper nodes originally included in the analysis extension.
This extension provides a comprehensive set of nodes for direct operations on PyTorch tensors, along with specialized nodes for machine learning tasks like ResNet.
If you need access to PyTorch's low-level methods (e.g., add
, div
, max
, where
, scatter
, gather
) to manipulate tensors or extract information—or if you're comfortable with ComfyUI and want to explore foundational PyTorch methods —this extension is for you.
You can train an image classification model using your own image data without writing any code.
Check out this tutorial on classifying dogs and cats.
For visualization or analysis features, install ComfyUI-Data-Analysis as well.
The workflow directory offers user-friendly example workflows for training a high-performing ResNet model on CIFAR-10. One example achieved 94.34% accuracy on the validation set. While not a state-of-the-art metric, it provides a solid starting point for customizing the workflow to your needs.
ResNet model
Getting Started
If you're interested in direct operations on PyTorch tensors, check out the Node Reference to explore the available nodes and see what operations are supported.
If you want to learn PyTorch model training, start with the Model Training Documentation.
Contribution
🚫 This project does not accept pull requests.
Unsolicited PRs will be closed without review.
If you have a feature request or improvement suggestion, please create an Issue instead.
All submitted issues will be reviewed and prioritized accordingly.