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
File size: 632 Bytes
834e995 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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)
|