clementchadebec commited on
Commit
b7bf69e
1 Parent(s): c2c7b7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -34,7 +34,7 @@ pipe.fuse_lora()
34
  MAX_SEED = np.iinfo(np.int32).max
35
  MAX_IMAGE_SIZE = 512
36
 
37
- def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
38
 
39
  if randomize_seed:
40
  seed = random.randint(0, MAX_SEED)
@@ -43,11 +43,8 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
43
 
44
  image = pipe(
45
  prompt = prompt,
46
- negative_prompt = negative_prompt,
47
- guidance_scale = guidance_scale,
48
  num_inference_steps = num_inference_steps,
49
- width = width,
50
- height = height,
51
  generator = generator
52
  ).images[0]
53
 
@@ -126,7 +123,7 @@ with gr.Blocks(css=css) as demo:
126
 
127
  run_button.click(
128
  fn = infer,
129
- inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
130
  outputs = [result]
131
  )
132
 
 
34
  MAX_SEED = np.iinfo(np.int32).max
35
  MAX_IMAGE_SIZE = 512
36
 
37
+ def infer(prompt, seed, randomize_seed, num_inference_steps):
38
 
39
  if randomize_seed:
40
  seed = random.randint(0, MAX_SEED)
 
43
 
44
  image = pipe(
45
  prompt = prompt,
46
+ guidance_scale = 0,
 
47
  num_inference_steps = num_inference_steps,
 
 
48
  generator = generator
49
  ).images[0]
50
 
 
123
 
124
  run_button.click(
125
  fn = infer,
126
+ inputs = [prompt, seed, randomize_seed, num_inference_steps],
127
  outputs = [result]
128
  )
129