Structure-retained low-rank adapters for weather synthesis

Shunxin Wang, Alexandros Stergiou, Luuk Spreeuwers, Estefania Talavera, Nicola StrisciuglioarXiv 2026 · arXiv

Training robust computer vision models for autonomous driving or outdoor surveillance requires a massive variety of data. While we have plenty of "sunny day" images, high-quality data for adverse weather—like heavy rain, fog, or snow—is notoriously difficult to collect. Generative models like Stable Diffusion offer a solution, but they often struggle with a critical requirement: preserving the exact structural layout of the original scene.

TL;DR

This paper introduces a novel weather synthesis framework using structure-retaining Low-Rank Adapters (LoRA) for Stable Diffusion XL (SDXL). By identifying and targeting specific structural blocks within the model's architecture, the authors can realistically manipulate weather effects while keeping the original scene's objects and layout perfectly intact, outperforming existing methods in both realism and structure preservation.

What Problem Does This Paper Address?

The core challenge in synthetic weather generation is decoupling weather from scene content.

Existing datasets often have "temporal and spatial variations"—meaning that between a sunny shot and a rainy shot of the same street, cars have moved, pedestrians have walked away, or the camera angle has slightly shifted. When we try to use generative models to "paint" rain onto a sunny image, they often hallucinate changes: a truck might turn into a car, or the texture of a building might completely change.

While tools like ControlNet can help preserve structure by providing edge maps, they often lose fine-grained details like original textures and object identities. The authors sought a more lightweight, integrated way to tell a model: "Change the weather, but don't touch the truck."

Figure 1. Text-guided weather manipulation with structure-LoRA for preserving the structural layout of input images.

Methods

The researchers took a two-step approach:

  1. Architectural Analysis: They first investigated where structural information lives inside SDXL. Using ControlNet as a probe, they systematically masked or isolated different UNet blocks to see which ones were responsible for maintaining the layout of the input image.
  2. Structure-LoRA: They discovered that the middle block of the SDXL UNet is the primary anchor for structural information. Based on this, they designed "structure-LoRAs"—efficient, low-rank adapters trained specifically on these structure-sensitive blocks.

During training, they used a DreamBooth-style objective to learn separate LoRA matrices for structure, content, and style. At inference time, they could then apply the structure-LoRA alongside simple text prompts (e.g., "realistic in rainy weather") to guide the image-to-image translation without needing external spatial conditions like Canny edges.

Figure 2. (a) Partial SDXL-ControlNet architecture. We use two strategies: (b) removing one of the embeddings and (c) retaining only one embedding to examine the influence of the condition embeddings fed to different blocks of SDXL on the structural information of the generated images. The weights of each block are denoted as Wi.

Datasets

  • Caltech 256: Used for the initial architectural analysis due to its clear object contours and simple backgrounds.
  • Haztruck Dataset: A real-world dataset containing truck images with hazmat plates. This served as the primary benchmark for weather synthesis, as preserving the specific details of the trucks (like the hazmat signs) is a high-stakes task for computer vision.
  • Synthetic Pairs: To train baseline models, the authors used Gemini 2.5 Flash Image to generate perfectly aligned image pairs (e.g., sunny vs. rainy) to serve as ground truth for style transfer.

Key Insights and Ideas

  • The "Structural DNA" of SDXL: The most significant finding is that structural sensitivity is not uniform across the model. The middle block of the UNet is highly correlated with structure preservation. Masking it leads to distorted objects, while retaining only its signal allows the model to recover most structural details.
  • LoRA as a Condition: Instead of using heavy external conditioning (like ControlNet), structural priors can be "baked" into the model via LoRA. This makes the pipeline more lightweight and better at preserving fine textures that ControlNet might otherwise smooth over.
  • LLM-as-Judge: To evaluate if the weather effects were actually successful, the authors used Gemini 2.5 Flash as a meteorological expert. The LLM analyzed the generated images and provided a structured JSON report on sky conditions, precipitation, and visibility, providing a more objective metric than standard pixel-based losses.
The pipeline for learning and applying LoRA matrices for structure, style, and content.

Key Results

The proposed Structure-LoRA method achieved a superior balance between realism and layout fidelity:

  • Structure Preservation: It achieved the highest SSIM (0.601) compared to baselines like B-LoRA (0.563) and PairCustomization (0.547), indicating it kept the original scene layout much better.
  • Realism: It recorded the lowest LPIPS score (0.388), meaning the generated images were perceptually closer to real-world images than the baselines.
  • Weather Success: While PairCustomization had a higher raw success rate for some weather types, it often did so by completely changing the scene content. Structure-LoRA maintained a high average success rate (54.13%) while actually keeping the original truck in the frame.

Limitations and Future Work

Despite the improvements, the authors noted a few hurdles:

  • Fine-Detail Loss: While the general structure is preserved, tiny details like the specific text on a license plate or a hazmat sign can still be blurred. The authors suggest incorporating text inpainting to recover these critical identifiers.
  • Semantic Gaps: If the input image has a very strong existing weather condition (like a bright, high-contrast sun), the model sometimes struggles to "overpaint" it with a drastically different condition like heavy fog using only text prompts.
  • Future Direction: The team aims to work on more explicit disentanglement of weather effects from the underlying image content to handle these extreme semantic shifts.

Summary updated

Abstract

Real-world deployment of computer vision models, particularly in outdoor scenarios, is often limited by environmental interferences, such as adverse weather. Improving model robustness across weather conditions is thus critical for reliability. However, sourcing high-quality data relevant to isolated weather effects is a significant challenge. Most datasets include changes in dynamic elements across observations of the same scene: subjects such as pedestrians and vehicles change between shots, while camera viewpoints vary. These aspects make it difficult to decouple solely weather-induced distribution shifts from the scene. In this work, we address this with a novel weather synthesis framework that utilizes structure-retaining Low-Rank Adapters (LoRA). We analyze the attention blocks in Stable Diffusion XL (SDXL) and identify where relevant structural information is mostly processed during image-to-image translation. Through an architectural analysis of SDXL, we learn structural LoRA matrices for the corresponding blocks and then leverage them for weather synthesis, eliminating the need for external conditioning such as ControlNet. Experimental results demonstrate that our method improves upon existing synthesis approaches, achieving greater realism while preserving structure. This provides a robust pipeline for generating high-fidelity training and evaluation data for outdoor computer vision applications.
BibTeX
@misc{wang2026structure,
  author = {Shunxin Wang and Alexandros Stergiou and Luuk Spreeuwers and Estefania Talavera and Nicola Strisciuglio},
  title = {{Structure-retained low-rank adapters for weather synthesis}},
  year = {2026},
  eprint = {2610.38413},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.38413},
}
Figure