đ Lumina2 DreamBooth LoRA - trained-lumina2-lora-yarn
These are DreamBooth LoRA weights for Lumina-Image-2.0, enabling high - quality image generation in a yarn art style.
đ Documentation
⨠Features
đ Trigger words
You should use yarn art style
to trigger the image generation.
The following system_prompt
was also used during training (ignore if None
): None.
đĻ Installation
Download the *.safetensors LoRA in the Files & versions tab.
đģ Usage Examples
Basic Usage
import torch
from diffusers import Lumina2Text2ImgPipeline
pipe = Lumina2Text2ImgPipeline.from_pretrained(
"Alpha-VLLM/Lumina-Image-2.0", torch_dtype=torch.bfloat16
).to("cuda")
pipe.load_lora_weights("trained-lumina2-lora-yarn")
prompt = "a puppy in a pond, yarn art style"
image = pipe(
prompt,
negative_prompt="bad quality, worse quality, degenerate quality",
guidance_scale=6,
num_inference_steps=35,
generator=torch.manual_seed(0)
).images[0]
Advanced Usage
import torch
from diffusers import Lumina2Text2ImgPipeline
pipe = Lumina2Text2ImgPipeline.from_pretrained(
"Alpha-VLLM/Lumina-Image-2.0", torch_dtype=torch.bfloat16
).to("cuda")
system_prompts = [
None,
"You are an assistant designed to generate superior images with a dark overall theme.",
"You are an assistant designed to generate superior images with a bright and shiny overall theme."
]
pipe.load_lora_weights("trained-lumina2-lora-yarn")
prompt = "a puppy in a pond, yarn art style"
for sp in system_prompts:
filename = "yarn_lora"
image = pipe(
prompt,
negative_prompt="bad quality, worse quality, degenerate quality",
system_prompt=sp,
guidance_scale=6,
num_inference_steps=35,
generator=torch.manual_seed(0)
).images[0]
if sp:
filename += "_" + "_".join(sp.split(" ")).replace(",", "").replace(".", "")
filename = filename[:100]
image.save(f"{filename}.png")
đ Results
The model benefits from system_prompt
. Here is a comparison across different system prompts:
No system prompt |
"Dark surrounding" system prompt |
"Sunny surrounding" system prompt |
 |
 |
 |
Original prompt: a puppy in a pond, yarn art style |
Original prompt: a puppy in a pond, yarn art style |
Original prompt: a puppy in a pond, yarn art style |
đ License
The model is licensed under apache-2.0
.
đ Information Table
Property |
Details |
Base Model |
Alpha-VLLM/Lumina-Image-2.0 |
Library Name |
diffusers |
License |
apache-2.0 |
Instance Prompt |
a puppy, yarn art style |
Tags |
text-to-image, diffusers-training, diffusers, lora, lumina2, lumina2-diffusers, template:sd-lora |