File size: 1,413 Bytes
e8b6209 9837093 e8b6209 824b1f8 e8b6209 | 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 | ---
tags:
- MuseMachine
- pytorch
- generative-adversarial-network
- variational-autoencoder
---
# MuseMachine
A modular AE-GAN pipeline for portrait generation.
## Architecture
| Component | Description |
|---|---|
| Encoder | VAE encoder producing latent representations |
| Generator | Decodes latent vectors into coarse images |
| Refiner | Iteratively refines generations over 4 steps |
| Discriminator | PatchGAN-style discriminator |
## Hyperparameters
```json
{
"image_size": 256,
"latent_dim": 256,
"batch_size": 4,
"epochs": 300,
"lr_g": 0.0002,
"lr_d": 5e-05,
"alpha_recon": 100.0,
"beta_adv": 1.0,
"beta_kl": 0.05,
"noise_std": 0.15,
"refinement_steps": 4,
"refiner_step_size": 0.08,
"refine_decay": 0.8,
"dataset_name": "ajehsmihba/aesthetic-female-portraits",
"outputs_dir": "outputs",
"models_dir": "models",
"save_every": 50,
"push_to_hf": true,
"hf_repo_id": "ajehsmihba/MuseMachine",
"grad_clip": 1.0,
"vis_every": 10
}
```
## Best Metrics
```json
{
"D": 1.6232355684041977,
"EG": 55.429039001464844,
"KL": 142.61621220906576,
"Recon": 0.12780248870452246,
"Coarse_Recon": 0.12812133505940437
}
```
## Resume Training
```python
from huggingface_hub import hf_hub_download
import torch
ckpt_path = hf_hub_download(repo_id="ajehsmihba/MuseMachine", filename="best_checkpoint.pth")
ckpt = torch.load(ckpt_path, map_location="cpu")
```
|