ardagurer's picture
Upload folder using huggingface_hub
889f350 verified
|
Raw History Blame Contribute Delete
2.61 kB
metadata
license: cc-by-nc-4.0
tags:
  - text-to-image
  - diffusion
  - latent-diffusion
  - art
  - paintings
pipeline_tag: text-to-image

Renaissance Diffusion

A 326M-parameter text-to-painting latent diffusion UNet trained from scratch on 69,798 paintings (WikiArt plus the open-access collections of the Met, the Art Institute of Chicago, the Rijksmuseum, the Cleveland Museum of Art and the Smithsonian). It works in the latent space of the Stable Diffusion 1.5 VAE and is conditioned on CLIP ViT-B/32 text embeddings.

samples

Code, training recipe and more examples: github.com/ardagurer11/renaissance-diffusion

Usage

pip install git+https://github.com/ardagurer11/renaissance-diffusion.git
renaissance-generate "A Baroque portrait by rembrandt." -n 4 --seed 2 -o rembrandt.png
from renaissance_diffusion import RenaissancePipeline

pipe = RenaissancePipeline.from_pretrained("ardagurer/renaissance-diffusion")
images = pipe("A Impressionism landscape by claude monet.", num_images=4, seed=0)
images[0].save("monet.png")

The weights are loaded with the package above, not with diffusers.DiffusionPipeline. The frozen VAE (stable-diffusion-v1-5/stable-diffusion-v1-5) and text encoder (openai/clip-vit-base-patch32) are downloaded from their own repositories.

Prompts work best in the WikiArt caption format A <style> <genre> by <artist>., for example A Romanticism marina by ivan aivazovsky.

Files

File Contents
model.safetensors EMA weights after 100 epochs (54,600 steps), fp32
config.json architecture and sampling settings

Training

Setting Value
Data 69,798 image–caption pairs, 512×512 center crops encoded once by the SD 1.5 VAE
Objective v-prediction, Min-SNR-γ weighting (γ = 5), cosine schedule, offset noise 0.1
Conditioning CLIP ViT-B/32 last hidden state (77×512), 15 % unconditional batches
Optimizer AdamW, lr 1.5e-4, batch 128, 500 warm-up steps, cosine decay to 10 %
EMA 0.999
Hardware a single NVIDIA DGX Spark (GB10)

Sampling defaults: 50 DDIM steps, guidance 5.0, clamp of the predicted clean latent at ±3.

Limitations

Faces and hands are often distorted. Output is 512×512 only. The training data is mostly Western painting from 1400 to 1950.

License

The weights are released under CC BY-NC 4.0 for research and non-commercial use, because the WikiArt part of the training data includes copyrighted works. The code is MIT licensed.