vilarin commited on
Commit
7f2fa6c
1 Parent(s): a3cc10d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -37,7 +37,6 @@ def enable_lora(lora_add):
37
 
38
  async def generate_image(
39
  prompt:str,
40
- negative_prompt:str,
41
  model:str,
42
  lora_word:str,
43
  width:int=768,
@@ -57,7 +56,6 @@ async def generate_image(
57
  try:
58
  image = await client.text_to_image(
59
  prompt=text,
60
- negative_prompt=negative_prompt,
61
  height=height,
62
  width=width,
63
  guidance_scale=scales,
@@ -73,7 +71,6 @@ async def gen(
73
  prompt:str,
74
  lora_add:str="",
75
  lora_word:str="",
76
- negative_prompt:str="",
77
  width:int=768,
78
  height:int=1024,
79
  scales:float=3.5,
@@ -83,7 +80,7 @@ async def gen(
83
  ):
84
  model = enable_lora(lora_add)
85
  print(model)
86
- image, seed = await generate_image(prompt,negative_prompt,model,lora_word,width,height,scales,steps,seed)
87
  return image, seed
88
 
89
  examples = [
@@ -143,11 +140,6 @@ with gr.Blocks(css=CSS, js=JS, theme="Nymbo/Nymbo_Theme") as demo:
143
  step=1,
144
  value=-1,
145
  )
146
- negative_prompt = gr.Textbox(
147
- label="Negative prompt",
148
- lines=1,
149
- value="low quality"
150
- )
151
  lora_add = gr.Textbox(
152
  label="Add Flux LoRA",
153
  info="Copy the HF LoRA model name here",
@@ -180,7 +172,6 @@ with gr.Blocks(css=CSS, js=JS, theme="Nymbo/Nymbo_Theme") as demo:
180
  prompt,
181
  lora_add,
182
  lora_word,
183
- negative_prompt,
184
  width,
185
  height,
186
  scales,
 
37
 
38
  async def generate_image(
39
  prompt:str,
 
40
  model:str,
41
  lora_word:str,
42
  width:int=768,
 
56
  try:
57
  image = await client.text_to_image(
58
  prompt=text,
 
59
  height=height,
60
  width=width,
61
  guidance_scale=scales,
 
71
  prompt:str,
72
  lora_add:str="",
73
  lora_word:str="",
 
74
  width:int=768,
75
  height:int=1024,
76
  scales:float=3.5,
 
80
  ):
81
  model = enable_lora(lora_add)
82
  print(model)
83
+ image, seed = await generate_image(prompt,model,lora_word,width,height,scales,steps,seed)
84
  return image, seed
85
 
86
  examples = [
 
140
  step=1,
141
  value=-1,
142
  )
 
 
 
 
 
143
  lora_add = gr.Textbox(
144
  label="Add Flux LoRA",
145
  info="Copy the HF LoRA model name here",
 
172
  prompt,
173
  lora_add,
174
  lora_word,
 
175
  width,
176
  height,
177
  scales,