FLUX 风格的完整训练教程、指南和研究

社区文章 发布于 2024 年 9 月 8 日

所有检查点、实验、详情、网格、图像及所有共享内容的仓库链接:https://huggingface.co/MonsterMMORPG/3D-Cartoon-Style-FLUX

这是公共 LoRA 风格的训练(4 个单独训练,每个在 4 块 A6000 上进行)。

实验有无字幕。我们将看到哪种方式在 FLUX 风格训练中产生最佳结果。

CivitAI 链接:https://civitai.com/models/731347

使用多 GPU 批处理 Joycaption 应用生成字幕。

示例 4 张图像

更多内容请见帖子最底部

image/png image/png image/png image/png

我使用了我的多 GPU Joycaption APP(使用了 8x A6000 进行超快速字幕生成)

https://www.patreon.com/posts/110613301

Joycaption examples

我使用了我的 Gradio 批量字幕编辑器来编辑一些单词并添加激活令牌作为 ohwx 3d 渲染

https://www.patreon.com/posts/108992085

Gradio batch caption editor

无字幕数据集仅使用 ohwx 3d 渲染作为字幕

我在 4 块 A6000 GPU 上使用了我最新的 4x_GPU_Rank_1_SLOW_Better_Quality.json,并训练了 500 个 epoch - 114 张图像

https://www.patreon.com/posts/110879657

Training configuration

所有训练都以浮点数和 128 LoRA 网络等级保存,因此每个检查点都超过 2GB

不一致数据集训练

这是我使用以下数据集进行的第一次训练

不一致-训练-数据集-图片-网格.jpg

当您注意上面共享的网格图像时,您会发现数据集不一致

带有已用字幕的训练数据集(仅用于带字幕训练)可在以下目录中查看

训练-数据集

总共有 114 张图片

此次训练的总步数是 500 * 114 / 4(4x GPU - 批量大小 1)= 14250 步

在 4 块 RTX A6000 GPU 上使用慢速配置耗时约 37 小时 - 快速配置耗时约一半

该数据集进行了 2 次训练。Epoch 500 检查点名称如下

SECourses_Style_Inconsistent_DATASET_NO_Captions.safetensors SECourses_Style_Inconsistent_DATASET_With_Captions.safetensors

它们的检查点保存在以下文件夹中

训练检查点-无字幕 训练检查点-带字幕

其网格结果如下所示

不一致训练数据集结果网格-26100x23700px.jpg

当您注意上面的图片时,您会发现它的结果不一致

一致数据集训练

我注意到初始训练数据集不一致后,我修剪了数据集,使其更加一致

固定-一致-训练-数据集-图片-网格.jpg

当您注意上面共享的网格图像时,您会发现它更加一致,但仍不完美

现在总共有 66 张图片

此训练所用带字幕训练数据集(仅用于带字幕训练)可在以下目录中查看

固定-一致-训练-数据集

此次训练的总步数是 500 * 66 / 4(4x GPU - 批量大小 1)= 8250 步

在 4 块 RTX A6000 GPU 上使用慢速配置耗时约 24 小时 - 快速配置耗时约一半

该数据集进行了 2 次训练。Epoch 500 检查点名称如下

SECourses_3D_Render_Style_Fixed_Dataset_NO_Captions.safetensors SECourses_3D_Render_Style_Fixed_Dataset_With_Captions.safetensors

它们的检查点保存在以下文件夹中

训练检查点-固定数据集-无字幕 训练检查点-固定数据集-带字幕

其网格结果如下所示 - 其中也包含不一致数据集的结果

固定-一致-训练-数据集-结果-网格-50700x15500px.jpg

当您注意上面的图片时,您会发现它现在更加一致了

最佳检查点及结论

当使用不一致数据集时,带字幕训练的结果要好得多。

然而,当使用一致数据集进行训练时,无字幕在早期 epoch 中产生了更好、更一致的结果。

因此我得出结论,无字幕数据集的第 75 个 epoch 是最佳检查点

以下是固定数据集的对比图像

固定-一致-训练-数据集-仅无字幕-网格.jpg

固定-一致-训练-数据集-仅带字幕-网格.jpg

最佳检查点下载链接:Training-Checkpoints-Fixed-DATASET-NO-Captions/SECourses_3D_Render_Style_Fixed_Dataset_NO_Captions-000075.safetensors

75 个检查点相当于 75 * 66 / 4 = 1238 步

训练您风格的教程

1 : https://youtu.be/bupRePUOA18

FLUX:首个真正超越 Midjourney 及其他模型的开源文本到图像模型 - FLUX 是备受期待的 SD3

image

2 : https://youtu.be/nySGu12Y05k

FLUX LoRA 训练简化:使用 Kohya SS GUI 从零到精通 (8GB GPU, Windows) 教程指南

image

3 : https://youtu.be/-uhL2nW7Ddw

在 Massed Compute 和 RunPod 上进行超快、超便宜的 FLUX LoRA 训练教程 - 无需 GPU!

image

该数据集不能用于商业用途

Training progress

网格测试提示 - CivitAI 中取自网格的示例图像 - 未经过挑选


a ohwx 3d rendering of a car

a car rendered in ohwx 3d style

a ohwx style car image 

 a ohwx render of a car 

 a ohwx car 

 a ohwx 3d rendering of a chest, depicted in a cartoon style. The background is a plain white, making the chest and its contents stand out clearly. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give the chest a realistic, three-dimensional appearance. The metal bands and rivets add a sense of realism and durability to the chest. The image is vibrant and eye-catching, inviting the viewer to imagine the treasure within. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold, with a focus on oranges, browns, and golds to create a sense of warmth and excitement. The overall mood is one of excitement and discovery.

a ohwx 3d rendering of an airplane, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a battleship, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a robot, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a dog, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a cat, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of an axe, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a house, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a dragon, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a flower, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a rose, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a tank, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a computer, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a graphics processing unit (gpu), depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a fork, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a lock, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

a ohwx 3d rendering of a umbrella, depicted in a cartoon style. The background is a plain white. The overall style is playful and whimsical, with clean lines and bright colors, suggesting a fantasy or adventure theme. The illustration is highly detailed, with a focus on textures and shading to give a realistic, three-dimensional appearance. The image is vibrant and eye-catching. The illustration is likely used in a digital context, such as a game or a children's book. The colors are bright and bold to create a sense of warmth and excitement.

更多示例图像 - 最后一张是训练数据集

image/png image/png image/png image/png image/png image/png image/png image/png image/png image/png image/png

image/jpeg

社区

注册登录 发表评论