RSEdit-DiT-Modified
Local diffusers-compatible checkpoint with custom pipeline code.
Default Inference Settings
torch_dtype=torch.bfloat16guidance_scale=4.5guidance_interval=(0.0, 1.0)(default: guidance active for the full denoising schedule)image_guidance_scale=None(falls back toguidance_scale)num_inference_steps=50clean_caption=False
Quick Start
import torch
from PIL import Image
from diffusers import DiffusionPipeline
model_dir = "/data/projects/RSEdit/models/BiliSakura/RSEdit-DiT-Modified"
img_path = "/data/projects/RSEdit/datasets/BiliSakura/RSCC-RSEdit-Test-Split/images/hurricane-florence_00000109_post_disaster_part1.png"
out_path = "/data/projects/RSEdit/outputs/hurricane-florence_00000109_rsedit_bf16_cfg4p5_seed12345.png"
prompt = "Severe flooding engulfed the area, submerging all six buildings up to their rooftops, causing partial wall collapses and significant structural weakening. Vegetation along the shoreline was stripped away by rushing waters, exposing bare earth and debris. Roads near the settlement became impassable due to mudslides and erosion, isolating the community. No intact structures remained visible, with every building classified as majorly damaged (Level 2) under disaster protocols."
pipe = DiffusionPipeline.from_pretrained(
model_dir,
custom_pipeline=f"{model_dir}/pipeline.py",
torch_dtype=torch.bfloat16,
).to("cuda")
print("Pipeline:", pipe.__class__.__name__)
print("Transformer:", pipe.transformer.__class__.__name__)
image = Image.open(img_path).convert("RGB")
result = pipe(
prompt=prompt,
source_image=image,
num_inference_steps=50,
guidance_scale=4.5,
image_guidance_scale=1.5,
guidance_interval=(0.0, 1.0), # default full-range guidance
clean_caption=False,
generator=torch.Generator(device="cuda").manual_seed(12345),
).images[0]
result.save(out_path)
print("Saved:", out_path)
- Downloads last month
- -