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."
Methods
The researchers took a two-step approach:
- 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.
- 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.
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.
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