🚀 RGART模型
RGART是一个用于图像生成的模型,它基于特定的参数设置和训练数据,能够生成多样化的图像。通过特定的触发词和推理设置,可以得到高质量的图像输出。
🚀 快速开始
环境设置
import torch
from pipelines import DiffusionPipeline
base_model = "black-forest-labs/FLUX.1-dev"
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
lora_repo = "strangerzonehf/RGART"
trigger_word = "RG Art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
触发图像生成
你应该使用 RG Art
来触发图像生成。
下载模型
该模型的权重以Safetensors格式提供。
点击下载,可在 “Files & versions” 标签中进行操作。
✨ 主要特性
- 多样化图像生成:能够根据不同的文本提示生成各种风格的卡通图像,如人物、场景等。
- 特定参数优化:通过设置特定的图像处理参数,如学习率调度器、优化器等,提高图像生成质量。
- 灵活的推理设置:提供推荐的推理步骤范围,可根据需求调整。
📦 安装指南
暂未提供相关安装步骤。
💻 使用示例
基础用法
import torch
from pipelines import DiffusionPipeline
base_model = "black-forest-labs/FLUX.1-dev"
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
lora_repo = "strangerzonehf/RGART"
trigger_word = "RG Art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
prompt = 'RB Art, An animated image of a man sitting on a wooden stool. The man is wearing a white Nike shirt with a blue stripe down the center of the shirt. His legs are orange and his feet are black and white. His shoes are black with white and orange stripes on them. The background is a vibrant blue color. There are yellow stars on the right and left side of the image.'
image = pipe(prompt).images[0]
image.save("output.png")
高级用法
prompt = 'RB Art, An animated image of a man sitting on a wooden stool. The man is wearing a white Nike shirt with a blue stripe down the center of the shirt. His legs are orange and his feet are black and white. His shoes are black with white and orange stripes on them. The background is a vibrant blue color. There are yellow stars on the right and left side of the image.'
inference_steps = 35
image = pipe(prompt, num_inference_steps=inference_steps).images[0]
image.save("output_advanced.png")
📚 详细文档
模型描述

图像处理参数
参数 |
值 |
LR Scheduler |
constant |
Noise Offset |
0.03 |
Optimizer |
AdamW |
Multires Noise Discount |
0.1 |
Network Dim |
64 |
Network Alpha |
32 |
Epoch |
30 |
Save Every N Epochs |
1 |
Multires Noise Iterations |
10 |
Repeat & Steps |
24 & 3300 |
标注信息
标注方式:florence2 - en(自然语言 & 英语)
训练使用的图像总数
39 张
最佳尺寸与推理
尺寸 |
宽高比 |
推荐情况 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默认 |
推理范围
🔧 技术细节
该模型基于 black - forest - labs/FLUX.1 - dev
基础模型,使用LoRA(Low - Rank Adaptation)技术进行微调。通过设置一系列的图像处理参数,如学习率调度器、优化器等,对模型进行优化训练。在训练过程中,使用了39张图像,并采用特定的标注方式。推理时,推荐使用30 - 35步的推理步骤,以获得较好的图像生成效果。
📄 许可证
本模型使用 creativeml - openrail - m
许可证。