SpaceVision FLUX.2-klein LoRA
Model Description
SpaceVision is a 38MB LoRA adapter trained on FLUX.2-klein-base-9B to generate photorealistic space imagery inspired by NASA photography and sci-fi art. The model excels at creating:
- Nebulae โ Pillars of Creation, Crab Nebula, Helix Nebula, Horsehead Nebula
- Galaxies โ Spiral galaxies, Andromeda, cosmic structures
- Planets โ Jupiter, Saturn with rings, Earth from space
- Solar phenomena โ Solar flares, corona, sunspots
- Deep space โ Star fields, cosmic dust, binary systems
Trigger Word
Use spacevision at the beginning of your prompt to activate the LoRA style.
Sample Outputs
Comparison: Base Model vs SpaceVision LoRA
All images generated with identical settings: seed=42, steps=16, guidance_scale=4.0, resolution=1024x1024
| Prompt | FLUX.2-klein Base | + SpaceVision LoRA |
|---|---|---|
| Earthrise "spacevision, Earth rising over lunar horizon, blue marble with white clouds, grey Moon surface foreground" |
![]() |
![]() |
| Solar Flare "spacevision, a violent solar flare erupting from the Sun's surface, plasma loops and magnetic field lines, extreme ultraviolet view" |
![]() |
![]() |
| Pillars of Creation "spacevision, the Pillars of Creation in Eagle Nebula, towering columns of cosmic gas and dust illuminated by newborn stars, deep space photograph" |
![]() |
![]() |
| Crab Nebula "spacevision, the Crab Nebula supernova remnant, filaments of ionized gas expanding outward, pulsar at center" |
![]() |
![]() |
Usage
Requirements
pip install diffusers transformers accelerate safetensors optimum-quanto
pip install git+https://github.com/huggingface/diffusers.git # For Flux2KleinPipeline
Basic Inference
import torch
from diffusers import Flux2KleinPipeline
from optimum.quanto import quantize, freeze, qint8
# Load base model
pipe = Flux2KleinPipeline.from_pretrained(
"black-forest-labs/FLUX.2-klein-base-9B",
torch_dtype=torch.bfloat16
)
# Quantize transformer to int8 (recommended, matches training)
quantize(pipe.transformer, weights=qint8)
freeze(pipe.transformer)
pipe.to("cuda")
# Load SpaceVision LoRA
pipe.load_lora_weights("khadim-hussain/spacevision-flux2-lora")
# Generate image
image = pipe(
prompt="spacevision, the Pillars of Creation in Eagle Nebula, towering columns of cosmic gas and dust illuminated by newborn stars, deep space photograph",
num_inference_steps=16,
guidance_scale=4.0,
height=1024,
width=1024,
generator=torch.Generator(device="cpu").manual_seed(42)
).images[0]
image.save("pillars_of_creation.png")
Without Quantization (Requires ~48GB VRAM)
import torch
from diffusers import Flux2KleinPipeline
pipe = Flux2KleinPipeline.from_pretrained(
"black-forest-labs/FLUX.2-klein-base-9B",
torch_dtype=torch.bfloat16
)
pipe.to("cuda")
pipe.load_lora_weights("khadim-hussain/spacevision-flux2-lora")
image = pipe(
prompt="spacevision, spiral galaxy with vibrant blue arms and orange core",
num_inference_steps=16,
guidance_scale=4.0
).images[0]
Training Details
| Parameter | Value |
|---|---|
| Base Model | FLUX.2-klein-base-9B |
| Training Framework | SimpleTuner |
| LoRA Rank | 16 |
| LoRA Alpha | 16 |
| Learning Rate | 1e-4 |
| LR Scheduler | Cosine |
| Epochs | 3 |
| Batch Size | 1 |
| Gradient Accumulation | 4 |
| Resolution | 1024x1024 |
| Precision | bfloat16 + int8-quanto |
| Optimizer | AdamW |
| Dataset Size | 1,964 images |
Dataset
Trained on kiffusion-space-scifi, a curated dataset of 1,964 image-caption pairs:
| Source | Count | Description |
|---|---|---|
| NASA | 915 | Real space photography (public domain) |
| Wallhaven | 845 | High-quality sci-fi & space digital art |
| LAION | 204 | Curated from LAION-2B aesthetic subset |
All images are RGB, minimum 512px, auto-captioned with JoyCaption using the trigger word spacevision.
Recommended Prompts
spacevision, the Andromeda Galaxy M31, spiral arms with billions of stars, cosmic dust lanes
spacevision, Saturn's rings in stunning detail, ice particles catching sunlight, gas giant backdrop
spacevision, a binary star system with accretion disk, matter streaming between stars
spacevision, the Horsehead Nebula silhouette against glowing hydrogen gas, Orion constellation
spacevision, Jupiter's Great Red Spot, massive anticyclonic storm, swirling cloud bands
spacevision, the Helix Nebula planetary nebula, dying star shedding outer layers, eye of God
Limitations
- Optimized for space/astronomy imagery; may not generalize well to other domains
- Best results with the
spacevisiontrigger word - Requires int8 quantization for consumer GPUs (~24GB VRAM)
- Generated images are artistic interpretations, not scientifically accurate
License
This LoRA adapter inherits the license from FLUX.2-klein-base-9B. Please refer to the FLUX.2 Research License for usage terms.
The training dataset contains images from NASA (public domain), Wallhaven (various licenses), and LAION (CC-BY-NC-4.0).
Acknowledgments
- Black Forest Labs โ For the FLUX.2-klein base model
- SimpleTuner by @bghira โ Training framework
- NASA โ Public domain space imagery
- Hugging Face โ Model hosting and diffusers library
Citation
If you use this model in your research or projects, please cite:
@misc{spacevision-flux2-lora,
author = {Khadim Hussain},
title = {SpaceVision FLUX.2-klein LoRA: Space and Astronomy Image Generation},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/khadim-hussain/spacevision-flux2-lora}},
}
Related Models
- spacevision-kolors-lora โ SpaceVision LoRA for Kolors model
- kiffusion-space-scifi โ Training dataset
Contact
For questions, issues, or contributions, please open an issue on the Kiffusion GitHub repository.
- Downloads last month
- 19
Model tree for khadim-hussain/spacevision-flux2-lora
Base model
black-forest-labs/FLUX.2-klein-base-9B






