NASA concept art LoRA for FLUX.2 [klein] 4B
A LoRA for FLUX.2-klein-4B trained on 36 public-domain NASA concept art images, mostly retro-futuristic space concepts from the 1960s and 1970s. The images come from the NASA ArtSpace album on Flickr Commons and are in davanstrien/nasa_concept_art.
It is a retrain of the 2024 FLUX.1-dev version, using the Diffusers DreamBooth LoRA script on Hugging Face Jobs.
Base model vs LoRA
Same prompts and seed. Top: the 2024 FLUX.1-dev LoRA. Middle: FLUX.2-klein-4B without the LoRA, which reads NASA_CONCEPT as poster text. Bottom: FLUX.2-klein-4B with this LoRA.
Trigger words
Start prompts with NASA_CONCEPT. The training captions were all NASA_CONCEPT retro-futuristic space concept art.
Use it with 🧨 diffusers
import torch
from diffusers import AutoPipelineForText2Image
pipeline = AutoPipelineForText2Image.from_pretrained(
"black-forest-labs/FLUX.2-klein-4B", torch_dtype=torch.bfloat16
).to("cuda")
pipeline.load_lora_weights(
"davanstrien/nasa-concept-art-flux2-klein-lora", weight_name="pytorch_lora_weights.safetensors"
)
image = pipeline(
prompt="NASA_CONCEPT retro-futuristic space concept art of a rotating wheel space station above the Moon"
).images[0]
Training
Trained on an A100 (a100-large) with Hugging Face Jobs: 1,000 steps at 1024px, about 57 minutes.
hf jobs uv run --flavor a100-large --timeout 2h -s HF_TOKEN -- \
https://raw.githubusercontent.com/huggingface/diffusers/main/examples/dreambooth/train_dreambooth_lora_flux2_klein.py \
--pretrained_model_name_or_path black-forest-labs/FLUX.2-klein-4B \
--dataset_name davanstrien/nasa_concept_art \
--instance_prompt "NASA_CONCEPT retro-futuristic space concept art" \
--validation_prompt "NASA_CONCEPT retro-futuristic space concept art of a rotating wheel space station above the Moon" \
--num_validation_images 4 \
--resolution 1024 --mixed_precision bf16 --guidance_scale 1 \
--gradient_checkpointing --cache_latents \
--optimizer adamW --use_8bit_adam --learning_rate 1e-4 \
--max_train_steps 1000 --seed 0 \
--output_dir /tmp/out \
--push_to_hub --hub_model_id davanstrien/nasa-concept-art-flux2-klein-lora
At 1024px with validation images, a10g-small ran at 11.4 s/step and ran out of host RAM (15 GB) when it loaded the pipeline for validation. On a100-large it ran at 3.4 s/step.
Limitations
The dataset is small (36 images) and has no per-image captions, so the LoRA learns a general style rather than specific subjects. Outputs are pastiche, not historical NASA material.