Run this model with HF Jobs

Run BiliSakura/Text2Earth-ControlNet-xBD on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/BiliSakura/Text2Earth-ControlNet-xBD. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/BiliSakura/Text2Earth-ControlNet-xBD on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Text2Earth ControlNet for xBD

ControlNet fine-tuned on xBD post-event imagery. It takes a building-damage mask and samples a matching satellite image from Text2Earth.

The ControlNet is the only trained module. Text2Earth (UNet, VAE, text encoder) stays frozen.

Conditioning

Item Value
Base model lcybuaa/Text2Earth
Conditioning 3-channel binary damage mask, RGB order, values in {0, 1}
Prompt 18_GOOGLE_LEVEL_a high resolution satellite image
Scheduler Euler discrete
Steps / guidance 50 / 1.0

Binary channels follow the xBD hues: background black, no-damage green, minor blue, major yellow, destroy red, un-classified white.

Usage

import torch
from diffusers import (
    ControlNetModel,
    EulerDiscreteScheduler,
    StableDiffusionControlNetPipeline,
)
from PIL import Image

repo = "BiliSakura/Text2Earth-ControlNet-xBD"
base = "lcybuaa/Text2Earth"
dtype = torch.float16

controlnet = ControlNetModel.from_pretrained(
    repo, subfolder="controlnet", torch_dtype=dtype
)
pipe = StableDiffusionControlNetPipeline.from_pretrained(
    base,
    controlnet=controlnet,
    scheduler=EulerDiscreteScheduler.from_pretrained(base, subfolder="scheduler"),
    torch_dtype=dtype,
    safety_checker=None,
).to("cuda")

image = pipe(
    "18_GOOGLE_LEVEL_a high resolution satellite image",
    image=Image.open("mask.png"),
    num_inference_steps=50,
    guidance_scale=1.0,
    controlnet_conditioning_scale=1.0,
).images[0]
image.save("post_event.png")

Weights are under controlnet/.

License

CC BY-NC-SA 4.0, the license of the xBD dataset these weights were trained on.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for BiliSakura/Text2Earth-ControlNet-xBD

Adapter
(1)
this model