From 72da89cb2b5283089b3395279edea96928ccf257 Mon Sep 17 00:00:00 2001 From: ComfyUI Wiki Date: Wed, 18 Jun 2025 00:24:21 +0800 Subject: [PATCH 1/2] Save draft --- .../docs/TrainLoRANode/en.md | 59 ++++++++ .../docs/TrainLoRANode/zh.md | 127 ++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 comfyui_embedded_docs/docs/TrainLoRANode/en.md create mode 100644 comfyui_embedded_docs/docs/TrainLoRANode/zh.md diff --git a/comfyui_embedded_docs/docs/TrainLoRANode/en.md b/comfyui_embedded_docs/docs/TrainLoRANode/en.md new file mode 100644 index 0000000..55ef8b8 --- /dev/null +++ b/comfyui_embedded_docs/docs/TrainLoRANode/en.md @@ -0,0 +1,59 @@ +# Train LoRA Node in ComfyUI: Multiple Image Handling and Functionalities + +## Multiple Image Input Handling + +The Train LoRA Node in ComfyUI handles multiple image inputs through a sophisticated batch processing system. The node accepts latent representations of images through the `latents` input parameter, which contains batched latent tensors with the batch dimension representing multiple images. + +During training, the node implements random sampling from the image batch for each training step. It uses `torch.randperm(num_images)[:batch_size]` to randomly select a subset of images from the total dataset for each iteration. This approach provides data augmentation and prevents overfitting by ensuring the model sees different combinations of training images across steps. + +The image loading pipeline supports multiple input methods through companion nodes like `LoadImageSetNode` and `LoadImageSetFromFolderNode`. These nodes include sophisticated image processing capabilities with multiple resize methods (None, Stretch, Crop, Pad) to handle images of different dimensions. + +## Core Functionalities + +The Train LoRA Node implements a complete LoRA (Low-Rank Adaptation) training system with the following core functionalities: + +### Model Adaptation System +The node automatically identifies and adapts weight-enabled layers in the model, creating LoRA adapters for layers with 2D or higher dimensional weights. For layers with smaller weight dimensions, it uses bias difference modules. + +### Training Infrastructure +The training process uses a custom `TrainSampler` that integrates with ComfyUI's sampling system. It implements gradient computation, loss calculation, and optimizer steps within the sampling framework. + +### Memory Management +The node includes gradient checkpointing functionality to reduce memory usage during training. It patches model modules during training and unpatches them afterward to maintain memory efficiency. + +## Detailed Features + +### Training Configuration Options +The node offers extensive configuration options: + +- **Optimizers**: Support for AdamW, Adam, SGD, and RMSprop optimizers +- **Loss Functions**: Multiple loss function options including MSE, L1, Huber, and SmoothL1 +- **Training Parameters**: Configurable batch size, training steps, learning rate, and LoRA rank +- **Data Types**: Support for both bf16 and fp32 training and LoRA data types + +### Continuation Training Support +The node supports continuing training from existing LoRA weights, allowing incremental training and fine-tuning. It can load existing LoRA weights and extract the previous training step count from the filename. + +### Output and Monitoring +The node provides comprehensive outputs including: +- The trained model with LoRA applied +- Standalone LoRA weights for reuse +- Loss tracking data for monitoring training progress +- Total training step count including continuation steps + +### Progress Tracking and Visualization +Real-time loss tracking is implemented with callback functions that update progress bars and collect loss values. The system includes a companion `LossGraphNode` for visualizing training progress. + +## Integration with ComfyUI Ecosystem + +The Train LoRA Node integrates seamlessly with other ComfyUI components: + +### LoRA Weight Management +The trained LoRA weights can be saved using the `SaveLoRA` node and loaded back into models using the `LoraModelLoader` node. + +### Weight Adapter System +The node leverages ComfyUI's weight adapter system, specifically the LoRA adapter implementation, which supports multiple LoRA formats and provides efficient weight calculation during inference. + +## Notes + +The Train LoRA Node represents a comprehensive LoRA training solution within ComfyUI, designed for both beginners and advanced users. It handles the complexities of batch processing, memory management, and training optimization while providing flexibility through extensive configuration options. The node's integration with ComfyUI's existing infrastructure ensures compatibility with various model types and workflows. The multiple image input handling through random batch sampling provides effective data augmentation, making it suitable for training on diverse image datasets. diff --git a/comfyui_embedded_docs/docs/TrainLoRANode/zh.md b/comfyui_embedded_docs/docs/TrainLoRANode/zh.md new file mode 100644 index 0000000..973d1be --- /dev/null +++ b/comfyui_embedded_docs/docs/TrainLoRANode/zh.md @@ -0,0 +1,127 @@ +## TrainLoRANode(LoRA训练节点) + +### 功能描述 +这个节点就像是一位专业的美术老师,能够根据你提供的范例作品(训练图片)来学习和掌握特定的绘画风格或技巧。通过这个节点,你可以让AI模型学习新的创作风格,而且学习过程完全在ComfyUI界面中进行。 + +### 工作原理 +想象一下教一个绘画学生学习新的绘画技巧: + +1. **准备课程材料**: + - 就像准备示范作品一样,你需要准备训练用的图片 + - 使用 `LoadImageSetNode` 或 `LoadImageSetFromFolderNode` 来加载这些图片 + - 通过VAE编码节点将图片转换为模型可以理解的格式 + +2. **学习过程**: + - 就像学生通过反复练习来掌握技巧,模型也通过多次迭代来学习 + - 每次练习都会对比自己的作品和示范作品的差异,然后调整技巧 + - 这个过程通过特殊的 `TrainSampler` 来实现,它负责计算差异并指导模型改进 + +### 输入 + +| 参数名称 | 数据类型 | 输入方式 | 默认值 | 取值范围 | 功能说明 | +|----------|----------|----------|---------|----------|----------| +| `model` | MODEL | 必填 | - | - | 要训练的基础模型,就像选择要培训的学生 | +| `latents` | LATENT | 必填 | - | - | 编码后的训练图片,相当于教学用的范例作品 | +| `positive` | CONDITIONING | 必填 | - | - | 文本描述,就像告诉学生这幅画的重点特征 | +| `batch_size` | INT | 可选 | 1 | 1-10000 | 每次学习的样本数量,就像一次练习几幅画 | +| `steps` | INT | 可选 | 16 | 1-100000 | 训练的总次数,相当于练习的总课时 | +| `learning_rate` | FLOAT | 可选 | 0.0005 | 0.0000001-1.0 | 学习速度,就像调整每次修改的幅度 | +| `rank` | INT | 可选 | 8 | 1-128 | LoRA的秩,越大学习能力越强但需要更多资源 | +| `optimizer` | COMBO | 可选 | "AdamW" | ["AdamW", "Adam", "SGD", "RMSprop"] | 优化器选择,像是选择不同的学习方法 | +| `loss_function` | COMBO | 可选 | "MSE" | ["MSE", "L1", "Huber", "SmoothL1"] | 损失函数,用于衡量学习效果的好坏 | +| `seed` | INT | 可选 | 0 | 0-18446744073709551615 | 随机种子,确保训练过程可以重复 | +| `training_dtype` | COMBO | 可选 | "bf16" | ["bf16", "fp32"] | 训练时使用的数据类型 | +| `lora_dtype` | COMBO | 可选 | "bf16" | ["bf16", "fp32"] | LoRA权重的存储数据类型 | +| `existing_lora` | COMBO | 可选 | "[None]" | 可用的LoRA文件列表 + "[None]" | 继续训练现有的LoRA,或从头开始新训练 | + +### 输出 + +| 输出名称 | 数据类型 | 说明 | +|----------|----------|------| +| `model_with_lora` | MODEL | 应用了训练好的LoRA权重的模型 | +| `lora` | LORA_MODEL | 独立的LoRA权重,可以保存或应用到其他模型 | +| `loss` | LOSS_MAP | 训练过程中的损失数据,用于监控训练进度 | +| `steps` | INT | 完成的总训练步数(包括继续训练时之前的步数) | + +### 使用建议 + +1. **准备阶段**: + - 选择质量好、风格一致的训练图片 + - 确保有足够的GPU显存进行训练 + - 从小批量和较少步数开始尝试,逐步调整参数 + +2. **训练过程**: + - 使用 `LossGraphNode` 监控训练进度 + - 如果训练效果不理想,可以: + * 调整学习率(learning_rate) + * 增加训练步数(steps) + * 尝试不同的优化器(optimizer) + * 调整LoRA秩(rank)的大小 + +3. **保存和使用**: + - 训练完成后使用 `SaveLoRA` 节点保存权重 + - 可以用 `LoraModelLoader` 节点在其他工作流中使用训练好的LoRA + +4. **注意事项**: + - 这是一个实验性功能,可能会在未来版本中有变化 + - 训练需要较大的GPU显存和计算资源 + - 支持从现有LoRA继续训练,会自动从文件名中提取步数 + - 使用了梯度检查点技术来优化显存使用 + +## 多图像输入处理 + +ComfyUI中的Train LoRA节点通过一个复杂的批处理系统来处理多个图像输入。该节点通过`latents`输入参数接收图像的潜在表示,其中包含批量潜在张量,批次维度代表多个图像。 + +在训练过程中,该节点对每个训练步骤从图像批次中进行随机采样。它使用`torch.randperm(num_images)[:batch_size]`从总数据集中随机选择一个子集进行每次迭代。这种方法通过确保模型在不同步骤中看到不同的训练图像组合,提供了数据增强并防止过拟合。 + +图像加载管道通过配套节点(如`LoadImageSetNode`和`LoadImageSetFromFolderNode`)支持多种输入方法。这些节点包含复杂的图像处理功能,具有多种调整大小方法(无、拉伸、裁剪、填充)来处理不同尺寸的图像。 + +## 核心功能 + +Train LoRA节点实现了一个完整的LoRA(低秩适应)训练系统,具有以下核心功能: + +### 模型适应系统 +该节点自动识别并适应模型中启用权重的层,为具有2D或更高维度权重的层创建LoRA适配器。对于具有较小权重维度的层,它使用偏差差异模块。 + +### 训练基础设施 +训练过程使用与ComfyUI采样系统集成的自定义`TrainSampler`。它在采样框架内实现梯度计算、损失计算和优化器步骤。 + +### 内存管理 +该节点包含梯度检查点功能以减少训练期间的内存使用。它在训练期间修补模型模块,之后取消修补以保持内存效率。 + +## 详细特性 + +### 训练配置选项 +该节点提供广泛的配置选项: + +- **优化器**: 支持AdamW、Adam、SGD和RMSprop优化器 +- **损失函数**: 多种损失函数选项,包括MSE、L1、Huber和SmoothL1 +- **训练参数**: 可配置批次大小、训练步骤、学习率和LoRA秩 +- **数据类型**: 支持bf16和fp32训练以及LoRA数据类型 + +### 继续训练支持 +该节点支持从现有LoRA权重继续训练,允许增量训练和微调。它可以加载现有LoRA权重并从文件名中提取先前的训练步骤计数。 + +### 输出和监控 +该节点提供全面的输出,包括: +- 应用LoRA的训练模型 +- 独立的LoRA权重以供重用 +- 用于监控训练进度的损失跟踪数据 +- 包括继续训练步骤在内的总训练步骤计数 + +### 进度跟踪和可视化 +通过回调函数实现实时损失跟踪,更新进度条并收集损失值。系统包含配套的`LossGraphNode`用于可视化训练进度。 + +## 与ComfyUI生态系统的集成 + +Train LoRA节点与其他ComfyUI组件无缝集成: + +### LoRA权重管理 +训练好的LoRA权重可以使用`SaveLoRA`节点保存,并使用`LoraModelLoader`节点重新加载到模型中。 + +### 权重适配器系统 +该节点利用ComfyUI的权重适配器系统,特别是LoRA适配器实现,它支持多种LoRA格式并在推理过程中提供高效的权重计算。 + +## 注意事项 + +Train LoRA节点代表了ComfyUI中一个全面的LoRA训练解决方案,专为初学者和高级用户设计。它处理批处理、内存管理和训练优化的复杂性,同时通过广泛的配置选项提供灵活性。该节点与ComfyUI现有基础设施的集成确保了与各种模型类型和工作流程的兼容性。通过随机批次采样进行的多图像输入处理提供了有效的数据增强,使其适用于多样化的图像数据集。 From 2d5842090add51f7ba203fcc3729553d7116d8af Mon Sep 17 00:00:00 2001 From: ComfyUI Wiki Date: Thu, 19 Jun 2025 22:16:16 +0800 Subject: [PATCH 2/2] Update Chinese version --- .../docs/TrainLoRANode/en.md | 59 ------------- .../docs/TrainLoRANode/zh.md | 85 ++++++------------- 2 files changed, 25 insertions(+), 119 deletions(-) delete mode 100644 comfyui_embedded_docs/docs/TrainLoRANode/en.md diff --git a/comfyui_embedded_docs/docs/TrainLoRANode/en.md b/comfyui_embedded_docs/docs/TrainLoRANode/en.md deleted file mode 100644 index 55ef8b8..0000000 --- a/comfyui_embedded_docs/docs/TrainLoRANode/en.md +++ /dev/null @@ -1,59 +0,0 @@ -# Train LoRA Node in ComfyUI: Multiple Image Handling and Functionalities - -## Multiple Image Input Handling - -The Train LoRA Node in ComfyUI handles multiple image inputs through a sophisticated batch processing system. The node accepts latent representations of images through the `latents` input parameter, which contains batched latent tensors with the batch dimension representing multiple images. - -During training, the node implements random sampling from the image batch for each training step. It uses `torch.randperm(num_images)[:batch_size]` to randomly select a subset of images from the total dataset for each iteration. This approach provides data augmentation and prevents overfitting by ensuring the model sees different combinations of training images across steps. - -The image loading pipeline supports multiple input methods through companion nodes like `LoadImageSetNode` and `LoadImageSetFromFolderNode`. These nodes include sophisticated image processing capabilities with multiple resize methods (None, Stretch, Crop, Pad) to handle images of different dimensions. - -## Core Functionalities - -The Train LoRA Node implements a complete LoRA (Low-Rank Adaptation) training system with the following core functionalities: - -### Model Adaptation System -The node automatically identifies and adapts weight-enabled layers in the model, creating LoRA adapters for layers with 2D or higher dimensional weights. For layers with smaller weight dimensions, it uses bias difference modules. - -### Training Infrastructure -The training process uses a custom `TrainSampler` that integrates with ComfyUI's sampling system. It implements gradient computation, loss calculation, and optimizer steps within the sampling framework. - -### Memory Management -The node includes gradient checkpointing functionality to reduce memory usage during training. It patches model modules during training and unpatches them afterward to maintain memory efficiency. - -## Detailed Features - -### Training Configuration Options -The node offers extensive configuration options: - -- **Optimizers**: Support for AdamW, Adam, SGD, and RMSprop optimizers -- **Loss Functions**: Multiple loss function options including MSE, L1, Huber, and SmoothL1 -- **Training Parameters**: Configurable batch size, training steps, learning rate, and LoRA rank -- **Data Types**: Support for both bf16 and fp32 training and LoRA data types - -### Continuation Training Support -The node supports continuing training from existing LoRA weights, allowing incremental training and fine-tuning. It can load existing LoRA weights and extract the previous training step count from the filename. - -### Output and Monitoring -The node provides comprehensive outputs including: -- The trained model with LoRA applied -- Standalone LoRA weights for reuse -- Loss tracking data for monitoring training progress -- Total training step count including continuation steps - -### Progress Tracking and Visualization -Real-time loss tracking is implemented with callback functions that update progress bars and collect loss values. The system includes a companion `LossGraphNode` for visualizing training progress. - -## Integration with ComfyUI Ecosystem - -The Train LoRA Node integrates seamlessly with other ComfyUI components: - -### LoRA Weight Management -The trained LoRA weights can be saved using the `SaveLoRA` node and loaded back into models using the `LoraModelLoader` node. - -### Weight Adapter System -The node leverages ComfyUI's weight adapter system, specifically the LoRA adapter implementation, which supports multiple LoRA formats and provides efficient weight calculation during inference. - -## Notes - -The Train LoRA Node represents a comprehensive LoRA training solution within ComfyUI, designed for both beginners and advanced users. It handles the complexities of batch processing, memory management, and training optimization while providing flexibility through extensive configuration options. The node's integration with ComfyUI's existing infrastructure ensures compatibility with various model types and workflows. The multiple image input handling through random batch sampling provides effective data augmentation, making it suitable for training on diverse image datasets. diff --git a/comfyui_embedded_docs/docs/TrainLoRANode/zh.md b/comfyui_embedded_docs/docs/TrainLoRANode/zh.md index 973d1be..3021a93 100644 --- a/comfyui_embedded_docs/docs/TrainLoRANode/zh.md +++ b/comfyui_embedded_docs/docs/TrainLoRANode/zh.md @@ -1,20 +1,4 @@ -## TrainLoRANode(LoRA训练节点) - -### 功能描述 -这个节点就像是一位专业的美术老师,能够根据你提供的范例作品(训练图片)来学习和掌握特定的绘画风格或技巧。通过这个节点,你可以让AI模型学习新的创作风格,而且学习过程完全在ComfyUI界面中进行。 - -### 工作原理 -想象一下教一个绘画学生学习新的绘画技巧: - -1. **准备课程材料**: - - 就像准备示范作品一样,你需要准备训练用的图片 - - 使用 `LoadImageSetNode` 或 `LoadImageSetFromFolderNode` 来加载这些图片 - - 通过VAE编码节点将图片转换为模型可以理解的格式 - -2. **学习过程**: - - 就像学生通过反复练习来掌握技巧,模型也通过多次迭代来学习 - - 每次练习都会对比自己的作品和示范作品的差异,然后调整技巧 - - 这个过程通过特殊的 `TrainSampler` 来实现,它负责计算差异并指导模型改进 +这个节点主要用于 LoRA 训练,能够根据你提供的范例作品(训练图片)来学习和掌握特定的绘画风格或技巧。通过这个节点,你可以让AI模型学习新的创作风格。 ### 输入 @@ -23,10 +7,10 @@ | `model` | MODEL | 必填 | - | - | 要训练的基础模型,就像选择要培训的学生 | | `latents` | LATENT | 必填 | - | - | 编码后的训练图片,相当于教学用的范例作品 | | `positive` | CONDITIONING | 必填 | - | - | 文本描述,就像告诉学生这幅画的重点特征 | -| `batch_size` | INT | 可选 | 1 | 1-10000 | 每次学习的样本数量,就像一次练习几幅画 | -| `steps` | INT | 可选 | 16 | 1-100000 | 训练的总次数,相当于练习的总课时 | -| `learning_rate` | FLOAT | 可选 | 0.0005 | 0.0000001-1.0 | 学习速度,就像调整每次修改的幅度 | -| `rank` | INT | 可选 | 8 | 1-128 | LoRA的秩,越大学习能力越强但需要更多资源 | +| `batch_size` | INT | 可选 | 1 | 1-10000 | 每次学习的样本数量,就像一次练习几幅画,如果显存小于 8GB建议设置为 1,大显存可以设置为 3 | +| `steps` | INT | 可选 | 16 | 1-100000 | 训练的总轮次,相当于练习的总课时,多轮次的训练可以让模型更好地掌握训练特征,但也容易过拟合,在 20~30张时你可以参考设置为 1000 左右 | +| `learning_rate` | FLOAT | 可选 | 0.0005 | 0.0000001-1.0 | 可以理解为学习过程的速度,学习率低时模型将会掌握更多细节但增加学习时长,学习率高则会让模型快速地完成学习过程,但可能会忽略掉很多细节 | +| `rank` | INT | 可选 | 8 | 1-128 | LoRA的秩,越大学习能力越强但需要更多资源,建议从较低的参数开始尝试 | | `optimizer` | COMBO | 可选 | "AdamW" | ["AdamW", "Adam", "SGD", "RMSprop"] | 优化器选择,像是选择不同的学习方法 | | `loss_function` | COMBO | 可选 | "MSE" | ["MSE", "L1", "Huber", "SmoothL1"] | 损失函数,用于衡量学习效果的好坏 | | `seed` | INT | 可选 | 0 | 0-18446744073709551615 | 随机种子,确保训练过程可以重复 | @@ -43,6 +27,20 @@ | `loss` | LOSS_MAP | 训练过程中的损失数据,用于监控训练进度 | | `steps` | INT | 完成的总训练步数(包括继续训练时之前的步数) | +## 关于 LoRA 训练的准备 + +想象一下教一个绘画学生学习新的绘画技巧: + +1. **准备课程材料**: + - 就像准备示范作品一样,你需要准备训练用的图片 + - 使用 `LoadImageSetNode` 或 `LoadImageSetFromFolderNode` 来加载这些图片 + - 通过VAE编码节点将图片转换为模型可以理解的格式 + +2. **学习过程**: + - 就像学生通过反复练习来掌握技巧,模型也通过多次迭代来学习 + - 每次练习都会对比自己的作品和示范作品的差异,然后调整技巧 + - 这个过程通过特殊的 `TrainSampler` 来实现,它负责计算差异并指导模型改进 + ### 使用建议 1. **准备阶段**: @@ -60,8 +58,7 @@ 3. **保存和使用**: - 训练完成后使用 `SaveLoRA` 节点保存权重 - - 可以用 `LoraModelLoader` 节点在其他工作流中使用训练好的LoRA - + - 4. **注意事项**: - 这是一个实验性功能,可能会在未来版本中有变化 - 训练需要较大的GPU显存和计算资源 @@ -70,58 +67,26 @@ ## 多图像输入处理 -ComfyUI中的Train LoRA节点通过一个复杂的批处理系统来处理多个图像输入。该节点通过`latents`输入参数接收图像的潜在表示,其中包含批量潜在张量,批次维度代表多个图像。 +ComfyUI中 的 Train LoRA 节点通过一个复杂的批处理系统来处理多个图像输入。该节点通过 `latents` 输入参数接收图像的潜在表示, 其中包含批量潜在张量, 批次维度代表多个图像。 在训练过程中,该节点对每个训练步骤从图像批次中进行随机采样。它使用`torch.randperm(num_images)[:batch_size]`从总数据集中随机选择一个子集进行每次迭代。这种方法通过确保模型在不同步骤中看到不同的训练图像组合,提供了数据增强并防止过拟合。 图像加载管道通过配套节点(如`LoadImageSetNode`和`LoadImageSetFromFolderNode`)支持多种输入方法。这些节点包含复杂的图像处理功能,具有多种调整大小方法(无、拉伸、裁剪、填充)来处理不同尺寸的图像。 -## 核心功能 - -Train LoRA节点实现了一个完整的LoRA(低秩适应)训练系统,具有以下核心功能: - -### 模型适应系统 -该节点自动识别并适应模型中启用权重的层,为具有2D或更高维度权重的层创建LoRA适配器。对于具有较小权重维度的层,它使用偏差差异模块。 - -### 训练基础设施 -训练过程使用与ComfyUI采样系统集成的自定义`TrainSampler`。它在采样框架内实现梯度计算、损失计算和优化器步骤。 - -### 内存管理 -该节点包含梯度检查点功能以减少训练期间的内存使用。它在训练期间修补模型模块,之后取消修补以保持内存效率。 - -## 详细特性 - -### 训练配置选项 -该节点提供广泛的配置选项: - -- **优化器**: 支持AdamW、Adam、SGD和RMSprop优化器 -- **损失函数**: 多种损失函数选项,包括MSE、L1、Huber和SmoothL1 -- **训练参数**: 可配置批次大小、训练步骤、学习率和LoRA秩 -- **数据类型**: 支持bf16和fp32训练以及LoRA数据类型 - -### 继续训练支持 -该节点支持从现有LoRA权重继续训练,允许增量训练和微调。它可以加载现有LoRA权重并从文件名中提取先前的训练步骤计数。 - ### 输出和监控 + 该节点提供全面的输出,包括: - 应用LoRA的训练模型 - 独立的LoRA权重以供重用 - 用于监控训练进度的损失跟踪数据 - 包括继续训练步骤在内的总训练步骤计数 -### 进度跟踪和可视化 -通过回调函数实现实时损失跟踪,更新进度条并收集损失值。系统包含配套的`LossGraphNode`用于可视化训练进度。 - -## 与ComfyUI生态系统的集成 - -Train LoRA节点与其他ComfyUI组件无缝集成: - ### LoRA权重管理 + 训练好的LoRA权重可以使用`SaveLoRA`节点保存,并使用`LoraModelLoader`节点重新加载到模型中。 ### 权重适配器系统 -该节点利用ComfyUI的权重适配器系统,特别是LoRA适配器实现,它支持多种LoRA格式并在推理过程中提供高效的权重计算。 -## 注意事项 +该节点利用 ComfyUI 的权重适配器系统,特别是 LoRA 适配器实现,它支持多种LoRA格式并在推理过程中提供高效的权重计算。 -Train LoRA节点代表了ComfyUI中一个全面的LoRA训练解决方案,专为初学者和高级用户设计。它处理批处理、内存管理和训练优化的复杂性,同时通过广泛的配置选项提供灵活性。该节点与ComfyUI现有基础设施的集成确保了与各种模型类型和工作流程的兼容性。通过随机批次采样进行的多图像输入处理提供了有效的数据增强,使其适用于多样化的图像数据集。 +完整示例请参考 [LoRA 训练工作流示例教程](https://docs.comfy.org/zh-CN/tutorials/lora-trainer) \ No newline at end of file