Spaces:
Running
on
Zero
Running
on
Zero
Upload 5 files
Browse files- feifeilib/feifeifluxapi.py +2 -2
- feifeilib/feifeiprompt.py +1 -1
- feifeilib/feifeitexttoimg.py +1 -1
- feifeiui/feifeiui.py +1 -0
feifeilib/feifeifluxapi.py
CHANGED
@@ -6,8 +6,8 @@ from feifeilib.feifeisharpened import feifeisharpened
|
|
6 |
client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
|
7 |
client.headers["x-use-cache"] = "0"
|
8 |
|
9 |
-
def feifeifluxapi(seed,prompt,quality_select,sharpened_select, styles_Radio,FooocusExpansion_select,height=1152,width=896,guidance_scale=3.5,num_strength=0.35):
|
10 |
-
prompt,generator = feifeiprompt(seed,prompt,quality_select,styles_Radio,FooocusExpansion_select)
|
11 |
image = client.text_to_image(
|
12 |
prompt=prompt,
|
13 |
height=height,
|
|
|
6 |
client = InferenceClient("black-forest-labs/FLUX.1-dev", token=os.getenv('HF_TOKEN'))
|
7 |
client.headers["x-use-cache"] = "0"
|
8 |
|
9 |
+
def feifeifluxapi(randomize_seed,seed,prompt,quality_select,sharpened_select, styles_Radio,FooocusExpansion_select,height=1152,width=896,guidance_scale=3.5,num_strength=0.35):
|
10 |
+
prompt,generator = feifeiprompt(randomize_seed,seed,prompt,quality_select,styles_Radio,FooocusExpansion_select)
|
11 |
image = client.text_to_image(
|
12 |
prompt=prompt,
|
13 |
height=height,
|
feifeilib/feifeiprompt.py
CHANGED
@@ -13,7 +13,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
13 |
# 去除每行末尾的换行符
|
14 |
artists = [artist.strip() for artist in artists]
|
15 |
|
16 |
-
def feifeiprompt(randomize_seed,prompt,quality_select,styles_Radio,FooocusExpansion_select):
|
17 |
# 处理随机种子
|
18 |
if randomize_seed:
|
19 |
seed = random.randint(0, MAX_SEED)
|
|
|
13 |
# 去除每行末尾的换行符
|
14 |
artists = [artist.strip() for artist in artists]
|
15 |
|
16 |
+
def feifeiprompt(randomize_seed,seed,prompt,quality_select,styles_Radio,FooocusExpansion_select):
|
17 |
# 处理随机种子
|
18 |
if randomize_seed:
|
19 |
seed = random.randint(0, MAX_SEED)
|
feifeilib/feifeitexttoimg.py
CHANGED
@@ -26,7 +26,7 @@ def feifeitexttoimg(
|
|
26 |
num_strength=0.35,
|
27 |
progress=gr.Progress(track_tqdm=True),
|
28 |
):
|
29 |
-
prompt,generator = feifeiprompt(seed,prompt,quality_select,styles_Radio,FooocusExpansion_select)
|
30 |
|
31 |
image = pipe(
|
32 |
prompt="",
|
|
|
26 |
num_strength=0.35,
|
27 |
progress=gr.Progress(track_tqdm=True),
|
28 |
):
|
29 |
+
prompt,generator = feifeiprompt(randomize_seed,seed,prompt,quality_select,styles_Radio,FooocusExpansion_select)
|
30 |
|
31 |
image = pipe(
|
32 |
prompt="",
|
feifeiui/feifeiui.py
CHANGED
@@ -227,6 +227,7 @@ def create_ui():
|
|
227 |
flux_button.click(
|
228 |
fn=feifeifluxapi, # Function to run for this button
|
229 |
inputs=[
|
|
|
230 |
flux_seed,
|
231 |
flux_prompt,
|
232 |
quality_select,
|
|
|
227 |
flux_button.click(
|
228 |
fn=feifeifluxapi, # Function to run for this button
|
229 |
inputs=[
|
230 |
+
randomize_seed,
|
231 |
flux_seed,
|
232 |
flux_prompt,
|
233 |
quality_select,
|