🚀 Flux-Super-Realism-LoRA
Flux-Super-Realism-LoRA 是一個用於圖像生成的模型,基於 LoRA 技術,能生成超寫實風格的圖像,在人臉寫實、超寫實等方面表現出色。
🚀 快速開始
模型 API 使用示例
from gradio_client import Client
client = Client("prithivMLmods/FLUX-REALISM")
result = client.predict(
prompt="A tiny astronaut hatching from an egg on the moon, 4k, planet theme",
seed=0,
width=1024,
height=1024,
guidance_scale=6,
randomize_seed=True,
api_name="/run"
)
print(result)
設置 Flux Space
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/Flux-Super-Realism-LoRA"
trigger_word = "Super Realism"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
✨ 主要特性
- 超寫實風格:能夠生成具有高度真實感的圖像,在人臉寫實、超寫實等方面表現優於之前的模型。
- 多參數可調:提供了豐富的圖像處理參數,可根據需求進行調整。
- 支持多種分辨率:最佳尺寸包括 1024 x 1024(默認)和 768 x 1024。
📦 安裝指南
模型權重以 Safetensors 格式提供,可在 Files & versions 標籤頁 下載。
💻 使用示例
基礎用法
from gradio_client import Client
client = Client("prithivMLmods/FLUX-REALISM")
result = client.predict(
prompt="A tiny astronaut hatching from an egg on the moon, 4k, planet theme",
seed=0,
width=1024,
height=1024,
guidance_scale=6,
randomize_seed=True,
api_name="/run"
)
print(result)
高級用法
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/Flux-Super-Realism-LoRA"
trigger_word = "Super Realism"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
📚 詳細文檔
模型描述
圖像處理參數
參數 |
值 |
參數 |
值 |
LR Scheduler |
constant |
Noise Offset |
0.03 |
Optimizer |
AdamW |
Multires Noise Discount |
0.1 |
Network Dim |
64 |
Multires Noise Iterations |
10 |
Network Alpha |
32 |
Repeat & Steps |
30 & 4380 |
Epoch |
20 |
Save Every N Epochs |
1 |
基礎模型與相關模型對比
基礎模型 FLUX.1-dev 及其適配器(一個針對超寫實風格調整的 LoRA 模型)在 28 步的情況下進行對比。該模型在人臉寫實、超寫實等多個方面比之前的版本表現更好。
基礎模型 FLUX.1-dev 及其適配器對比 [28 步]
之前版本 [28 步]
之前模型鏈接
託管/演示鏈接
模型訓練基本詳情
屬性 |
詳情 |
標籤 |
florence2-en(自然語言 & 英語) |
訓練使用的總圖像數 |
55 [高分辨率] |
最佳尺寸 |
- 1024 x 1024(默認) - 768 x 1024 |
Flux-Super-Realism-LoRA 模型 GitHub
觸發詞
⚠️ 重要提示
你應該使用 Super Realism
來觸發圖像生成。觸發詞不是必需的,但要確保圖像描述中出現 "realistic" 和 "realism" 等詞。"super realism" 觸發詞應與展示中的參考圖像精確匹配。
下載模型
該模型的權重以 Safetensors 格式提供,可在 Files & versions 標籤頁 下載。
📄 許可證
本模型採用 MIT 許可證。