snackshell commited on
Commit
b1d08ad
·
verified ·
1 Parent(s): 515c8aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -10,13 +10,6 @@ WATERMARK_TEXT = "SelamGPT"
10
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
11
  TORCH_DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32
12
 
13
- try:
14
- pipe.enable_xformers_memory_efficient_attention()
15
- except:
16
- print("Xformers not available, using default attention")
17
-
18
- # ===== MODEL LOADING WITH GRADIO CACHE =====
19
- @gr.Cache() # Now works in Gradio 5.x
20
  def load_model():
21
  pipe = DiffusionPipeline.from_pretrained(
22
  MODEL_NAME,
 
10
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
11
  TORCH_DTYPE = torch.float16 if DEVICE == "cuda" else torch.float32
12
 
 
 
 
 
 
 
 
13
  def load_model():
14
  pipe = DiffusionPipeline.from_pretrained(
15
  MODEL_NAME,