Instructions to use socialtrait/flux-3-image-klein-infendpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use socialtrait/flux-3-image-klein-infendpoint with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("socialtrait/flux-3-image-klein-infendpoint", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download model_config.py from socialtrait/flux-3-image-klein-infendpoint: direct link, hf CLI and curl.
- Browser
- Download file 918 Bytes
-
https://huggingface.co/socialtrait/flux-3-image-klein-infendpoint/resolve/main/model_config.py
- Command line
-
hf download hf://socialtrait/flux-3-image-klein-infendpoint/model_config.py
-
curl -L -o model_config.py https://huggingface.co/socialtrait/flux-3-image-klein-infendpoint/resolve/main/model_config.py
918 Bytes
| """Dependency-free model pins and environment resolution for Modal and HF.""" | |
| import os | |
| from dataclasses import dataclass | |
| UPSTREAM = 'socialtrait/flux-3-image-klein-infendpoint' | |
| REVISION = '5cda60397ebe10a0e2e7a68598ffbb06e8eb16df' | |
| GGUF_FILENAME = 'transformer/flux-3-image-klein-Q8_0.gguf' | |
| class Settings: | |
| model_id: str = UPSTREAM | |
| revision: str = REVISION | |
| quantization: str = 'q8_0' | |
| def from_env(cls): | |
| repo = os.getenv('FLUX_MODEL_ID', UPSTREAM) | |
| # A private copy has different commits; don't reuse the upstream SHA. | |
| revision = os.getenv('FLUX_MODEL_REVISION', REVISION if repo == UPSTREAM else 'main') | |
| return cls(repo, revision, os.getenv('FLUX_QUANTIZATION', 'q8_0')) | |
| def __post_init__(self): | |
| if self.quantization not in ('bf16', 'q8_0'): | |
| raise ValueError('FLUX_QUANTIZATION must be bf16 or q8_0') | |