Instructions to use michaelriedl/MonsterForge-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use michaelriedl/MonsterForge-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="michaelriedl/MonsterForge-small", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("michaelriedl/MonsterForge-small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from transformers import PretrainedConfig | |
| class MonsterForgeSmallConfig(PretrainedConfig): | |
| model_type = "lightweight-gan" | |
| def __init__( | |
| self, | |
| image_size=64, | |
| latent_dim=256, | |
| fmap_max=512, | |
| fmap_inverse_coef=12, | |
| transparent=False, | |
| greyscale=False, | |
| attn_res_layers=[32], | |
| freq_chan_attn=False, | |
| syncbatchnorm=False, | |
| antialias=False, | |
| **kwargs, | |
| ): | |
| self.image_size = image_size | |
| self.latent_dim = latent_dim | |
| self.fmap_max = fmap_max | |
| self.fmap_inverse_coef = fmap_inverse_coef | |
| self.transparent = transparent | |
| self.greyscale = greyscale | |
| self.attn_res_layers = attn_res_layers | |
| self.freq_chan_attn = freq_chan_attn | |
| self.syncbatchnorm = syncbatchnorm | |
| self.antialias = antialias | |
| super().__init__(**kwargs) | |