File size: 2,876 Bytes
ea00c6c
 
 
 
 
 
 
389a869
 
 
ea00c6c
19c40ce
2d16dcf
19c40ce
 
 
 
 
bf8b231
19c40ce
 
 
 
 
bf8b231
19c40ce
44b8f97
19c40ce
bf8b231
19c40ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bf8b231
19c40ce
 
 
 
 
bf8b231
19c40ce
 
 
bf8b231
19c40ce
 
 
 
 
 
bf8b231
19c40ce
 
 
 
 
 
bf8b231
19c40ce
 
 
 
 
 
44b8f97
bf8b231
 
2d16dcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19c40ce
ef081ca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
tags:
- discodiffusion
- guideddiffusion
thumbnail: https://de.gravatar.com/userimage/52045156/8ab369c1d246e65bda88813ce7c4cb81.jpeg
datasets:
- wikiart

---


# Ukiyo-e Diffusion

If you make something using these models, you're welcome to mention me [@thegenerativegeneration](https://www.instagram.com/thegenerativegeneration/)


Named by dataset used. Current and best version is [models/ukiyoe-all/v1/ema_0.9999_056000.pt](models/ukiyoe-all/v1/ema_0.9999_056000.pt)

# Current Plans

* clean dataset
  * remove borders
  * remove some of the samples with text in them

# Models

## Ukiyo-e-all

### v1

[models/ukiyoe-all/v1/ema_0.9999_056000.pt](models/ukiyoe-all/v1/ema_0.9999_056000.pt)

Model configuration is:

```python
model_config = {
    'attention_resolutions': '32, 16, 8',
    'class_cond': False,
    'image_size': 256,
    'learn_sigma': True,
    'rescale_timesteps': True,
    'noise_schedule': 'linear',
    'num_channels': 128,
    'num_heads': 4,
    'num_res_blocks': 2,
    'resblock_updown': True,
    'use_checkpoint': True,
    'use_fp16': True,
    'use_scale_shift_norm': True,
}
```
#### Tips

- Results closest to original training data are achieved by turning off the secondary model in Disco Diffusion.
- Turning secondary model on can lead to very creative results
- It is not necessary to specify Ukiyo-e as artstyle to get ukiyo-e-like images.

#### Examples

If you make something nice using these models, I would like to link your image.

##### Secondary Off

![](models/ukiyoe-all/v1/images/secondary_off_3.png)
![](models/ukiyoe-all/v1/images/secondary_off_0.png)
![](models/ukiyoe-all/v1/images/secondary_off_1.png)
![](models/ukiyoe-all/v1/images/secondary_off_2.png)

##### Secondary On

![](models/ukiyoe-all/v1/images/secondary_on_0.png)
![](models/ukiyoe-all/v1/images/secondary_on_1.png)
![](models/ukiyoe-all/v1/images/secondary_on_2.png)


#### About
Trained from scratch on a ~170000 images corpus of [ukiyo-e.org](https://ukiyo-e.org) filtered by [colorfulness](https://pyimagesearch.com/2017/06/05/computing-image-colorfulness-with-opencv-and-python/
) >= 5.




## (Deprecated) Ukiyo-e-few

[models/ukiyoe-few/v1/ukiyoe_diffusion_256_022000.pt](models/ukiyoe-few/v1/ukiyoe_diffusion_256_022000.pt)

Finetuned on 5224 images from Wikiart (1168) and ? (). 


Model configuration is

```python
model_config = {
	'attention_resolutions': '16',
	'class_cond': False,
	'diffusion_steps': 1000,
	'rescale_timesteps': True,
	'timestep_respacing': 'ddim100',
	'image_size': 256,
	'learn_sigma': True,
	'noise_schedule': 'linear',
	'num_channels': 128,
	'num_heads': 1,
	'num_res_blocks': 2,
	'use_checkpoint': True,
	'use_scale_shift_norm': False
}
```

Trained using a fork of [guided-diffusion-sxela](https://github.com/thegenerativegeneration/guided-diffusion-sxela). Added random crop which did not lead to good results.