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
|
| 1 |
+
{
|
| 2 |
+
"model_type": "conditional_diffusion",
|
| 3 |
+
"architecture": "OptimizedConditionedUNet",
|
| 4 |
+
"task": "image-generation",
|
| 5 |
+
"framework": "pytorch",
|
| 6 |
+
"version": "1.0",
|
| 7 |
+
|
| 8 |
+
"model_config": {
|
| 9 |
+
"in_channels": 3,
|
| 10 |
+
"out_channels": 3,
|
| 11 |
+
"attr_dim": 18,
|
| 12 |
+
"base_channels": 64,
|
| 13 |
+
"time_embed_dim": 224,
|
| 14 |
+
"num_layers": 4,
|
| 15 |
+
"attention_layers": [],
|
| 16 |
+
"dropout": 0.05,
|
| 17 |
+
"activation": "silu",
|
| 18 |
+
"normalization": "group_norm"
|
| 19 |
+
},
|
| 20 |
+
|
| 21 |
+
"training_config": {
|
| 22 |
+
"num_epochs": 110,
|
| 23 |
+
"batch_size": 16,
|
| 24 |
+
"learning_rate": 2e-4,
|
| 25 |
+
"optimizer": "adamw",
|
| 26 |
+
"weight_decay": 0.01,
|
| 27 |
+
"gradient_accumulation_steps": 2,
|
| 28 |
+
"max_grad_norm": 1.0,
|
| 29 |
+
"mixed_precision": "fp16",
|
| 30 |
+
"warmup_steps": 200,
|
| 31 |
+
"lr_scheduler": "cosine_annealing_warm_restarts",
|
| 32 |
+
"T_0": 20,
|
| 33 |
+
"eta_min": 1e-6
|
| 34 |
+
},
|
| 35 |
+
|
| 36 |
+
"diffusion_config": {
|
| 37 |
+
"num_train_timesteps": 1000,
|
| 38 |
+
"num_inference_steps": 50,
|
| 39 |
+
"beta_start": 0.00085,
|
| 40 |
+
"beta_end": 0.012,
|
| 41 |
+
"beta_schedule": "scaled_linear",
|
| 42 |
+
"prediction_type": "epsilon",
|
| 43 |
+
"scheduler_type": "ddpm",
|
| 44 |
+
"clip_sample": false,
|
| 45 |
+
"clip_sample_range": 1.0
|
| 46 |
+
},
|
| 47 |
+
|
| 48 |
+
"data_config": {
|
| 49 |
+
"image_size": 256,
|
| 50 |
+
"num_channels": 3,
|
| 51 |
+
"dataset": "cartoonset10k",
|
| 52 |
+
"validation_split": 0.15,
|
| 53 |
+
"augmentation": {
|
| 54 |
+
"horizontal_flip": 0.3,
|
| 55 |
+
"color_jitter": {
|
| 56 |
+
"brightness": 0.1,
|
| 57 |
+
"contrast": 0.1,
|
| 58 |
+
"saturation": 0.1
|
| 59 |
+
},
|
| 60 |
+
"rotation": 5,
|
| 61 |
+
"normalization": {
|
| 62 |
+
"mean": [0.5, 0.5, 0.5],
|
| 63 |
+
"std": [0.5, 0.5, 0.5]
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
},
|
| 67 |
+
|
| 68 |
+
"feature_config": {
|
| 69 |
+
"extractor": "mediapipe",
|
| 70 |
+
"num_attributes": 18,
|
| 71 |
+
"attribute_names": [
|
| 72 |
+
"eye_angle",
|
| 73 |
+
"eye_lashes",
|
| 74 |
+
"eye_lid",
|
| 75 |
+
"chin_length",
|
| 76 |
+
"eyebrow_weight",
|
| 77 |
+
"eyebrow_shape",
|
| 78 |
+
"eyebrow_thickness",
|
| 79 |
+
"face_shape",
|
| 80 |
+
"facial_hair",
|
| 81 |
+
"hair",
|
| 82 |
+
"eye_color",
|
| 83 |
+
"face_color",
|
| 84 |
+
"hair_color",
|
| 85 |
+
"glasses",
|
| 86 |
+
"glasses_color",
|
| 87 |
+
"eye_slant",
|
| 88 |
+
"eyebrow_width",
|
| 89 |
+
"eye_eyebrow_distance"
|
| 90 |
+
],
|
| 91 |
+
"attribute_ranges": {
|
| 92 |
+
"eye_angle": [0, 2],
|
| 93 |
+
"eye_lashes": [0, 1],
|
| 94 |
+
"eye_lid": [0, 1],
|
| 95 |
+
"chin_length": [0, 2],
|
| 96 |
+
"eyebrow_weight": [0, 1],
|
| 97 |
+
"eyebrow_shape": [0, 13],
|
| 98 |
+
"eyebrow_thickness": [0, 3],
|
| 99 |
+
"face_shape": [0, 6],
|
| 100 |
+
"facial_hair": [0, 14],
|
| 101 |
+
"hair": [0, 110],
|
| 102 |
+
"eye_color": [0, 4],
|
| 103 |
+
"face_color": [0, 10],
|
| 104 |
+
"hair_color": [0, 9],
|
| 105 |
+
"glasses": [0, 11],
|
| 106 |
+
"glasses_color": [0, 6],
|
| 107 |
+
"eye_slant": [0, 2],
|
| 108 |
+
"eyebrow_width": [0, 2],
|
| 109 |
+
"eye_eyebrow_distance": [0, 2]
|
| 110 |
+
},
|
| 111 |
+
"normalization": "min_max_01"
|
| 112 |
+
},
|
| 113 |
+
|
| 114 |
+
"performance_config": {
|
| 115 |
+
"inference_time_gpu": "2-3 seconds",
|
| 116 |
+
"inference_time_cpu": "15-30 seconds",
|
| 117 |
+
"memory_usage_gpu": "4GB",
|
| 118 |
+
"memory_usage_cpu": "2GB",
|
| 119 |
+
"recommended_batch_size_gpu": 8,
|
| 120 |
+
"recommended_batch_size_cpu": 1
|
| 121 |
+
},
|
| 122 |
+
|
| 123 |
+
"metrics": {
|
| 124 |
+
"final_training_loss": 0.0234,
|
| 125 |
+
"best_validation_loss": 0.0251,
|
| 126 |
+
"training_samples": 8500,
|
| 127 |
+
"validation_samples": 1500,
|
| 128 |
+
"total_parameters": "~50M",
|
| 129 |
+
"training_time": "~10 hours",
|
| 130 |
+
"hardware": "NVIDIA T4 GPU"
|
| 131 |
+
},
|
| 132 |
+
|
| 133 |
+
"requirements": {
|
| 134 |
+
"python": ">=3.8",
|
| 135 |
+
"torch": ">=1.13.0",
|
| 136 |
+
"torchvision": ">=0.14.0",
|
| 137 |
+
"diffusers": ">=0.21.0",
|
| 138 |
+
"mediapipe": ">=0.10.9",
|
| 139 |
+
"opencv-python": ">=4.5.0",
|
| 140 |
+
"numpy": ">=1.21.0",
|
| 141 |
+
"pillow": ">=8.0.0",
|
| 142 |
+
"accelerate": ">=0.20.0"
|
| 143 |
+
},
|
| 144 |
+
|
| 145 |
+
"tags": [
|
| 146 |
+
"diffusion",
|
| 147 |
+
"cartoon",
|
| 148 |
+
"face-generation",
|
| 149 |
+
"style-transfer",
|
| 150 |
+
"conditional-generation",
|
| 151 |
+
"selfie-to-cartoon",
|
| 152 |
+
"pytorch",
|
| 153 |
+
"computer-vision",
|
| 154 |
+
"image-generation",
|
| 155 |
+
"facial-attributes"
|
| 156 |
+
],
|
| 157 |
+
|
| 158 |
+
"license": "mit",
|
| 159 |
+
"language": "en",
|
| 160 |
+
"library_name": "diffusers",
|
| 161 |
+
"pipeline_tag": "image-generation"
|
| 162 |
+
}
|