🚀 新旅程藝術 - New-Journey-Art
新旅程藝術(New-Journey-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/New-Journey-Art-Flux "
trigger_word = "New Journey Art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
觸發詞使用
你需要使用 New Journey Art
來觸發圖像生成。
模型下載
該模型的權重以 Safetensors 格式提供。
你可以在 Files & versions 標籤頁 下載模型。
✨ 主要特性
- 多樣化圖像生成:能夠根據不同的文本描述,生成如貓、火箭發射、人物等多種主題的圖像。
- 特定風格呈現:生成具有“新旅程藝術”風格的圖像,滿足特定藝術創作需求。
📦 安裝指南
此部分文檔未提供具體安裝步驟,可參考上述快速開始中的環境設置部分進行操作。
💻 使用示例
基礎用法
使用以下代碼示例,結合觸發詞 New Journey 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/New-Journey-Art-Flux "
trigger_word = "New Journey Art"
pipe.load_lora_weights(lora_repo)
device = torch.device("cuda")
pipe.to(device)
text_prompt = f"{trigger_word} – A medium-sized painting of a cat sitting on a wooden table. The cat has white and orange fur, with green eyes staring at a small blue butterfly hovering above its head. The background features a light gray wall with a potted plant on the left side. The sunlight from a nearby window casts a soft shadow of the cat onto the table."
image = pipe(text_prompt).images[0]
image.show()
高級用法
在不同的圖像尺寸和推理步驟下使用模型,以獲得不同效果:
recommended_steps = 30
text_prompt = f"{trigger_word} – A cartoon drawing of a cat wearing a tiny astronaut suit, floating in space. The cats helmet reflects a bright blue planet in the distance. A small spaceship is visible on the right, with an open hatch leading inside. Stars twinkle all around."
image = pipe(text_prompt, num_inference_steps=recommended_steps).images[0]
image.show()
📚 詳細文檔
模型描述
圖像處理參數
屬性 |
詳情 |
LR Scheduler |
constant |
Optimizer |
AdamW |
Network Dim |
64 |
Network Alpha |
32 |
Epoch |
30 |
Noise Offset |
0.03 |
Multires Noise Discount |
0.1 |
Multires Noise Iterations |
10 |
Repeat & Steps |
25 & 4050 |
Save Every N Epochs |
1 |
標註信息
標註使用 florence2 - en(自然語言 & 英語)。
訓練圖像總數
總共使用 24 張圖像進行訓練。
最佳尺寸與推理
尺寸 |
縱橫比 |
推薦情況 |
1280 x 832 |
3:2 |
最佳 |
1024 x 1024 |
1:1 |
默認 |
推理範圍
📄 許可證
該模型使用 flux-1-dev-non-commercial-license
許可證,具體許可信息請參考 許可證鏈接。
