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)# pip install -U transformers accelerate # 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
Download MonsterForgeSmallConfig.py from michaelriedl/MonsterForge-small: direct link, hf CLI and curl.
- Browser
- Download file 919 Bytes
-
https://huggingface.co/michaelriedl/MonsterForge-small/resolve/refs%2Fpr%2F1/MonsterForgeSmallConfig.py
- Command line
-
hf download hf://michaelriedl/MonsterForge-small@refs/pr/1/MonsterForgeSmallConfig.py
-
curl -L -o MonsterForgeSmallConfig.py https://huggingface.co/michaelriedl/MonsterForge-small/resolve/refs%2Fpr%2F1/MonsterForgeSmallConfig.py
919 Bytes
| 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) | |