aifeifei798 commited on
Commit
9dd94af
·
verified ·
1 Parent(s): 29e07c6

Update feifeilib/feifeifluxapi.py

Browse files
Files changed (1) hide show
  1. feifeilib/feifeifluxapi.py +7 -2
feifeilib/feifeifluxapi.py CHANGED
@@ -3,6 +3,11 @@ from huggingface_hub import InferenceClient
3
  client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
4
  client.headers["x-use-cache"] = "0"
5
 
6
- def feifeifluxapi(protmpt):
7
- image = client.text_to_image(protmpt)
 
 
 
 
 
8
  return image
 
3
  client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
4
  client.headers["x-use-cache"] = "0"
5
 
6
+ def feifeifluxapi(protmpt="the photo is a jpop girl",height=1152,width=896,guidance_scale=3.5):
7
+ image = client.text_to_image(
8
+ protmpt=protmpt,
9
+ height=height,
10
+ width=width,
11
+ guidance_scale=guidance_scale
12
+ )
13
  return image