Instructions to use Cookie1112/oxford-tree-style-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Cookie1112/oxford-tree-style-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Cookie1112/oxford-tree-style-lora") prompt = "a family having dinner" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
oxford

- Prompt
- a family having dinner

- Prompt
- oxford style, a family having dinner

- Prompt
- oxford style, a cute rabbit reading a book under a big tree, watercolor texture
Model description
library_name: diffusers tags: - flux - text-to-image - lora - diffusers base_model: black-forest-labs/FLUX.1-dev instance_prompt: oxford style license: other
Oxford Tree Style LoRA for FLUX.1-dev
Model Description
This is a LoRA adapter trained on `black-forest-labs/FLUX.1-dev` to generate images in the Oxford Reading Tree style (watercolor, cute, storybook).
Trigger Word
You should use `oxford style` to trigger the image generation.
Usage
import torch
from diffusers import FluxPipeline
# 1. 设置模型路径和 LoRA 路径
base_model_id = "black-forest-labs/FLUX.1-dev"
# 修改为您实际的 LoRA 文件路径
lora_path = "output/oxford_tree_style_v1/oxford_tree_style_v1_000001750.safetensors"
# 触发词
trigger_word = "oxford style"
# 2. 加载基础模型
print("正在加载基础模型...")
pipe = FluxPipeline.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16
)
# 如果您的显存只有 24G,这一步会自动把模型分配到 CPU 和 GPU,可能有点慢
pipe.enable_model_cpu_offload()
# 3. 加载您训练好的 LoRA
print(f"正在加载 LoRA: {lora_path}")
pipe.load_lora_weights(lora_path)
# 4. 生成图片
prompt = f"{trigger_word}, a cute rabbit reading a book under a big tree, watercolor texture"
print(f"正在生成: {prompt}")
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=20,
generator=torch.Generator("cuda").manual_seed(42)
).images[0]
# 5. 保存图片
output_file = "test_oxford_1750.png"
image.save(output_file)
print(f"图片已保存为: {output_file}")
Trigger words
You should use oxford style to trigger the image generation.
Download model
Download them in the Files & versions tab.
- Downloads last month
- 10
Model tree for Cookie1112/oxford-tree-style-lora
Base model
black-forest-labs/FLUX.1-dev