JoPmt commited on
Commit
cc4eb7e
1 Parent(s): 8be0e7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -32,6 +32,7 @@ from models.eva_clip import create_model_and_transforms
32
  from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
33
  from models.eva_clip.utils_qformer import resize_numpy_image_long
34
  os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
 
35
  device = "cuda" if torch.cuda.is_available() else "cpu"
36
 
37
  hf_hub_download(repo_id="ai-forever/Real-ESRGAN", filename="RealESRGAN_x4.pth", local_dir="model_real_esran")
@@ -139,7 +140,7 @@ def delete_old_files():
139
  if file_mtime < cutoff:
140
  os.remove(file_path)
141
  time.sleep(600)
142
- @spaces.GPU(duration=180)
143
  def plex(prompt,image_input,seed_value,scale_status,rife_status,progress=gr.Progress(track_tqdm=True)):
144
  seed = seed_value
145
  if seed == -1:
 
32
  from models.eva_clip.constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
33
  from models.eva_clip.utils_qformer import resize_numpy_image_long
34
  os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
35
+ os.environ["ZERO_GPU_PATCH_TORCH_DEVICE"] = "True"
36
  device = "cuda" if torch.cuda.is_available() else "cpu"
37
 
38
  hf_hub_download(repo_id="ai-forever/Real-ESRGAN", filename="RealESRGAN_x4.pth", local_dir="model_real_esran")
 
140
  if file_mtime < cutoff:
141
  os.remove(file_path)
142
  time.sleep(600)
143
+ @spaces.GPU()
144
  def plex(prompt,image_input,seed_value,scale_status,rife_status,progress=gr.Progress(track_tqdm=True)):
145
  seed = seed_value
146
  if seed == -1: