Spaces:
Running
on
Zero
Running
on
Zero
Update feifeilib/feifeitexttoimg.py
Browse files- feifeilib/feifeitexttoimg.py +11 -27
feifeilib/feifeitexttoimg.py
CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
|
|
2 |
import spaces
|
3 |
import random
|
4 |
import numpy as np
|
5 |
-
from diffusers.utils import load_image
|
6 |
|
7 |
from feifeilib.feifeimodload import feifeimodload
|
8 |
from feifeilib.feifeiprompt import feifeiprompt
|
@@ -18,7 +17,6 @@ def feifeitexttoimg(
|
|
18 |
sharpened_select=False,
|
19 |
styles_Radio=["(None)"],
|
20 |
FooocusExpansion_select=False,
|
21 |
-
feifei_imgtoimg=None,
|
22 |
seed=random.randint(0, MAX_SEED),
|
23 |
randomize_seed=False,
|
24 |
width=896,
|
@@ -40,31 +38,17 @@ def feifeitexttoimg(
|
|
40 |
adapter_name=["feifei"],
|
41 |
lora_scale=1.0,
|
42 |
)
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
guidance_scale=guidance_scale,
|
55 |
-
output_type="pil",
|
56 |
-
).images[0]
|
57 |
-
else:
|
58 |
-
image = pipe(
|
59 |
-
prompt="flux,",
|
60 |
-
prompt_2=prompt,
|
61 |
-
width=width,
|
62 |
-
height=height,
|
63 |
-
num_inference_steps=num_inference_steps,
|
64 |
-
generator=generator,
|
65 |
-
guidance_scale=guidance_scale,
|
66 |
-
output_type="pil",
|
67 |
-
).images[0]
|
68 |
|
69 |
if sharpened_select:
|
70 |
feifeisharpened(image,num_strength)
|
|
|
2 |
import spaces
|
3 |
import random
|
4 |
import numpy as np
|
|
|
5 |
|
6 |
from feifeilib.feifeimodload import feifeimodload
|
7 |
from feifeilib.feifeiprompt import feifeiprompt
|
|
|
17 |
sharpened_select=False,
|
18 |
styles_Radio=["(None)"],
|
19 |
FooocusExpansion_select=False,
|
|
|
20 |
seed=random.randint(0, MAX_SEED),
|
21 |
randomize_seed=False,
|
22 |
width=896,
|
|
|
38 |
adapter_name=["feifei"],
|
39 |
lora_scale=1.0,
|
40 |
)
|
41 |
+
|
42 |
+
image = pipe(
|
43 |
+
prompt="flux,",
|
44 |
+
prompt_2=prompt,
|
45 |
+
width=width,
|
46 |
+
height=height,
|
47 |
+
num_inference_steps=num_inference_steps,
|
48 |
+
generator=generator,
|
49 |
+
guidance_scale=guidance_scale,
|
50 |
+
output_type="pil",
|
51 |
+
).images[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
if sharpened_select:
|
54 |
feifeisharpened(image,num_strength)
|