craftgamesnetwork commited on
Commit
9158cfb
·
verified ·
1 Parent(s): 6ac6786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -19,9 +19,7 @@ if not torch.cuda.is_available():
19
  DESCRIPTION += "\n<p>⚠️ This space is running on the CPU. This demo doesn't work on CPU 😞! Run on a GPU by duplicating this space or test our website for free and unlimited by <a href='https://squaadai.com'>clicking here</a>, which provides these and more options.</p>"
20
 
21
  MAX_SEED = np.iinfo(np.int32).max
22
- MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1824"))
23
- USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE") == "0"
24
- ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
25
  ENABLE_USE_LORA = os.getenv("ENABLE_USE_LORA", "1") == "1"
26
  ENABLE_USE_VAE = os.getenv("ENABLE_USE_VAE", "1") == "1"
27
  ENABLE_USE_IMG2IMG = os.getenv("ENABLE_USE_VAE", "1") == "1"
@@ -87,9 +85,6 @@ def generate(
87
 
88
  else:
89
  pipe.to(device)
90
-
91
- if USE_TORCH_COMPILE:
92
- pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
93
 
94
  generator = torch.Generator().manual_seed(seed)
95
 
 
19
  DESCRIPTION += "\n<p>⚠️ This space is running on the CPU. This demo doesn't work on CPU 😞! Run on a GPU by duplicating this space or test our website for free and unlimited by <a href='https://squaadai.com'>clicking here</a>, which provides these and more options.</p>"
20
 
21
  MAX_SEED = np.iinfo(np.int32).max
22
+ MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1824")
 
 
23
  ENABLE_USE_LORA = os.getenv("ENABLE_USE_LORA", "1") == "1"
24
  ENABLE_USE_VAE = os.getenv("ENABLE_USE_VAE", "1") == "1"
25
  ENABLE_USE_IMG2IMG = os.getenv("ENABLE_USE_VAE", "1") == "1"
 
85
 
86
  else:
87
  pipe.to(device)
 
 
 
88
 
89
  generator = torch.Generator().manual_seed(seed)
90