Skip to content

federicadigiaimo/textile-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Textile Generation based on Diffusion Models

Python PyTorch Stable Diffusion License

This repository contains a toolkit for the semantic expansion and synthesis of textile textures, developed as part of a Master’s Thesis in Computer Engineering at the University of Bologna.

Project Overview

The project tackles a key bottleneck in AAA game development: the creation of high-quality textile assets.

Traditional tiling techniques often produce visible repetitions (the “wallpaper effect”), while manual asset creation is both expensive and time-consuming.
This work introduces a generative approach to perform semantic upscaling from 256×256 source samples to 1024×1024 production-ready textures that are:

  • Seamless (natively tileable)
  • Structurally coherent
  • Visually consistent

Key Features

  • Dual-Pathway Framework Adaptive generation strategies based on textile topology:
    • Regular / Geometric patterns (first figure)
    • Irregular / Organic patterns (second figure)

Result of an expanded texture with regular pattern Result of an expanded texture with irregular pattern

  • Visual Guidance (IP-Adapter)
    Uses image-based conditioning to control weave density and material identity, overcoming the limitations of text-only prompts.

  • Native Tileability
    Seamless textures are achieved through Noise Rolling and Circular Padding, applied directly within the denoising loop to model the latent space as a toroidal surface.

  • Latent Replication
    A structured initialization strategy applied at ~60% of the denoising process to upscale resolution while preventing structural drift.

Technical Stack

  • Model: Stable Diffusion v1.5 (Latent Diffusion Model)
  • VAE Decoder: Fine-tuned MSE (ft-mse) variant for high-frequency detail preservation
  • Hardware: NVIDIA Quadro P4000 (Pascal architecture)

Project Structure

.
├── assets/
├── main_irregular.ipynb  # code for texture with irregular patterns
├── main_regular.ipynb    # code for texture with regular patterns
├── docs/
│   └── textile-generation_presentation.pdf
├── README.md
├── .gitignore
├── LICENSE

Authors

About

Automated synthesis of high-resolution (1024×1024), seamless textile textures from 256×256 samples using Stable Diffusion and IP-Adapter. Developed for Computer Engineering Master's Thesis at UNIBO.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages