prithivMLmods commited on
Commit
6527384
·
verified ·
1 Parent(s): 3feb9f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,7 @@ import torch
11
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
12
 
13
  # Use environment variables for flexibility
14
- MODEL_ID = os.getenv("MODEL_ID", "Corcelio/mobius")
15
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
16
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
17
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
@@ -382,7 +382,7 @@ with gr.Blocks(css=css) as demo:
382
  generate_btn = gr.Button("Generate")
383
 
384
  with gr.Row():
385
- image_output = gr.Gallery(label="Generated Images", grid=[2], height="auto")
386
  seed_output = gr.Number(label="Seed Used")
387
 
388
  gr.Examples(examples=examples, inputs=[prompt])
@@ -395,4 +395,4 @@ with gr.Blocks(css=css) as demo:
395
 
396
  generate_btn.click(fn=generate, inputs=inputs, outputs=[image_output, seed_output])
397
 
398
- demo.launch()
 
11
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
12
 
13
  # Use environment variables for flexibility
14
+ MODEL_ID = os.getenv("MODEL_ID", "sd-community/sdxl-flash")
15
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
16
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
17
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
 
382
  generate_btn = gr.Button("Generate")
383
 
384
  with gr.Row():
385
+ image_output = gr.Gallery(label="Generated Images", columns=2, height="auto")
386
  seed_output = gr.Number(label="Seed Used")
387
 
388
  gr.Examples(examples=examples, inputs=[prompt])
 
395
 
396
  generate_btn.click(fn=generate, inputs=inputs, outputs=[image_output, seed_output])
397
 
398
+ demo.launch()