Create configuration_pixel.py
Browse files- configuration_pixel.py +18 -0
configuration_pixel.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
class PixelConfig(PretrainedConfig):
|
| 4 |
+
model_type = "topai_image_gen"
|
| 5 |
+
|
| 6 |
+
def __init__(
|
| 7 |
+
self,
|
| 8 |
+
input_dim=768,
|
| 9 |
+
hidden_dim=1024,
|
| 10 |
+
image_channels=3,
|
| 11 |
+
resolution=128,
|
| 12 |
+
**kwargs
|
| 13 |
+
):
|
| 14 |
+
super().__init__(**kwargs)
|
| 15 |
+
self.input_dim = input_dim
|
| 16 |
+
self.hidden_dim = hidden_dim
|
| 17 |
+
self.image_channels = image_channels
|
| 18 |
+
self.resolution = resolution
|