🚀 紙板v2 - 通量模型
紙板v2 - 通量(Cardboard-v2-Flux)是一款基於文本生成圖像的模型,可通過特定提示詞生成獨特的圖像,為圖像創作帶來更多可能。
🚀 快速開始
環境設置
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/Cardboard-v2-Flux "
trigger_word = "Cardboard v2"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
觸發詞使用
你需要使用 Cardboard v2
來觸發圖像生成。
模型下載
該模型的權重以Safetensors格式提供。
點擊下載,可在“文件與版本”標籤中獲取。
✨ 主要特性
- 文本到圖像轉換:能夠根據輸入的文本描述生成對應的圖像。
- LoRA技術:採用LoRA技術,提升模型訓練效率和靈活性。
- 多場景適用:可生成不同風格和場景的圖像,滿足多樣化需求。
📦 安裝指南
暫未提供具體安裝步驟,可參考上述快速開始中的環境設置部分。
💻 使用示例
基礎用法
prompt = "Cardboard v2, a cardboard cutout of a bald mans face is adorned with a black beard and mustache. The mans head is encased in a pair of pink headphones that are attached to his head. The headphones have a thin pink cord running from the bottom to the top of the ears. The background is a vibrant turquoise color, adding a pop of color to the scene."
image = pipe(prompt).images[0]
image.save("output.png")
📚 詳細文檔
模型描述

圖像生成示例
以下是一些文本輸入及對應的圖像輸出示例:
- **輸入文本**:'Cardboard v2, a cardboard cutout of a bald mans face is adorned with a black beard and mustache. The mans head is encased in a pair of pink headphones that are attached to his head. The headphones have a thin pink cord running from the bottom to the top of the ears. The background is a vibrant turquoise color, adding a pop of color to the scene.'
**輸出圖像**:[點擊查看](images/111.png)
- **輸入文本**:'Cardboard v2, a cardboard cutout of a mans face is displayed against a blue backdrop. The mans head is adorned with a brown fedora hat, a white face, and a yellow mustache. His eyes are a piercing blue, and his eyebrows are a lighter shade of yellow. His mustache is a vibrant yellow, adding a pop of color to the scene. He is wearing a brown shirt, and the shirt is a dark brown.'
**輸出圖像**:[點擊查看](images/222.png)
- **輸入文本**:'Cardboard v2, a cardboard cutout of a man with green skin tone and exaggerated white eyebrows shaped like lightning bolts. He is wearing a purple beret tilted to the side and a red monocle over one eye. His lips are painted matte black, and the background is a glowing lime yellow.'
**輸出圖像**:[點擊查看](images/333.png)
- **輸入文本**:'Cardboard v2, a cardboard cutout of a mans face painted in grayscale tones is highlighted by a bright neon green mohawk that arcs dramatically to the side. He sports a pair of round, red-tinted sunglasses and a deep purple scarf loosely draped around his neck. The backdrop is a high-saturation magenta, creating a bold visual contrast.'
**輸出圖像**:[點擊查看](images/444.png)
圖像參數處理
參數 |
值 |
參數 |
值 |
學習率調度器 |
常數 |
噪聲偏移 |
0.03 |
優化器 |
AdamW |
多分辨率噪聲折扣 |
0.1 |
網絡維度 |
64 |
多分辨率噪聲迭代次數 |
10 |
網絡阿爾法值 |
32 |
重複次數與步數 |
20 & 2950 |
訓練輪數 |
24 |
每N輪保存一次 |
1 |
標註信息
標註使用佛羅倫薩2 - 英語(自然語言與英語)。
訓練數據
總共使用了21張圖像進行訓練。
最佳尺寸與推理
尺寸 |
寬高比 |
推薦情況 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默認 |
推理範圍
🔧 技術細節
該模型基於 black-forest-labs/FLUX.1-dev
基礎模型,採用LoRA技術進行微調。通過特定的圖像參數處理和訓練數據,使得模型能夠根據輸入的提示詞生成獨特的圖像。在推理過程中,推薦使用特定的尺寸和推理步數,以獲得最佳的圖像生成效果。
📄 許可證
本模型使用 flux-1-dev-non-commercial-license
許可證。
查看許可證詳情