import torch
from transformers import T5EncoderModel
from diffusers import FluxPipeline, GGUFQuantizationConfig, FluxTransformer2DModel
model_path = "https://huggingface.co/calcuis/krea-gguf/blob/main/flux1-krea-dev-q2_k.gguf"
transformer = FluxTransformer2DModel.from_single_file(
model_path,
quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16),
torch_dtype=torch.bfloat16,
config="callgg/krea-decoder",
subfolder="transformer"
)
text_encoder = T5EncoderModel.from_pretrained(
"chatpig/t5-v1_1-xxl-encoder-fp32-gguf",
gguf_file="t5xxl-encoder-fp32-q2_k.gguf",
torch_dtype=torch.bfloat16
)
pipe = FluxPipeline.from_pretrained(
"callgg/krea-decoder",
transformer=transformer,
text_encoder_2=text_encoder,
torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload() # could change it to cuda if you have good gpu
prompt = "a pig holding a sign that says hello world"
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=2.5,
).images[0]
image.save("output.png")
Prompt
a frog holding a sign that says hello world
Prompt
a pig holding a sign that says hello world
Prompt
a wolf holding a sign that says hello world
Prompt
cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open holding a fancy black forest cake with candles on top in the kitchen of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere
Prompt
on a rainy night, a girl holds an umbrella and looks at the camera. The rain keeps falling.
Prompt
drone shot of a volcano erupting with a pig walking on it
krea-gguf huggingface.co is an AI model on huggingface.co that provides krea-gguf's model effect (), which can be used instantly with this calcuis krea-gguf model. huggingface.co supports a free trial of the krea-gguf model, and also provides paid use of the krea-gguf. Support call krea-gguf model through api, including Node.js, Python, http.
krea-gguf huggingface.co is an online trial and call api platform, which integrates krea-gguf's modeling effects, including api services, and provides a free online trial of krea-gguf, you can try krea-gguf online for free by clicking the link below.
calcuis krea-gguf online free url in huggingface.co:
krea-gguf is an open source model from GitHub that offers a free installation service, and any user can find krea-gguf on GitHub to install. At the same time, huggingface.co provides the effect of krea-gguf install, users can directly use krea-gguf installed effect in huggingface.co for debugging and trial. It also supports api for free installation.