BiliSakura / HSIGene

huggingface.co
Total runs: 16
24-hour runs: 0
7-day runs: -2
30-day runs: 9
Model's Last Updated: March 09 2026
image-to-image

Introduction of HSIGene

Model Details of HSIGene

BiliSakura/HSIGene

Hyperspectral image generation — HSIGene converted to diffusers format. Conditional generation with local controls (HED, MLSD, sketch, segmentation), global controls (content, text), and metadata embeddings. Outputs 48-band hyperspectral images (256×256 pixels).

Source: HSIGene . Converted to diffusers format; model dir is self-contained (no external project for inference).

Conversion

The main diffusion checkpoint ( last.ckpt ) must be downloaded from GoogleDrive and placed in projects/HSIGene-Diffusers/checkpoints/ .

Note: models/raw/HSIGene contains annotator/auxiliary models (body pose, depth, SAM, etc.) only — not the main diffusion checkpoint.

cd projects/HSIGene-Diffusers
python convert_to_diffusers.py \
    --config_path configs/inference.yaml \
    --ckpt_path checkpoints/last.ckpt \
    --output_dir /root/worksapce/models/BiliSakura/HSIGene
Repository Structure (after conversion)
Component Path
UNet (LocalControlUNet) unet/
VAE vae/
Text encoder (CLIP) text_encoder/
Local adapter local_adapter/
Global content adapter global_content_adapter/
Global text adapter global_text_adapter/
Metadata encoder metadata_encoder/
Scheduler scheduler/
Pipeline pipeline_hsigene.py
Config model_index.json
Usage

Option 1 – No sys.path.insert (AeroGen-style): Load the pipeline from the model path via importlib ; the model dir is added to the path automatically.

import importlib.util
import sys

model_path = "/path/to/HSIGene"  # or "BiliSakura/HSIGene" for Hub
spec = importlib.util.spec_from_file_location("pipeline_hsigene", f"{model_path}/pipeline_hsigene.py")
mod = importlib.util.module_from_spec(spec)
sys.modules["pipeline_hsigene"] = mod
spec.loader.exec_module(mod)

pipe = mod.HSIGenePipeline.from_pretrained(model_path)
pipe = pipe.to("cuda")

Option 2 – With sys.path.insert : Simpler if you are fine adding the model dir to the path once.

import sys
sys.path.insert(0, "/path/to/HSIGene")
from pipeline_hsigene import HSIGenePipeline

pipe = HSIGenePipeline.from_pretrained("/path/to/HSIGene")
pipe = pipe.to("cuda")

Option 3 – DiffusionPipeline.from_pretrained : May work with trust_remote_code=True . If you see "raw config (list)" errors (e.g. when loading from cache), use Option 1 or 2 instead.

from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("/path/to/HSIGene", trust_remote_code=True)
pipe = pipe.to("cuda")

Dependencies: pip install diffusers transformers torch einops safetensors

# Conditional generation
output = pipe(
    prompt="Wasteland",
    num_samples=1,
    height=256,
    width=256,
    num_inference_steps=50,
    local_conditions=local_tensor,   # (B, 18, H, W) or None
    global_conditions=global_tensor, # (B, 768) or None
    metadata=metadata_tensor,        # (7,) or (B, 7) or None
    guidance_scale=1.0,
)
images = output.images  # (B, H, W, 48) in [0, 1]
Conditioning
  • Local : 18-channel maps (HED, MLSD, sketch, segmentation, etc.) at 512×512 default.
  • Global : 768-dim CLIP features from reference images.
  • Metadata : 7-dim vector.
  • Text : Via prompt ; use text_strength to scale.
Model Sources
Citation
@misc{pang2024hsigenefoundationmodelhyperspectral,
  title={HSIGene: A Foundation Model For Hyperspectral Image Generation},
  author={Li Pang and Datao Tang and Shuang Xu and Deyu Meng and Xiangyong Cao},
  year={2024},
  eprint={2409.12470},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
}

Runs of BiliSakura HSIGene on huggingface.co

16
Total runs
0
24-hour runs
-1
3-day runs
-2
7-day runs
9
30-day runs

More Information About HSIGene huggingface.co Model

More HSIGene license Visit here:

https://choosealicense.com/licenses/apache-2.0

HSIGene huggingface.co

HSIGene huggingface.co is an AI model on huggingface.co that provides HSIGene's model effect (), which can be used instantly with this BiliSakura HSIGene model. huggingface.co supports a free trial of the HSIGene model, and also provides paid use of the HSIGene. Support call HSIGene model through api, including Node.js, Python, http.

BiliSakura HSIGene online free

HSIGene huggingface.co is an online trial and call api platform, which integrates HSIGene's modeling effects, including api services, and provides a free online trial of HSIGene, you can try HSIGene online for free by clicking the link below.

BiliSakura HSIGene online free url in huggingface.co:

https://huggingface.co/BiliSakura/HSIGene

HSIGene install

HSIGene is an open source model from GitHub that offers a free installation service, and any user can find HSIGene on GitHub to install. At the same time, huggingface.co provides the effect of HSIGene install, users can directly use HSIGene installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

HSIGene install url in huggingface.co:

https://huggingface.co/BiliSakura/HSIGene

Url of HSIGene

Provider of HSIGene huggingface.co

BiliSakura
ORGANIZATIONS

Other API from BiliSakura

huggingface.co

Total runs: 131
Run Growth: 89
Growth Rate: 67.94%
Updated:February 16 2026
huggingface.co

Total runs: 29
Run Growth: -11
Growth Rate: -37.93%
Updated:February 16 2026
huggingface.co

Total runs: 8
Run Growth: -10
Growth Rate: -100.00%
Updated:March 09 2026
huggingface.co

Total runs: 8
Run Growth: 5
Growth Rate: 62.50%
Updated:March 09 2026
huggingface.co

Total runs: 2
Run Growth: -3
Growth Rate: -100.00%
Updated:March 09 2026