personalization
Browse files- .gitignore +1 -0
- app.py +12 -7
- packages.txt +2 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.fishsrv.pl
|
app.py
CHANGED
|
@@ -38,7 +38,7 @@ compel = Compel(
|
|
| 38 |
)
|
| 39 |
|
| 40 |
MAX_SEED = np.iinfo(np.int32).max
|
| 41 |
-
MAX_IMAGE_SIZE =
|
| 42 |
|
| 43 |
# 追加: Simple long prompt processing function
|
| 44 |
def process_long_prompt(prompt, negative_prompt=""):
|
|
@@ -122,6 +122,8 @@ with gr.Blocks(css=css) as demo:
|
|
| 122 |
run_button = gr.Button("Run", scale=0)
|
| 123 |
|
| 124 |
result = gr.Image(format="png", label="Result", show_label=False)
|
|
|
|
|
|
|
| 125 |
|
| 126 |
with gr.Accordion("Advanced Settings", open=False):
|
| 127 |
|
|
@@ -130,7 +132,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 130 |
max_lines=1,
|
| 131 |
placeholder="Enter a negative prompt",
|
| 132 |
# value="bad quality,worst quality,worst detail,sketch,censor,"
|
| 133 |
-
value=" ((dull, unimaginative, lifeless, tedious, lack of emotions, dry, flat, static, stiff, uninspired
|
| 134 |
)
|
| 135 |
|
| 136 |
seed = gr.Slider(
|
|
@@ -149,7 +151,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 149 |
minimum=256,
|
| 150 |
maximum=MAX_IMAGE_SIZE,
|
| 151 |
step=32,
|
| 152 |
-
value=
|
| 153 |
)
|
| 154 |
|
| 155 |
height = gr.Slider(
|
|
@@ -157,7 +159,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 157 |
minimum=256,
|
| 158 |
maximum=MAX_IMAGE_SIZE,
|
| 159 |
step=32,
|
| 160 |
-
value=
|
| 161 |
)
|
| 162 |
|
| 163 |
with gr.Row():
|
|
@@ -172,15 +174,18 @@ with gr.Blocks(css=css) as demo:
|
|
| 172 |
num_inference_steps = gr.Slider(
|
| 173 |
label="Number of inference steps",
|
| 174 |
minimum=1,
|
| 175 |
-
maximum=
|
| 176 |
step=1,
|
| 177 |
-
value=
|
| 178 |
)
|
| 179 |
|
| 180 |
run_button.click(
|
| 181 |
fn=infer,
|
| 182 |
inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
| 183 |
-
outputs=[result]
|
|
|
|
|
|
|
|
|
|
| 184 |
)
|
| 185 |
|
| 186 |
demo.queue().launch()
|
|
|
|
| 38 |
)
|
| 39 |
|
| 40 |
MAX_SEED = np.iinfo(np.int32).max
|
| 41 |
+
MAX_IMAGE_SIZE = 900
|
| 42 |
|
| 43 |
# 追加: Simple long prompt processing function
|
| 44 |
def process_long_prompt(prompt, negative_prompt=""):
|
|
|
|
| 122 |
run_button = gr.Button("Run", scale=0)
|
| 123 |
|
| 124 |
result = gr.Image(format="png", label="Result", show_label=False)
|
| 125 |
+
result2 = gr.Image(format="png", label="Result2", show_label=False)
|
| 126 |
+
|
| 127 |
|
| 128 |
with gr.Accordion("Advanced Settings", open=False):
|
| 129 |
|
|
|
|
| 132 |
max_lines=1,
|
| 133 |
placeholder="Enter a negative prompt",
|
| 134 |
# value="bad quality,worst quality,worst detail,sketch,censor,"
|
| 135 |
+
value=" ((dull, unimaginative, lifeless, tedious, lack of emotions, dry, flat, static, stiff, uninspired), bad quality, bad art, ugly, overexposed, too bright, washed out, high exposure, vague details, ambiguous shapes, undefined, poorly render, rough, low resolution, artifact, compression artifacts, low poly, blocky, banding, color bleed, texture seams, oversaturation, fused fingers, mutated, malformed eyes, missing iris sclera, poorly drawn background, poor body language)"
|
| 136 |
)
|
| 137 |
|
| 138 |
seed = gr.Slider(
|
|
|
|
| 151 |
minimum=256,
|
| 152 |
maximum=MAX_IMAGE_SIZE,
|
| 153 |
step=32,
|
| 154 |
+
value=512,
|
| 155 |
)
|
| 156 |
|
| 157 |
height = gr.Slider(
|
|
|
|
| 159 |
minimum=256,
|
| 160 |
maximum=MAX_IMAGE_SIZE,
|
| 161 |
step=32,
|
| 162 |
+
value=512,
|
| 163 |
)
|
| 164 |
|
| 165 |
with gr.Row():
|
|
|
|
| 174 |
num_inference_steps = gr.Slider(
|
| 175 |
label="Number of inference steps",
|
| 176 |
minimum=1,
|
| 177 |
+
maximum=40,
|
| 178 |
step=1,
|
| 179 |
+
value=20,
|
| 180 |
)
|
| 181 |
|
| 182 |
run_button.click(
|
| 183 |
fn=infer,
|
| 184 |
inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
| 185 |
+
outputs=[result],
|
| 186 |
+
fn=infer,
|
| 187 |
+
inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
| 188 |
+
outputs=[result2]
|
| 189 |
)
|
| 190 |
|
| 191 |
demo.queue().launch()
|
packages.txt
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
micro
|
|
|
|
|
|
|
|
|
| 1 |
micro
|
| 2 |
+
sshfs
|
| 3 |
+
fuse3
|