aztro commited on
Commit
6ac89c3
verified
1 Parent(s): 48e846d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,10 @@ import torch
6
 
7
  device = "cuda" if torch.cuda.is_available() else "cpu"
8
 
 
 
 
 
9
  # Cargar el modelo
10
  pipe = DiffusionPipeline.from_pretrained(
11
  "aztro/mabama-sdxl",
@@ -17,6 +21,7 @@ pipe = pipe.to(device)
17
  if device == "cuda":
18
  pipe.enable_xformers_memory_efficient_attention()
19
 
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
  MAX_IMAGE_SIZE = 1024
22
 
 
6
 
7
  device = "cuda" if torch.cuda.is_available() else "cpu"
8
 
9
+ # Limpiar la cach茅 (opcional)
10
+ from transformers.utils import move_cache
11
+ move_cache()
12
+
13
  # Cargar el modelo
14
  pipe = DiffusionPipeline.from_pretrained(
15
  "aztro/mabama-sdxl",
 
21
  if device == "cuda":
22
  pipe.enable_xformers_memory_efficient_attention()
23
 
24
+ # Resto del c贸digo...
25
  MAX_SEED = np.iinfo(np.int32).max
26
  MAX_IMAGE_SIZE = 1024
27