/ Модель

Характеристики

Лицензия
OpenRAIL
Библиотека
diffusers
Опубликована
12 июн 2024

StableMaterials

Генерация изображенийТекст → изображение3 профессии

StableMaterials генерирует тайловые PBR-карты материалов по текстовым и графическим запросам для компьютерной графики.

959скачиваний за 30 дней36лайковвеса обновлены5 апр 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

StableMaterials — диффузионная модель генерации фотореалистичных PBR-материалов, разработанная с использованием подхода MatFuse на основе латентной диффузии. Она создаёт тайловые карты материалов разрешением 512×512 по текстовому или графическому запросу: базовый цвет, шероховатость, металлические свойства, высоту и нормали. Модель предназначена для создания материалов в разработке игр, архитектурной визуализации и цифровом контенте.

Модель использует VAE для сжатия изображения и латентный диффузионный процесс. Обучение сочетает размеченные и неразмеченные данные, включая материалы из MatSynth и набора Deschaintre et al., а также текстурно-текстовые пары, созданные SDXL. В репозитории представлены базовая и consistency-версии; последняя сокращает число шагов генерации. Для получения тайловых результатов применяется свёртка признаковых карт в U-Net.

Модель может испытывать трудности со сложными пространственными описаниями, тонкими узорами и фигурами, а также иногда неверно предсказывает отражательные свойства отдельных материалов. Лицензия — OpenRAIL.

Сценарии применения

  • создание тайловых PBR-текстур для видеоигр
  • генерация материалов для архитектурной визуализации
  • получение базового цвета, шероховатости и металлических свойств поверхности
  • создание карт высот и нормалей по описанию материала

Ограничения

Модель может ошибаться при сложных пространственных запросах и создании мелких узоров или фигур; для некоторых типов материалов она неверно предсказывает отражательные свойства.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

StableMaterials

StableMaterials is a diffusion-based model designed for generating photorealistic physical-based rendering (PBR) materials. This model integrates semi-supervised learning with Latent Diffusion Models (LDMs) to produce high-resolution, tileable material maps from text or image prompts. StableMaterials can infer both diffuse (Basecolor) and specular (Roughness, Metallic) properties, as well as the material mesostructure (Height, Normal). 🌟

For more details, visit the project page or read the full paper on arXiv.

⚠️ This repo contains the weight and the pipeline code for the base model in both the LDM and LCM verisons. The refiner model, along with its pipeline and the inpainting pipeline, will be released shortly.

Model Architecture

🧩 Base Model

The base model generates low-resolution (512x512) material maps using a compression VAE (Variational Autoencoder) followed by a latent diffusion process. The architecture is based on the MatFuse adaptation of the LDM paradigm, optimized for material map generation with a focus on diversity and high visual fidelity. 🖼️

🔑 Key Features

  • Semi-Supervised Learning: The model is trained using both annotated and unannotated data, leveraging adversarial training to distill knowledge from large-scale pretrained image generation models. 📚
  • Knowledge Distillation: Incorporates unannotated texture samples generated using the SDXL model into the training process, bridging the gap between different data distributions. 🌐
  • Latent Consistency: Employs a latent consistency model to facilitate fast generation, reducing the inference steps required to produce high-quality outputs. ⚡
  • Feature Rolling: Introduces a novel tileability technique by rolling feature maps for each convolutional and attention layer in the U-Net architecture. 🎢

Intended Use

StableMaterials is designed for generating high-quality, realistic PBR materials for applications in computer graphics, such as video game development, architectural visualization, and digital content creation. The model supports both text and image-based prompting, allowing for versatile and intuitive material generation. 🕹️🏛️📸

🧑‍💻 Usage

To generate materials using the StableMaterials base model, use the following code snippet:

Standard model

from diffusers import DiffusionPipeline
from diffusers.utils import load_image

# Load pipeline enabling the execution of custom code
pipe = DiffusionPipeline.from_pretrained(
    "gvecchio/StableMaterials", 
    trust_remote_code=True, 
    torch_dtype=torch.float16
)

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
pipe = pipe.to(device)

# Text prompt example
material = pipe(
  prompt="Old rusty metal bars with peeling paint",
  guidance_scale=10.0,
  tileable=True,
  num_images_per_prompt=1,
  num_inference_steps=50,
).images[0]

# Image prompt example
material = pipe(
  prompt=load_image("path/to/input_image.jpg"),
  guidance_scale=10.0,
  tileable=True,
  num_images_per_prompt=1,
  num_inference_steps=50,
).images[0]

# The output will include basecolor, normal, height, roughness, and metallic maps
basecolor = material.basecolor
normal = material.normal
height = material.height
roughness = material.roughness
metallic = material.metallic

Consistency model

from diffusers import DiffusionPipeline, LCMScheduler, UNet2DConditionModel
from diffusers.utils import load_image

# Load LCM distilled unet
unet = UNet2DConditionModel.from_pretrained(
    "gvecchio/StableMaterials",
    subfolder="unet_lcm",
    torch_dtype=torch.float16,
)

# Load pipeline enabling the execution of custom code
pipe = DiffusionPipeline.from_pretrained(
    "gvecchio/StableMaterials", 
    trust_remote_code=True, 
    unet=unet,
    torch_dtype=torch.float16
)

# Replace scheduler with LCM scheduler
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
pipe = pipe.to(device)

# Text prompt example
material = pipe(
  prompt="Old rusty metal bars with peeling paint",
  guidance_scale=10.0,
  tileable=True,
  num_images_per_prompt=1,
  num_inference_steps=4, # LCM enables fast generation in as few as 4 steps
).images[0]

# Image prompt example
material = pipe(
  prompt=load_image("path/to/input_image.jpg"),
  guidance_scale=10.0,
  tileable=True,
  num_images_per_prompt=1,
  num_inference_steps=4,
).images[0]

# The output will include basecolor, normal, height, roughness, and metallic maps
basecolor = material.basecolor
normal = material.normal
height = material.height
roughness = material.roughness
metallic = material.metallic

🗂️ Training Data

The model is trained on a combined dataset from MatSynth and Deschaintre et al., including 6,198 unique PBR materials. It also incorporates 4,000 texture-text pairs generated from the SDXL model using various prompts. 🔍

🔧 Limitations

While StableMaterials shows robust performance, it has some limitations:

  • It may struggle with complex prompts describing intricate spatial relationships. 🧩
  • It may not accurately represent highly detailed patterns or figures. 🎨
  • It occasionally generates incorrect reflectance properties for certain material types. ✨

Future updates aim to address these limitations by incorporating more diverse training prompts and improving the model's handling of complex textures.

📖 Citation

If you use this model in your research, please cite the following paper:

@article{vecchio2024stablematerials,
  title={StableMaterials: Enhancing Diversity in Material Generation via Semi-Supervised Learning},
  author={Vecchio, Giuseppe},
  journal={arXiv preprint arXiv:2406.09293},
  year={2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · diffusers

Нельзя запустить

В репозитории нет model_index.json: DiffusionPipeline его не соберёт.

Ревизия весов
4d45273

0 моделей