Spaces:
Running
on
Zero
Running
on
Zero
File size: 713 Bytes
9037686 cfb87a3 01fb166 31ef714 cfb87a3 0d45a57 b3a5d68 cfb87a3 9dd94af cfb87a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import os
# from huggingface_hub import InferenceClient
from gradio_client import Client
#client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
#client.headers["x-use-cache"] = "0"
def feifeifluxapi(prompt, height=1152, width=896, guidance_scale=3.5):
# image = client.text_to_image(
# prompt=prompt,
# height=height,
# width=width,
# guidance_scale=guidance_scale
# )
# return image
client = Client("aifeifei798/DarkIdol-flux")
result = client.predict(
prompt=prompt,
seed=0,
randomize_seed=True,
width=width,
height=height,
num_inference_steps=6,
api_name="/infer"
)
return result
|