Skip to content

Instantly share code, notes, and snippets.

View danielealbano's full-sized avatar

Daniele Salvatore Albano danielealbano

View GitHub Profile
@danielealbano
danielealbano / main.py
Created December 12, 2025 11:50
GGUF image generation via python (FLUX) - example
from diffusers import FluxPipeline, FluxTransformer2DModel, GGUFQuantizationConfig
import torch
import gc
# Example for FLUX, can be adapted to other models as needed as long as the diffuser supports GGUF
ckpt_id = "black-forest-labs/FLUX.1-dev"
ckpt_path = "/absolute/path/to/gguf/eg/flux1-dev-Q4_K_S.gguf"
prompt = "PROMPT_HERE"
prompt_2 = prompt # Added for reference, can be changed