🚀 Flux-Claude-Art
Flux-Claude-Art 是一個文本到圖像的模型,可根據輸入的文本描述生成相應的卡通或數字繪畫風格圖像。它基於特定的基礎模型進行訓練,通過特定的觸發詞來生成圖像,為用戶提供了便捷的圖像生成體驗。
🚀 快速開始
環境設置
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-Claude-Art"
trigger_word = "claude art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
觸發詞使用
你應該使用 claude art
來觸發圖像生成。
模型下載
此模型的權重以 Safetensors 格式提供。
點擊下載,可在 “Files & versions” 標籤中進行操作。
✨ 主要特性
- 文本到圖像生成:根據輸入的文本描述生成對應的卡通或數字繪畫風格圖像。
- 特定觸發詞:使用
claude art
觸發圖像生成。
📦 安裝指南
安裝步驟已在 “快速開始” 部分的環境設置中給出,請參考相應的代碼示例進行安裝。
💻 使用示例
基礎用法
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-Claude-Art"
trigger_word = "claude art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
text_input = 'Claude Art, An animated cartoon image of a man in a white collared button-down shirt and a brown apron. The mans arms are crossed in front of him, and he is holding a tablet in his right hand. He has a serious expression on his face, and his eyes are squinted. His hair is dark brown, and the background is a light green, with the letters U visible on the left side of the image.'
image = pipe(text_input).images[0]
image.save("generated_image.png")
📚 詳細文檔
圖像示例
輸入文本 |
輸出圖像 |
'Claude Art, An animated cartoon image of a man in a white collared button-down shirt and a brown apron. The mans arms are crossed in front of him, and he is holding a tablet in his right hand. He has a serious expression on his face, and his eyes are squinted. His hair is dark brown, and the background is a light green, with the letters U visible on the left side of the image.' |
點擊查看 |
'Claude Art, A cartoon drawing of a man holding a baseball bat in his right hand. The man is wearing a black jacket with a zipper on the right side of the jacket. His pants are a vibrant green color. His hair is a dark brown color and he has a serious look on his face. His eyes are squinted and his mouth is slightly open. The background is a vibrant red and black striped wall.' |
點擊查看 |
'Claude Art, An animated portrait of a black man with a bald head and dark eyes. He is wearing a blue and white striped polo shirt. His hands are crossed over his chest. He has a black tie around his neck. Behind him is a red brick wall. ' |
點擊查看 |
'Claude Art, a digital painting of a black man with long dreadlocks, wearing a purple jacket, a red t-shirt, and a silver chain with a key pendant hanging from it. The mans face is adorned with a pair of aviator-style aviator sunglasses. His eyes are tinted blue, adding a pop of color to the scene. The background is a deep purple, with a few wispy white clouds floating in the air.' |
點擊查看 |
'Claude Art, An animated cartoon image of a girl with long blonde hair, wearing a white sundress and a wide-brimmed straw hat. She is standing in a sunflower field, with a basket of freshly picked flowers in one hand. The background is a bright blue sky with fluffy clouds, and a small butterfly hovers near her shoulder.' |
點擊查看 |
'Claude Art, A digital painting of a man with a rugged beard, wearing a thick fur-lined coat and leather gloves. He stands atop a snowy mountain peak, gazing into the distance. His breath forms mist in the cold air, and a faithful husky dog sits beside him. The background shows vast mountain ranges under a pale winter sky.' |
點擊查看 |
圖像參數
參數 |
詳情 |
模型類型 |
LoRA 模型,基於 black-forest-labs/FLUX.1-dev |
訓練數據 |
共使用 34 張圖像進行訓練,標註使用 florence2-en(自然語言 & 英語) |
圖像處理參數
參數 |
值 |
LR Scheduler |
constant |
Noise Offset |
0.03 |
Optimizer |
AdamW |
Network Dim |
64 |
Network Alpha |
32 |
Epoch |
22 |
Save Every N Epochs |
1 |
Multires Noise Discount |
0.1 |
Multires Noise Iterations |
10 |
Repeat & Steps |
28 & 3600 |
最佳尺寸與推理
尺寸 |
寬高比 |
推薦情況 |
1280 x 832 |
3:1 |
兼容 |
1024 x 1024 |
1:1 |
默認 |
📄 許可證
本模型使用 creativeml-openrail-m
許可證。