🚀 新旅程艺术 - 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
许可证,具体许可信息请参考 许可证链接。
