Views
No views yet
pip install diffusers transformers accelerate scipy safetensors1import torch
2from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
3
4model_id = "lcybuaa/Text2Earth"
5# Running the pipeline (if you don't swap the scheduler it will run with the default DDIM, in this example we are swapping it to DPMSolverMultistepScheduler):
6scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
7pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, scheduler=scheduler,
8 custom_pipeline="pipeline_text2earth_diffusion", safety_checker=None)
9pipe = pipe.to("cuda")
10prompt = "Seven green circular farmlands are neatly arranged on the ground"
11image = pipe(prompt,
12 height=256,
13 width=256,
14 num_inference_steps=50,
15 guidance_scale=4.0).images[0]
16
17image.save("circular.png")@ARTICLE{10988859,
author={Liu, Chenyang and Chen, Keyan and Zhao, Rui and Zou, Zhengxia and Shi, Zhenwei},
journal={IEEE Geoscience and Remote Sensing Magazine},
title={Text2Earth: Unlocking text-driven remote sensing image generation with a global-scale dataset and a foundation model},
year={2025},
volume={},
number={},
pages={2-23},
doi={10.1109/MGRS.2025.3560455}}