HOW TO USE THE flux-fp8 IN PYTHON?
#35
by
KevinJMChen
- opened
Hello,
anyone can give me a sample code?
how to use it in Python?
my code like:
'''
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("Kijai/flux-fp8",
cache_dir='flux_fp8',
torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
prompt = "A cat holding a sign that says hello world"
out = pipe(
prompt=prompt,
guidance_scale=0.,
height=768,
width=1360,
num_inference_steps=4,
max_sequence_length=256,
).images[0]
out.save("image.png")
'''
but there is a 404 error.