Training-free large-scale remote sensing text-to-image synthesis with an RS-adapted FLUX prior and dynamic positional adaptation.
SHARP is a training-free resolution promotion framework for remote sensing text-to-image synthesis. Built on top of an RS-adapted FLUX prior, it applies stronger positional extrapolation during early layout formation and progressively relaxes it during late detail recovery, enabling robust large-scale generation while preserving the dense high-frequency structures that are especially important in remote sensing imagery.
In short: SHARP helps generate sharper, larger, and more structure-faithful remote sensing images without extra training.
The fine-tuned checkpoint is available at: BxuanZ/FLUX-RS
- β¨ Training-free resolution promotion for remote sensing image synthesis
- π°οΈ Spectrum-aware dynamic positional adaptation aligned with diffusion denoising
- π Resolution-agnostic generation across square and rectangular high resolutions
- β‘ FLUX-based implementation powered by an RS-specialized generative prior
- π§© Single-GPU and multi-GPU entry points for both quick demos and batch evaluation
The figure below gives a quick look at the SHARP framework and its design intuition:
- β SHARP inference code
- β Fine-tuned RS-FLUX weights
- β Training data
Click to expand the project layout
SHARP/
βββ assets/
β βββ logo.png
βββ checkpoints/
β βββ .gitkeep
βββ docs/
β βββ structure.png
βββ flux/
β βββ pipeline_flux.py
β βββ transformer_flux.py
βββ LICENSE
βββ README.md
βββ requirements.txt
βββ rs_t2i_eval_prompts_100.txt
βββ run_sharp.py
βββ run_sharp.sh
βββ run_sharp_multi_gpu.py
| File | Description |
|---|---|
run_sharp.py |
Official SHARP single-GPU generation entry |
run_sharp_multi_gpu.py |
Multi-GPU batch launcher for multi-scale generation |
run_sharp.sh |
Thin shell wrapper around run_sharp.py |
flux/pipeline_flux.py |
SHARP pipeline implementation |
flux/transformer_flux.py |
SHARP transformer with dynamic positional adaptation |
rs_t2i_eval_prompts_100.txt |
Example prompt list for quick evaluation |
checkpoints/ |
Default place for storing local checkpoints |
conda create -n sharp python=3.10
conda activate sharppip install -r requirements.txttorch
torchvision
diffusers
transformers
accelerate
sentencepiece
The recommended checkpoint is the RS-adapted FLUX model hosted on Hugging Face:
By default, SHARP looks for checkpoints under:
checkpoints/
You can use either workflow below:
- Place the downloaded
FLUX-RSmodel directory undercheckpoints/, then run SHARP without changing--ckpt_path - Pass the checkpoint directory explicitly with
--ckpt_path /path/to/your_checkpoint_dir
A valid checkpoint directory should contain a transformer/ subfolder, for example:
checkpoints/<your_checkpoint_dir>/
bash run_sharp.sh \
--prompt "A satellite image of a rural market town with dense shop blocks, a bus station, surrounding crop fields, narrow feeder roads, and mixed residential and commercial parcels." \
--width 1024 \
--height 1024python run_sharp.py \
--prompt_file rs_t2i_eval_prompts_100.txt \
--width 1024 \
--height 1536 \
--ckpt_path checkpoints/<your_checkpoint_dir> \
--save_prefix sharp_eval \
--out_dir sharp_outputspython run_sharp_multi_gpu.py \
--gpus 0 1 2 \
--prompt_file rs_t2i_eval_prompts_100.txt \
--ckpt_path checkpoints/<your_checkpoint_dir> \
--scales 1024x1024 1764x1764 1024x1536 1920x1024- SHARP uses one fixed inference path, so no method switch is needed.
- The default single-GPU output directory is
sharp_outputs/. - The default multi-GPU output directory is
sharp_outputs_eval/. run_sharp_multi_gpu.pywill auto-detect GPUs when--gpusis not provided.- If
--ckpt_pathpoints tocheckpoints/, SHARP can auto-discover the model only when exactly one valid checkpoint directory exists there. - For FLUX latent packing, image sizes are ideally divisible by
16. Otherwise, the effective generated size may be rounded down internally. --skip_existingis useful for resuming long batch jobs without re-generating finished outputs.
bash run_sharp.sh
python run_sharp.py --help
python run_sharp_multi_gpu.py --helpThese entry points were sanity-checked with --help.
SHARP is built on an RS-adapted FLUX prior and includes custom remote sensing generation utilities for practical large-resolution synthesis.
If you find SHARP useful in your research, please cite our paper:
@misc{zhao2026sharpspectrumawarehighlydynamicadaptation,
title={SHARP: Spectrum-aware Highly-dynamic Adaptation for Resolution Promotion in Remote Sensing Synthesis},
author={Bingxuan Zhao and Qing Zhou and Chuang Yang and Qi Wang},
year={2026},
eprint={2603.21783},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2603.21783},
}This project is released under the MIT License.
