gguf-connectorgguf file in the current directory to interact with by:ggc k0
GGUF file(s) available. Select which one to use:
- flux-kontext-lite-q2_k.gguf
- flux-kontext-lite-q4_0.gguf
- flux-kontext-lite-q8_0.gguf
Enter your choice (1 to 3): _
note: try experimental lite model with 8-step operation; save up to 70% loading time
./ComfyUI/models/diffusion_models./ComfyUI/models/text_encoders./ComfyUI/models/vae


FluxKontextPipeline to work; upgrade your diffusers with:pip install git+https://github.com/huggingface/diffusers.git
import torch
from transformers import T5EncoderModel
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
text_encoder = T5EncoderModel.from_pretrained(
"calcuis/kontext-gguf",
gguf_file="t5xxl_fp16-q4_0.gguf",
torch_dtype=torch.bfloat16,
)
pipe = FluxKontextPipeline.from_pretrained(
"calcuis/kontext-gguf",
text_encoder_2=text_encoder,
torch_dtype=torch.bfloat16
).to("cuda")
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(
image=input_image,
prompt="Add a hat to the cat",
guidance_scale=2.5
).images[0]
image.save("output.png")
ggc k2


ggc k1


ggc la

ggc la

text_projection.weight addeds-quant and k-quant; except single and double blocks, all in f32 status
bf16 tensorsi-quant attempt (upgrade your node to the latest version for full quant support)t-quant; runnable (extramely fast); for speed test/experimental purposes| rank | quant | s/it | loading speed |
|---|---|---|---|
| 1 | q2_k | 6.40Β±.7 | ππ¨π¨π¨π¨π¨π¨ |
| 2 | q4_0 | 8.58Β±.5 | πππ¨π¨π¨π¨π¨ |
| 3 | q4_1 | 9.12Β±.5 | ππππ¨π¨π¨π¨ |
| 4 | q8_0 | 9.45Β±.3 | πππππ¨π¨π¨ |
| 5 | q3_k | 9.50Β±.3 | πππππ¨π¨π¨ |
| 6 | q5_0 | 10.48Β±.5 | ππππππ¨π¨ |
| 7 | iq4_nl | 10.55Β±.5 | ππππππ¨π¨ |
| 8 | q5_1 | 10.65Β±.5 | ππππππ¨π¨ |
| 9 | iq4_xs | 11.45Β±.7 | πππππππ¨ |
| 10 | iq3_s | 11.62Β±.9 | π’π’π’π’π’π’π¨ |
| 11 | iq3_xxs | 12.08Β±.9 | π’π’π’π’π’π’π’ |
not all included in the initial test (*tested with a beginner laptop gpu only, if you have highend model, might find q8_0 running surprisingly faster than others), the rest of them, test it yourself; btw, the interesting thing is: the loading time required was not aligning with file size, due to the complexity of each calculation (dequant), and might vary from models
ggc k3
gguf file straight in the current directory to interact withggc k6
ggc k8
234 commits
gguf-connectorgguf file in the current directory to interact with by:ggc k0
GGUF file(s) available. Select which one to use:
- flux-kontext-lite-q2_k.gguf
- flux-kontext-lite-q4_0.gguf
- flux-kontext-lite-q8_0.gguf
Enter your choice (1 to 3): _
note: try experimental lite model with 8-step operation; save up to 70% loading time
./ComfyUI/models/diffusion_models./ComfyUI/models/text_encoders./ComfyUI/models/vae


FluxKontextPipeline to work; upgrade your diffusers with:pip install git+https://github.com/huggingface/diffusers.git
import torch
from transformers import T5EncoderModel
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
text_encoder = T5EncoderModel.from_pretrained(
"calcuis/kontext-gguf",
gguf_file="t5xxl_fp16-q4_0.gguf",
torch_dtype=torch.bfloat16,
)
pipe = FluxKontextPipeline.from_pretrained(
"calcuis/kontext-gguf",
text_encoder_2=text_encoder,
torch_dtype=torch.bfloat16
).to("cuda")
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(
image=input_image,
prompt="Add a hat to the cat",
guidance_scale=2.5
).images[0]
image.save("output.png")
ggc k2


ggc k1


ggc la

ggc la

text_projection.weight addeds-quant and k-quant; except single and double blocks, all in f32 status
bf16 tensorsi-quant attempt (upgrade your node to the latest version for full quant support)t-quant; runnable (extramely fast); for speed test/experimental purposes| rank | quant | s/it | loading speed |
|---|---|---|---|
| 1 | q2_k | 6.40Β±.7 | ππ¨π¨π¨π¨π¨π¨ |
| 2 | q4_0 | 8.58Β±.5 | πππ¨π¨π¨π¨π¨ |
| 3 | q4_1 | 9.12Β±.5 | ππππ¨π¨π¨π¨ |
| 4 | q8_0 | 9.45Β±.3 | πππππ¨π¨π¨ |
| 5 | q3_k | 9.50Β±.3 | πππππ¨π¨π¨ |
| 6 | q5_0 | 10.48Β±.5 | ππππππ¨π¨ |
| 7 | iq4_nl | 10.55Β±.5 | ππππππ¨π¨ |
| 8 | q5_1 | 10.65Β±.5 | ππππππ¨π¨ |
| 9 | iq4_xs | 11.45Β±.7 | πππππππ¨ |
| 10 | iq3_s | 11.62Β±.9 | π’π’π’π’π’π’π¨ |
| 11 | iq3_xxs | 12.08Β±.9 | π’π’π’π’π’π’π’ |
not all included in the initial test (*tested with a beginner laptop gpu only, if you have highend model, might find q8_0 running surprisingly faster than others), the rest of them, test it yourself; btw, the interesting thing is: the loading time required was not aligning with file size, due to the complexity of each calculation (dequant), and might vary from models
ggc k3
gguf file straight in the current directory to interact withggc k6
ggc k8
234 commits