Skip to content

Instantly share code, notes, and snippets.

@linoytsaban
linoytsaban / flux_with_cfg
Created September 16, 2024 12:08
Flux with CFG and negative prompts
# download FluxCFGPipline
!wget https://raw.githubusercontent.com/linoytsaban/diffusers/cfg-flux-exploring/examples/community/pipeline_flux_with_cfg.py
# load pipeline
import diffusers
import torch
from pipeline_flux_with_cfg import FluxCFGPipeline
pipe = FluxCFGPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16)