Feature Extraction
Transformers
Safetensors
English
hyperstyler
style-transfer
authorship
custom_code
Instructions to use JKSHINPG/HyperStyler with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JKSHINPG/HyperStyler with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="JKSHINPG/HyperStyler", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JKSHINPG/HyperStyler", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_hyperstyler.py from JKSHINPG/HyperStyler: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/JKSHINPG/HyperStyler/resolve/main/configuration_hyperstyler.py
- Command line
-
hf download hf://JKSHINPG/HyperStyler/configuration_hyperstyler.py
-
curl -L -o configuration_hyperstyler.py https://huggingface.co/JKSHINPG/HyperStyler/resolve/main/configuration_hyperstyler.py
632 Bytes
| from transformers import PretrainedConfig | |
| class HyperStylerConfig(PretrainedConfig): | |
| model_type = "hyperstyler" | |
| def __init__( | |
| self, | |
| base_model_name="google/t5-v1_1-large", | |
| styler_config=None, | |
| max_encoder_len=80, | |
| max_decoder_len=80, | |
| style_model_name="AnnaWegmann/Style-Embedding", | |
| **kwargs, | |
| ): | |
| self.base_model_name = base_model_name | |
| self.styler_config = styler_config | |
| self.max_encoder_len = max_encoder_len | |
| self.max_decoder_len = max_decoder_len | |
| self.style_model_name = style_model_name | |
| super().__init__(**kwargs) | |