bmarci commited on
Commit
f0916d6
·
1 Parent(s): af56a7b

setting parameters instead of hardcoding it

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,7 +22,7 @@ MAX_SEED = np.iinfo(np.int16).max
22
  MAX_IMAGE_SIZE = 512
23
 
24
  DEFAULT_POSITIVE_PROMPT = None
25
- DEFAULT_NEGATIVE_PROMPT = "copy the original image"
26
 
27
  @spaces.GPU(duration=300)
28
  def infer(
@@ -31,7 +31,7 @@ def infer(
31
  seed=0,
32
  text_cfg=7.5,
33
  img_cfg=1.0,
34
- num_inference_steps=30,
35
  positive_prompt=DEFAULT_POSITIVE_PROMPT,
36
  negative_prompt=DEFAULT_NEGATIVE_PROMPT,
37
  progress=gr.Progress(track_tqdm=True),
@@ -56,7 +56,7 @@ def infer(
56
  use_norm=False,
57
  num_sampling_steps=num_inference_steps,
58
  timesteps_shift=1.0,
59
- seed=3407,
60
  progress=True,
61
  )
62
 
@@ -117,7 +117,7 @@ with gr.Blocks(css=css) as demo:
117
  minimum=10,
118
  maximum=50,
119
  step=1,
120
- value=30, # Replace with defaults that work for your model
121
  )
122
 
123
  with gr.Row():
 
22
  MAX_IMAGE_SIZE = 512
23
 
24
  DEFAULT_POSITIVE_PROMPT = None
25
+ DEFAULT_NEGATIVE_PROMPT = None
26
 
27
  @spaces.GPU(duration=300)
28
  def infer(
 
31
  seed=0,
32
  text_cfg=7.5,
33
  img_cfg=1.0,
34
+ num_inference_steps=28,
35
  positive_prompt=DEFAULT_POSITIVE_PROMPT,
36
  negative_prompt=DEFAULT_NEGATIVE_PROMPT,
37
  progress=gr.Progress(track_tqdm=True),
 
56
  use_norm=False,
57
  num_sampling_steps=num_inference_steps,
58
  timesteps_shift=1.0,
59
+ seed=seed,
60
  progress=True,
61
  )
62
 
 
117
  minimum=10,
118
  maximum=50,
119
  step=1,
120
+ value=28, # Replace with defaults that work for your model
121
  )
122
 
123
  with gr.Row():