Spaces:
Running on Zero
Running on Zero
Download config.py from mmmat32/FLUX.2-Klein-Multi-LoRA-3D-Angle: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/spaces/mmmat32/FLUX.2-Klein-Multi-LoRA-3D-Angle/resolve/main/config.py
- Command line
-
hf download hf://spaces/mmmat32/FLUX.2-Klein-Multi-LoRA-3D-Angle/config.py
-
curl -L -o config.py https://huggingface.co/spaces/mmmat32/FLUX.2-Klein-Multi-LoRA-3D-Angle/resolve/main/config.py
1.33 kB
| """Environment-derived configuration and global constants. | |
| Importing this module has no side effects beyond reading env vars and computing | |
| a handful of constants. It must not import torch, diffusers, or gradio so it can | |
| be imported anywhere without dragging in heavy dependencies. | |
| """ | |
| import os | |
| import numpy as np | |
| # ββ Model variant selection ββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MODEL_VARIANT = os.environ.get("MODEL_VARIANT", "9B") | |
| if MODEL_VARIANT == "9B-KV": | |
| _MODEL_REPO = "black-forest-labs/FLUX.2-klein-9b-kv" | |
| else: | |
| MODEL_VARIANT = "9B" # normalise any typos back to default | |
| _MODEL_REPO = "black-forest-labs/FLUX.2-klein-9B" | |
| MODEL_REPO = _MODEL_REPO | |
| # ββ Misc constants βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MAX_SEED = int(np.iinfo(np.int32).max) | |
| # Maximum number of simultaneous LoRA weight sliders to pre-render in the UI. | |
| MAX_LORA_SLOTS = 6 | |
| # Logging toggle β read once, exposed as a plain bool so other modules don't | |
| # repeat the env-string-parsing dance. | |
| ENABLE_LOGGING = os.environ.get("ENABLE_LOGGING", "No").strip().lower() == "yes" | |