Image-to-Image
Diffusers
Safetensors
Flux2KleinPipeline
matmultoken
pouw
proof-of-useful-work
inference-mining
Instructions to use Matmultoken/FLUX.2-klein-4B-pouw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Matmultoken/FLUX.2-klein-4B-pouw with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Matmultoken/FLUX.2-klein-4B-pouw", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| # SPDX-License-Identifier: MIT | |
| """Thin convenience loader for this pouw shaping repo. Requires the MatMulToken miner packages | |
| (vllm-matmul + miner-base) installed in the serving venv. See README.md.""" | |
| from vllm_matmul import matmultoken_load | |
| if __name__ == "__main__": | |
| import sys | |
| repo = sys.argv[1] if len(sys.argv) > 1 else "." | |
| bundle = matmultoken_load(repo, gateway=False) | |
| print(f"loaded {bundle['manifest']['base_model']} | common_dim={bundle['common_dim']} " | |
| f"rank={bundle['rank']} | wrapped {bundle['wrapped']} mining linears") | |