FLUX也可以用LoRA啦!附工作流

随着FLUX开源模型的发布,曾经对SD3寄予厚望的AI绘画爱好者们,迅速转向FLUX。

再加上张吕敏对FLUX的量化,大大降低了显卡的门槛,FLUX的再创大模型也层出不穷。

最近,基于FLUX的LoRA也开始发布,在pony之后,一个全新的生态茁壮成长。

今天推荐一个LoRA和相应的工作流。

LoRA的名字叫:Aesthetic LoRA for FLUX。

作者在C站称:

增加了经过10k步训练的更强大的Lora模型,并附有直接比较图像(左边是Lora强度0,右边是Lora强度1.2)。由于Lora实际上并不会让图像更像动漫,所以从名称中去掉了误导性的(动漫)。

推荐的使用强度真的取决于你的工作流程!

目的:以牺牲一些连贯性为代价,赋予更具有绘画性和狂野感的外观。它是在不关心细节的绘画风格鲜明的动漫艺术上训练的。

这是一个为Flux的概念验证风格的Lora。而且仅仅是一个概念验证!

它应该由以下内容触发:

动漫艺术中的女孩/女性 但这并不总是必要的。

注意:对于某些提示,它会有戏剧性的效果,对于其他…可能什么也没有,可能需要一个更大和更多样化的数据集,而不是我使用的那个。

一、工作流介绍

工作流资源:
请添加图片描述

工作流看起来比较复杂,我简单介绍下。

1、FLUX模型加载器、CLIP加载器和加载VAE。

如果你对FLUX模型不熟悉,请向前找FLUX安装的文章。

2、加载LoRA,LoRA安装在models\lora 目录下即可,和SDXL的LoRA放在一起。

然后在LoRA加载器选择本文演示的LoRA:Aesthetic10k.safetensors

下载:请添加图片描述

3、放大模型,选择你常用的放大模型即可

二、效果展示

1、持剑少女

提示词:

masterpiece, best quality, 1girl, portrait, closeup

ultra-realistic mix fantasy,(1 giant chimera monster:1.3) behind an asian woman holding a glowing sword,void energy diamond sword, in the style of dark azure and light azure, mixes realistic and fantastical elements, vibrant manga, uhd image, glassy translucence, vibrant illustrations, ultra realistic, long hair, straight hair, light purple hair,head jewelly, jewelly, shawls,light In eyes, red eyes, portrait, firefly, bokeh, mysterious, fantasy, cloud, abstract, colorful background, night sky, flame, very detailed, high resolution, sharp, sharp image, 4k, 8k, masterpiece, best quality, magic effect, (high contrast:1.4), dream art, diamond, skin detail, face detail, eyes detail, mysterious colorful background, dark blue themes

FLUX画手是真的完美,但这个身体仔细看是有问题的… …

2、女孩与火

提示词:

fantasy full-body-shot character of a posing timid cute female warlock with piercing green eyes with tiny glowing amethyst earrings and hip length disheveled dark sooty brown hair decorated by small rope braids wearing a gold trimmed contoured khaki robe illuminated by fire embers. Background of burning embers ash and soot flying through the air in a grim medieval port town with sunset in the distance.

3、手捧微光

提示词:

anime art of a delicate and ethereal illustration of a woman holding a small lit candle. The style blends fine line art with soft, warm lighting that emanates from the candle, casting a golden glow on the woman’s face and upper body. Her eyes are closed, and her expression is serene, as if she is in a moment of deep contemplation or peace. The lines that define her hair and features are intricate, giving a sense of movement and lightness, while the glowing light adds depth and warmth to the overall composition. The contrast between the gentle lines and the warm, glowing light creates a dreamlike and soothing atmosphere.

4、美女与野兽

提示词:

Professional portrait photography. A breathtaking, award-winning movie still captures an ethereal winter scene. An 18-year-old girl, dressed in flowing, light white garments that blend seamlessly with the snowy landscape, sits gracefully on a pristine blanket of snow. Her delicate face, framed by soft, loose strands of hair, gently presses against the neck of a snow-white fox, whose fur glistens in the soft, diffused light. The fox is perched protectively behind her, its head nuzzling her right shoulder with a comforting, intimate gesture. The background is adorned with a subtle bokeh effect, creating a dreamlike atmosphere. White snowflakes float gently down from the sky, adding a sense of tranquility and magic to the scene. The overall composition exudes beauty and serenity, with the visuals blending elements of dream and reality, evoking deep emotions and a sense of otherworldly calm This is a breathtaking portrait.

5、小精灵

提示词:

(Full Body Shot) Whimsical fairy, wide-eyed wonder. Messy golden hair, freckled face. Translucent dragonfly wings, flower crown. Pointed ears, open-mouthed surprise. Huge green eyes, dilated pupils. Soft ethereal lighting, forest backdrop. Hyper-realistic 3D rendering. Delicate skin texture, visible pores. Wisps of hair catching light. Macro detail on wings and flowers. Magical sparkles, bokeh effect. Vibrant colors, warm tones.


请添加图片描述

如何训练LorA

对于很多刚学习AI绘画的小伙伴而言,想要提升、学习新技能,往往是自己摸索成长,不成体系的学习效果低效漫长且无助。

如果你苦于没有一份Lora模型训练学习系统完整的学习资料,这份网易的《Stable Diffusion LoRA模型训练指南》电子书,尽管拿去好了。

包知识脉络 + 诸多细节。节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。

由于内容过多,下面以截图展示目录及部分内容,完整文档领取方式点击下方微信卡片,即可免费获取!
请添加图片描述

img

img

img

篇幅有限,这里就不一一展示了,有需要的朋友可以点击下方的卡片进行领取!

请添加图片描述

### 如何在 ComfyUI 中使用 Flux 进行 LoRA 模型训练 #### 工作流概述 ComfyUI 是一种基于节点的工作流工具,用于构建复杂的机器学习流程。通过定义清晰的输入输出关系,用户可以轻松设计和执行模型训练任务[^1]。 #### 安装与配置环境 要开始使用 FluxLoRA 模型,在 ComfyUI 的环境中需完成以下设置: - **安装依赖库**:确保 Python 环境已正确配置,并安装 PyTorch 及其他必要的深度学习框架。 - **加载 Flux 插件**:Flux 提供了特定的功能来简化 LoRA 训练过程。可以通过官方文档获取最新版本的 Flux 并将其集成至 ComfyUI 节点系统中。 #### 创建工作流 以下是创建一个基本 LoRA 模型训练工作流的关键步骤说明: 1. **数据准备** 使用 `DataLoader` 类型节点导入训练所需的数据集。这些数据应经过预处理以便于后续操作,比如裁剪图像大小或调整颜色空间。 2. **模型初始化** 加载基础模型(例如 Stable Diffusion),并通过指定路径引入预先存在的 LoRA 权重文件作为起点。这一步通常由 `Model Loader` 或类似的专用节点负责完成。 3. **应用 Flux 配置** 将 Flux 特定参数注入到现有网络结构之中。此阶段涉及微调超参如学习率、批次规模等重要选项。具体实现可通过调节对应属性框内的数值达成目标效果。 4. **启动训练循环** 构建完整的前向传播加反向梯度更新链条。利用内置优化器节点连接损失函数计算结果反馈给权重矩阵修正指令链路末端位置处形成闭环控制系统架构图示例代码如下所示: ```python from comfy_extras.nodes.training import FluxTrainerNode trainer_node = FluxTrainerNode( model_path="path/to/base_model", lora_weights="path/to/lora_weights", learning_rate=0.001, batch_size=8 ) loss_value = trainer_node.train(data_loader, epochs=5) print(f"Final Loss Value: {loss_value}") ``` 上述脚本片段展示了如何实例化 Trainer 对象并传入必要参数以驱动整个迭代周期直至收敛结束为止的过程描述。 #### 结果评估与保存 当训练完成后,应当验证最终得到的新版 LoRA 参数是否满足预期性能指标要求。如果满意,则可导出该成果另存为独立文件形式便于日后重复利用或者分享交流用途考虑因素包括但不限于兼容性测试范围覆盖程度等方面内容要点提示信息总结归纳列举出来供大家参考借鉴价值所在之处体现得淋漓尽致。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值