BertChristiaens commited on
Commit
b999def
1 Parent(s): c882d5b
Files changed (2) hide show
  1. app.py +2 -2
  2. models.py +2 -2
app.py CHANGED
@@ -93,7 +93,7 @@ def make_prompt_row():
93
  with col_0_0:
94
  st.text_input(label="Positive prompt", value="a photograph of a room, interior design, 4k, high resolution", key='positive_prompt')
95
  with col_0_1:
96
- st.text_input(label="Negative prompt", value="", key='negative_prompt')
97
 
98
  def make_sidebar():
99
  with st.sidebar:
@@ -255,7 +255,7 @@ def make_editing_canvas(canvas_color, brush, _reset_state, generation_mode, pain
255
  image=Image.fromarray(image),
256
  mask_image=mask,
257
  negative_prompt=st.session_state['negative_prompt'],
258
- )[0]
259
  if isinstance(result_image, np.ndarray):
260
  result_image = Image.fromarray(result_image)
261
  st.session_state['output_image'] = result_image
 
93
  with col_0_0:
94
  st.text_input(label="Positive prompt", value="a photograph of a room, interior design, 4k, high resolution", key='positive_prompt')
95
  with col_0_1:
96
+ st.text_input(label="Negative prompt", value="low res, blur, ", key='negative_prompt')
97
 
98
  def make_sidebar():
99
  with st.sidebar:
 
255
  image=Image.fromarray(image),
256
  mask_image=mask,
257
  negative_prompt=st.session_state['negative_prompt'],
258
+ )
259
  if isinstance(result_image, np.ndarray):
260
  result_image = Image.fromarray(result_image)
261
  st.session_state['output_image'] = result_image
models.py CHANGED
@@ -52,7 +52,7 @@ def make_image_controlnet(image: np.ndarray,
52
  generated_image = pipe(
53
  prompt=positive_prompt,
54
  negative_prompt=negative_prompt,
55
- num_inference_steps=20,
56
  strength=1.00,
57
  guidance_scale=7.0,
58
  generator=[torch.Generator(device="cuda").manual_seed(seed)],
@@ -89,7 +89,7 @@ def make_inpainting(positive_prompt: str,
89
  mask_image=mask_image,
90
  prompt=positive_prompt,
91
  negative_prompt=negative_prompt,
92
- num_inference_steps=20,
93
  height=HEIGHT,
94
  width=WIDTH,
95
  ).images[0]
 
52
  generated_image = pipe(
53
  prompt=positive_prompt,
54
  negative_prompt=negative_prompt,
55
+ num_inference_steps=30,
56
  strength=1.00,
57
  guidance_scale=7.0,
58
  generator=[torch.Generator(device="cuda").manual_seed(seed)],
 
89
  mask_image=mask_image,
90
  prompt=positive_prompt,
91
  negative_prompt=negative_prompt,
92
+ num_inference_steps=30,
93
  height=HEIGHT,
94
  width=WIDTH,
95
  ).images[0]