Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,6 @@ def generate_image(
|
|
82 |
seed = random.randint(0, MAX_SEED)
|
83 |
seed = int(seed)
|
84 |
print(f'prompt:{prompt}')
|
85 |
-
print(type(width))
|
86 |
|
87 |
text = str(translator.translate(prompt, 'English'))
|
88 |
|
@@ -106,15 +105,15 @@ def generate_image(
|
|
106 |
@spaces.GPU()
|
107 |
def gen(
|
108 |
prompt:str,
|
|
|
|
|
|
|
109 |
width:int=768,
|
110 |
height:int=1024,
|
111 |
scales:float=3.5,
|
112 |
steps:int=24,
|
113 |
seed:int=-1,
|
114 |
nums:int=1,
|
115 |
-
lora_scale:float=1.0,
|
116 |
-
lora_in:str="",
|
117 |
-
lora_add:str="",
|
118 |
progress=gr.Progress(track_tqdm=True)
|
119 |
):
|
120 |
enable_lora(lora_scale, lora_in, lora_add)
|
@@ -237,16 +236,16 @@ with gr.Blocks(css=CSS, js=JS, theme="Nymbo/Nymbo_Theme") as demo:
|
|
237 |
],
|
238 |
fn=gen,
|
239 |
inputs=[
|
240 |
-
prompt,
|
|
|
|
|
|
|
241 |
width,
|
242 |
height,
|
243 |
scales,
|
244 |
steps,
|
245 |
seed,
|
246 |
-
nums
|
247 |
-
lora_scale,
|
248 |
-
lora_in,
|
249 |
-
lora_add
|
250 |
],
|
251 |
outputs=[img, seed],
|
252 |
api_name="run",
|
|
|
82 |
seed = random.randint(0, MAX_SEED)
|
83 |
seed = int(seed)
|
84 |
print(f'prompt:{prompt}')
|
|
|
85 |
|
86 |
text = str(translator.translate(prompt, 'English'))
|
87 |
|
|
|
105 |
@spaces.GPU()
|
106 |
def gen(
|
107 |
prompt:str,
|
108 |
+
lora_scale:float=1.0,
|
109 |
+
lora_in:str="",
|
110 |
+
lora_add:str="",
|
111 |
width:int=768,
|
112 |
height:int=1024,
|
113 |
scales:float=3.5,
|
114 |
steps:int=24,
|
115 |
seed:int=-1,
|
116 |
nums:int=1,
|
|
|
|
|
|
|
117 |
progress=gr.Progress(track_tqdm=True)
|
118 |
):
|
119 |
enable_lora(lora_scale, lora_in, lora_add)
|
|
|
236 |
],
|
237 |
fn=gen,
|
238 |
inputs=[
|
239 |
+
prompt,
|
240 |
+
lora_scale,
|
241 |
+
lora_in,
|
242 |
+
lora_add,
|
243 |
width,
|
244 |
height,
|
245 |
scales,
|
246 |
steps,
|
247 |
seed,
|
248 |
+
nums
|
|
|
|
|
|
|
249 |
],
|
250 |
outputs=[img, seed],
|
251 |
api_name="run",
|