mrestrepo commited on
Commit
0c900d9
·
1 Parent(s): 60a8252

non negative prompt

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -22,11 +22,10 @@ MAX_IMAGE_SIZE = 1024
22
 
23
 
24
  @spaces.GPU
25
- def infer(prompt, negative_prompt, height, width):
26
 
27
  image = pipeline(
28
  prompt=prompt,
29
- negative_prompt=f'Negative prompt: avoid multiple versions of Xavy, avoid distorted facial features, malformed hands, excessive or broken gadgets, unrealistic proportions in the body or technology, extra limbs. {negative_prompt}',
30
  # guidance_scale=guidance_scale,
31
  # num_inference_steps=num_inference_steps,
32
  width=width,
@@ -99,7 +98,7 @@ with gr.Blocks(css=css) as demo:
99
  minimum=256,
100
  maximum=MAX_IMAGE_SIZE,
101
  step=32,
102
- value=1024, # Replace with defaults that work for your model
103
  )
104
 
105
  height = gr.Slider(
@@ -107,7 +106,7 @@ with gr.Blocks(css=css) as demo:
107
  minimum=256,
108
  maximum=MAX_IMAGE_SIZE,
109
  step=32,
110
- value=1024, # Replace with defaults that work for your model
111
  )
112
 
113
  with gr.Row():
@@ -136,7 +135,7 @@ with gr.Blocks(css=css) as demo:
136
  gr.on(
137
  triggers=[run_button.click, prompt.submit],
138
  fn=infer,
139
- inputs=[prompt, negative_prompt, height, width],
140
  outputs=[result]
141
  )
142
 
 
22
 
23
 
24
  @spaces.GPU
25
+ def infer(prompt, height, width):
26
 
27
  image = pipeline(
28
  prompt=prompt,
 
29
  # guidance_scale=guidance_scale,
30
  # num_inference_steps=num_inference_steps,
31
  width=width,
 
98
  minimum=256,
99
  maximum=MAX_IMAGE_SIZE,
100
  step=32,
101
+ value=2000, # Replace with defaults that work for your model
102
  )
103
 
104
  height = gr.Slider(
 
106
  minimum=256,
107
  maximum=MAX_IMAGE_SIZE,
108
  step=32,
109
+ value=200, # Replace with defaults that work for your model
110
  )
111
 
112
  with gr.Row():
 
135
  gr.on(
136
  triggers=[run_button.click, prompt.submit],
137
  fn=infer,
138
+ inputs=[prompt, height, width],
139
  outputs=[result]
140
  )
141