habulaj commited on
Commit
51faa3e
1 Parent(s): 20eb88b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -228,9 +228,16 @@ with gr.Blocks(theme=theme, css="style.css") as demo:
228
  model = gr.Text(label='Model', value='stabilityai/stable-diffusion-xl-base-1.0', placeholder='e.g. stabilityai/stable-diffusion-xl-base-1.0', info='Enter the HUB path for this model! The model must be converted to diffusers to work. We recommend SG161222/RealVisXL_V4.0 for realistic generations, for example. By default, SDXL 1.0 (stabilityai/stable-diffusion-xl-base-1.0) will be used.')
229
  vaecall = gr.Text(label='VAE', placeholder='e.g. madebyollin/sdxl-vae-fp16-fix', info='You can use the VAE that suits you best! Using an unfamiliar VAE or one that is not from the same base model mentioned above will result in errors or distorted images. You must enable "Use VAE" in advanced settings if you want to use a VAE.')
230
  controlnet_model = gr.Text(label='Controlnet', placeholder='e.g diffusers/controlnet-canny-sdxl-1.0')
231
- url = gr.Text(label='URL (Img2Img)', placeholder='e.g https://example.com/image.png')
232
  controlnet_img = gr.Text(label='URL (Controlnet)', placeholder='e.g https://example.com/image.png')
233
  controlnet_img2img = gr.Text(label='URL (Controlnet - IMG2IMG)', placeholder='e.g https://example.com/image.png')
 
 
 
 
 
 
 
 
234
  with gr.Row():
235
  prompt = gr.Text(
236
  placeholder="Input prompt",
@@ -276,6 +283,11 @@ with gr.Blocks(theme=theme, css="style.css") as demo:
276
  value=0.7,
277
  visible=False,
278
  )
 
 
 
 
 
279
  with gr.Group():
280
  negative_prompt = gr.Text(
281
  placeholder="Input Negative Prompt",
@@ -329,15 +341,6 @@ with gr.Blocks(theme=theme, css="style.css") as demo:
329
  step=0.1,
330
  value=5.0,
331
  )
332
- with gr.Row():
333
- num_inference_steps_base = gr.Slider(
334
- info="Number of denoising steps",
335
- label="Number of inference steps",
336
- minimum=10,
337
- maximum=100,
338
- step=1,
339
- value=25,
340
- )
341
  with gr.Row():
342
  controlnet_conditioning_scale = gr.Slider(
343
  info="controlnet_conditioning_scale",
 
228
  model = gr.Text(label='Model', value='stabilityai/stable-diffusion-xl-base-1.0', placeholder='e.g. stabilityai/stable-diffusion-xl-base-1.0', info='Enter the HUB path for this model! The model must be converted to diffusers to work. We recommend SG161222/RealVisXL_V4.0 for realistic generations, for example. By default, SDXL 1.0 (stabilityai/stable-diffusion-xl-base-1.0) will be used.')
229
  vaecall = gr.Text(label='VAE', placeholder='e.g. madebyollin/sdxl-vae-fp16-fix', info='You can use the VAE that suits you best! Using an unfamiliar VAE or one that is not from the same base model mentioned above will result in errors or distorted images. You must enable "Use VAE" in advanced settings if you want to use a VAE.')
230
  controlnet_model = gr.Text(label='Controlnet', placeholder='e.g diffusers/controlnet-canny-sdxl-1.0')
 
231
  controlnet_img = gr.Text(label='URL (Controlnet)', placeholder='e.g https://example.com/image.png')
232
  controlnet_img2img = gr.Text(label='URL (Controlnet - IMG2IMG)', placeholder='e.g https://example.com/image.png')
233
+ num_inference_steps_base = gr.Slider(
234
+ info="Number of denoising steps",
235
+ label="Number of inference steps",
236
+ minimum=10,
237
+ maximum=100,
238
+ step=1,
239
+ value=25,
240
+ )
241
  with gr.Row():
242
  prompt = gr.Text(
243
  placeholder="Input prompt",
 
283
  value=0.7,
284
  visible=False,
285
  )
286
+ with gr.Group():
287
+ gr.Markdown("""### Img2Img
288
+ <small>To activate the use of Img2Img and submit an image as a reference for generation, you must check the 'Use Img2Img' checkbox.</small>"""
289
+ )
290
+ url = gr.Image(label="Target Image", type="filepath")
291
  with gr.Group():
292
  negative_prompt = gr.Text(
293
  placeholder="Input Negative Prompt",
 
341
  step=0.1,
342
  value=5.0,
343
  )
 
 
 
 
 
 
 
 
 
344
  with gr.Row():
345
  controlnet_conditioning_scale = gr.Slider(
346
  info="controlnet_conditioning_scale",