meepmoo commited on
Commit
88c8e75
·
verified ·
1 Parent(s): e4146db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -24,7 +24,7 @@ from models.eva_clip import create_model_and_transforms
24
  from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
25
  from models.eva_clip.utils_qformer import resize_numpy_image_long
26
  os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
27
- os.environ["ZERO_GPU_PATCH_TORCH_DEVICE"] = "True"
28
  device = "cuda" if torch.cuda.is_available() else "cpu"
29
  from accelerate import Accelerator
30
  accelerator=Accelerator()
@@ -199,8 +199,8 @@ with gr.Blocks() as demo:
199
  with gr.Group():
200
  with gr.Column():
201
  with gr.Row():
202
- stips = gr.Slider(label="Steps", minimum=6, step=1, maximum=10, value=10)
203
- gscale = gr.Slider(label="Guidance scale", minimum=1, step=0.1, maximum=20, value=7.0)
204
  seed_param = gr.Slider(label="Inference Seed (Leave -1 for random)", minimum=0, step=32, maximum=np.iinfo(np.int32).max, value=-1)
205
  with gr.Row():
206
  enable_scale = gr.Checkbox(label="Super-Resolution (720 × 480 -> 2880 × 1920) Real-ESRGAN", value=False, interactive=False)
@@ -227,4 +227,4 @@ with gr.Blocks() as demo:
227
  )
228
 
229
  demo.queue(max_size=15, api_open=False)
230
- demo.launch(debug=True,inline=False,show_api=False,share=False)
 
24
  from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
25
  from models.eva_clip.utils_qformer import resize_numpy_image_long
26
  os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
27
+ os.environ["ZERO_GPU_PATCH_TORCH_DEVICE"] = "False"
28
  device = "cuda" if torch.cuda.is_available() else "cpu"
29
  from accelerate import Accelerator
30
  accelerator=Accelerator()
 
199
  with gr.Group():
200
  with gr.Column():
201
  with gr.Row():
202
+ stips = gr.Slider(label="Steps", minimum=6, step=1, maximum=100, value=50)
203
+ gscale = gr.Slider(label="Guidance scale", minimum=1, step=0.1, maximum=20, value=6.0)
204
  seed_param = gr.Slider(label="Inference Seed (Leave -1 for random)", minimum=0, step=32, maximum=np.iinfo(np.int32).max, value=-1)
205
  with gr.Row():
206
  enable_scale = gr.Checkbox(label="Super-Resolution (720 × 480 -> 2880 × 1920) Real-ESRGAN", value=False, interactive=False)
 
227
  )
228
 
229
  demo.queue(max_size=15, api_open=False)
230
+ demo.launch(debug=True,inline=False,show_api=False,share=True)