Instructions to use bb1070/cfb_fp8_torchao with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bb1070/cfb_fp8_torchao with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import FluxFillPipeline from diffusers.utils import load_image image = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup.png") mask = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup_mask.png") # switch to "mps" for apple devices pipe = FluxFillPipeline.from_pretrained("bb1070/cfb_fp8_torchao", dtype=torch.bfloat16, device_map="cuda") image = pipe( prompt="a white paper cup", image=image, mask_image=mask, height=1632, width=1232, guidance_scale=30, num_inference_steps=50, max_sequence_length=512, generator=torch.Generator("cpu").manual_seed(0) ).images[0] image.save(f"flux-fill-dev.png") - Notebooks
- Google Colab
- Kaggle
Download text_encoder/config.json from bb1070/cfb_fp8_torchao: direct link, hf CLI and curl.
- Browser
- Download file 561 Bytes
-
https://huggingface.co/bb1070/cfb_fp8_torchao/resolve/main/text_encoder/config.json
- Command line
-
hf download hf://bb1070/cfb_fp8_torchao/text_encoder/config.json
-
curl -L -o config.json https://huggingface.co/bb1070/cfb_fp8_torchao/resolve/main/text_encoder/config.json
561 Bytes
| { | |
| "architectures": [ | |
| "CLIPTextModel" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dropout": 0.0, | |
| "eos_token_id": 2, | |
| "hidden_act": "quick_gelu", | |
| "hidden_size": 768, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "clip_text_model", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "projection_dim": 768, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.52.4", | |
| "vocab_size": 49408 | |
| } | |