Spaces:
Running
on
Zero
Running
on
Zero
Dagfinn1962
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
14 |
MAX_IMAGE_SIZE = 2048
|
15 |
|
16 |
@spaces.GPU(duration=120)
|
17 |
-
def infer(prompt, seed=
|
18 |
if randomize_seed:
|
19 |
seed = random.randint(0, MAX_SEED)
|
20 |
generator = torch.Generator().manual_seed(seed)
|
@@ -29,8 +29,7 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
|
|
29 |
return image, seed
|
30 |
|
31 |
examples = [
|
32 |
-
"
|
33 |
-
]
|
34 |
|
35 |
css="""
|
36 |
#col-container {
|
@@ -85,7 +84,7 @@ with gr.Blocks(css=css) as demo:
|
|
85 |
minimum=256,
|
86 |
maximum=MAX_IMAGE_SIZE,
|
87 |
step=32,
|
88 |
-
value=
|
89 |
)
|
90 |
|
91 |
height = gr.Slider(
|
@@ -104,7 +103,7 @@ with gr.Blocks(css=css) as demo:
|
|
104 |
minimum=1,
|
105 |
maximum=30,
|
106 |
step=1,
|
107 |
-
value=
|
108 |
)
|
109 |
|
110 |
gr.Examples(
|
|
|
14 |
MAX_IMAGE_SIZE = 2048
|
15 |
|
16 |
@spaces.GPU(duration=120)
|
17 |
+
def infer(prompt, seed=765449273, randomize_seed=False, width=1024, height=1024, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
|
18 |
if randomize_seed:
|
19 |
seed = random.randint(0, MAX_SEED)
|
20 |
generator = torch.Generator().manual_seed(seed)
|
|
|
29 |
return image, seed
|
30 |
|
31 |
examples = [
|
32 |
+
"breathtaking beautiful young woman, light-blue eyes, long bronze hair, fair complexion, (freckles:0.5) , wearing sexy lace lingerie, sitting on the floor, leaning on her bed, window in the background with sheer white curtains, staring seductively at the viewer, sun shining through the window . award-winning, professional, highly detailed ]
|
|
|
33 |
|
34 |
css="""
|
35 |
#col-container {
|
|
|
84 |
minimum=256,
|
85 |
maximum=MAX_IMAGE_SIZE,
|
86 |
step=32,
|
87 |
+
value=704,
|
88 |
)
|
89 |
|
90 |
height = gr.Slider(
|
|
|
103 |
minimum=1,
|
104 |
maximum=30,
|
105 |
step=1,
|
106 |
+
value=10,
|
107 |
)
|
108 |
|
109 |
gr.Examples(
|