DiffCloth: Diffusion Based Garment Synthesis and Manipulation via Structural Cross-modal Semantic Alignment

Xujie Zhang, Binbin Yang, Michael C. Kampffmeyer, Wenqing Zhang, Shiyue Zhang, Guansong Lu, Liang Lin, Hang Xu, Xiaodan Liang

Abstract

While general-purpose text-to-image diffusion models have achieved remarkable success, they often struggle with the highly structured domain of fashion, leading to issues such as attribute confusion and part leakage. We present DiffCloth, a diffusion-based framework designed to enforce structural alignment between linguistic phrases and specific garment components. By utilizing a bipartite matching strategy and semantic-bundled attention maps, DiffCloth enables high-fidelity garment synthesis and precise, localized editing without the need for manual masking. Our experiments on the CM-Fashion dataset demonstrate that DiffCloth significantly outperforms state-of-the-art models in both text-alignment and image quality.

Introduction

Text-to-image generation has seen rapid advancement, yet the generation of complex, structured objects like clothing remains a challenge. Standard models often treat text as a flat sequence of tokens and images as a grid of pixels, ignoring the inherent structural hierarchy of garments. This leads to two primary failure modes: Garment Part Leakage, where specific prompted elements (e.g., "front zip fastening") are omitted, and Attribute Confusion, where descriptions are misattributed (e.g., a "blue shirt with a brown collar" appearing as a brown shirt with a blue collar).

DiffCloth addresses these challenges by treating garment generation as a structural alignment problem. By exploiting the predictable topology of fashion, the model ensures that every described attribute is correctly mapped to its corresponding visual region, maintaining high consistency during both synthesis and manipulation.

Methodology

Structural Semantic Consensus Guidance

To bridge the gap between linguistic descriptions and visual parts, DiffCloth introduces a pipeline that extracts structure from both modalities. A constituency parser is employed to decompose the text prompt into discrete "Attribute-Phrases" (APs), such as "red collar" or "blue sleeves." Concurrently, a semantic segmentor (Pointrend) partitions the evolving image into visual garment parts. The framework then formulates a Hungarian matching loss—a bipartite matching strategy—to force a mathematical alignment between each linguistic AP and its corresponding visual part using CLIP similarity. This ensures that every part mentioned in the prompt is represented in the final image.

Semantic-bundled Cross-attention

To mitigate attribute confusion, DiffCloth introduces a mechanism to "bundle" adjectives with their respective nouns. Using a loss function based on Jensen-Shannon (JS) divergence, the model ensures that the attention map of an adjective (e.g., "red") spatially overlaps with the attention map of the noun it modifies (e.g., "collar"). This spatial constraint prevents attributes from "bleeding" into unrelated regions of the garment.

Region Consistency Mechanism

For garment manipulation, DiffCloth enables localized editing without manual user masks. By blending the attention maps of modified phrases, the model identifies the specific regions requiring change. During the diffusion denoising process, the framework "freezes" the pixels in irrelevant regions, allowing for precise modifications—such as changing sleeve length or collar style—while maintaining the texture and style of the rest of the garment.

Experimental Setup

Datasets and Training

The researchers utilized the CM-Fashion dataset, a high-resolution benchmark containing 509,482 image-text pairs. The dataset was split into 409,000 training pairs and 100,000 testing pairs. To ensure the model could recognize garment parts even during the noisy intermediate stages of diffusion, 100,000 image-mask pairs from the training set were used to specifically train the Pointrend segmentor.

Results and Discussion

Quantitative Performance

DiffCloth demonstrated superior performance across standard metrics on the CM-Fashion dataset:

  • FID (Fréchet Inception Distance): DiffCloth achieved a score of 9.201, outperforming both Stable Diffusion (9.475) and StructureDiffusion (9.238), indicating higher image quality and realism.
  • CLIPScore: The model achieved a score of 0.8974, a significant improvement over Stable Diffusion (0.8169), confirming much stronger alignment between the user's prompt and the generated output.

Qualitative and Human Evaluation

In human preference studies, DiffCloth was preferred in 47% of cases for manipulation tasks, whereas existing methods like Blended Diffusion were preferred only 4% of the time. The model successfully captured fine-grained details, such as specific logo placements and complex fastenings, which are typically ignored by general-purpose models.

Conclusion and Future Work

DiffCloth demonstrates that incorporating structural priors is essential for high-fidelity fashion synthesis. By moving beyond flat sequences to a structured, bipartite matching approach, the model solves persistent issues of attribute leakage and confusion. While the current implementation is sensitive to noisy or ungrammatical text prompts, future research will focus on increasing robustness to diverse and conversational design instructions, further bridging the gap between AI generation and professional fashion design.

Summary updated

BibTeX
@inproceedings{zhang2023diffcloth,
  author = {Xujie Zhang and Binbin Yang and Michael C. Kampffmeyer and Wenqing Zhang and Shiyue Zhang and Guansong Lu and Liang Lin and Hang Xu and Xiaodan Liang},
  title = {{DiffCloth: Diffusion Based Garment Synthesis and Manipulation via Structural Cross-modal Semantic Alignment}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure