| --- |
| 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") |
| ``` |
|
|