🚀 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
許可證。