K00B404 commited on
Commit
0bdb002
·
verified ·
1 Parent(s): c616459

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,8 +16,8 @@ DESCRIPTION = """ # Instant Image
16
  ### <span style='color: red;'>You may change the steps from 4 to 8, if you didn't get satisfied results.
17
  ### First Image processing takes time then images generate faster.
18
  """
19
- if not torch.cuda.is_available():
20
- DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
21
 
22
  MAX_SEED = np.iinfo(np.int32).max
23
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES", "1") == "1"
@@ -78,7 +78,7 @@ pipe = PixArtAlphaPipeline.from_pretrained(
78
  "PixArt-alpha/PixArt-LCM-XL-2-1024-MS",
79
  torch_dtype=torch.float16,
80
  use_safetensors=True,
81
- ).to("cuda:0")
82
 
83
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
84
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
 
16
  ### <span style='color: red;'>You may change the steps from 4 to 8, if you didn't get satisfied results.
17
  ### First Image processing takes time then images generate faster.
18
  """
19
+ #if not torch.cuda.is_available():
20
+ #DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
21
 
22
  MAX_SEED = np.iinfo(np.int32).max
23
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES", "1") == "1"
 
78
  "PixArt-alpha/PixArt-LCM-XL-2-1024-MS",
79
  torch_dtype=torch.float16,
80
  use_safetensors=True,
81
+ ).to(device)
82
 
83
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
84
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])