RFC Discussion: RFC: ComfyUI Training Modules #27
Replies: 3 comments
-
|
Training capability would be great in Comfy! Here's my first thoughts on the rfc:
|
Beta Was this translation helpful? Give feedback.
-
|
I would say this relentlessly aligns with the mission of democratizing AI tooling. No doubt it will fuel engagement in the community and spark interest in ML concepts. There will probably be tutorials released within the first day so I wouldn't worry about complexity. Personally I find the node-based presentation very approachable which takes away my biggest hurdle. |
Beta Was this translation helpful? Give feedback.
-
|
This is now supported: comfyanonymous/ComfyUI#8446 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
RFC Discussion: RFC: ComfyUI Training Modules
Author: @yoland68 | Status: 🟡 Under Review
📋 Quick Links
📄 Current Proposal
RFC: ComfyUI Training Modules
Summary
This RFC proposes the addition of training capabilities to ComfyUI, enabling users to create and fine-tune LoRA (Low-Rank Adaptation) models directly through the ComfyUI interface. The proposal includes a set of node implementations for loading image datasets, training LoRAs, visualizing training progress, and saving trained models.
Basic example
The basic workflow would allow users to:
Load an image dataset:

Train a LoRA on these images:

Save the resulting LoRA:

Visualize training loss:

Motivation
Currently, users who want to create custom LoRA models need to:
Adding training capabilities directly to ComfyUI would:
Detailed design
The implementation consists of four main components:
1. Image Dataset Loading
Two nodes are proposed for loading image datasets:
LoadImageSetNode: Loads individual images selected by the userLoadImageSetFromFolderNode: Loads all images from a specified folderThese nodes offer options for handling images of different sizes (stretch, crop, pad) and prepare the images for training.
2. LoRA Training Node
The
TrainLoraNodeis the core component that handles the training process:The training process:
3. Model Saving Node
The
SaveLoRAnode enables users to save their trained LoRA models:The node saves the LoRA weights in SafeTensors format, with a filename that includes the number of training steps and a timestamp.
4. Training Visualization Node
The
LossGraphNodevisualizes the training progress:This node generates a graph showing the training loss over time, providing visual feedback on the training process.
Supporting Components
The implementation also includes several support classes:
TrainSampler: A custom sampler that performs gradient updates during the sampling processLoraDiffandBiasDiff: Weight wrapper classes that apply LoRA adaptations to model weightsDrawbacks
Adoption strategy
EXPERIMENTAL = Trueflag to indicate the developing nature of the featureUnresolved questions
Implementation Plan
Phase 1: Basic LoRA Training
Initial implementation of the nodes described in this RFC.
Phase 2: Enhanced Features
Phase 3: Workflow Integration
Phase 4: Model Format
Links
Full Rendered Proposal
Discussion Thread
Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.
💬 Discussion Guidelines: Share feedback, concerns, and suggestions below. Use reply threads to keep conversations organized.
Beta Was this translation helpful? Give feedback.
All reactions