Kerogolon commited on
Commit
c9321c5
1 Parent(s): 887cff8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -16,7 +16,7 @@ if not torch.cuda.is_available():
16
  DESCRIPTION += "\n<p>Running on CPU 🥶 This demo may not work on CPU.</p>"
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
19
- CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES", "1") == "1"
20
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
21
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
22
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
@@ -56,7 +56,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
56
  return seed
57
 
58
 
59
- @spaces.GPU(enable_queue=True)
60
  def generate(
61
  prompt: str,
62
  negative_prompt: str = "",
@@ -64,7 +64,7 @@ def generate(
64
  seed: int = 0,
65
  width: int = 1024,
66
  height: int = 1024,
67
- guidance_scale: float = 3,
68
  randomize_seed: bool = False,
69
  use_resolution_binning: bool = True,
70
  progress=gr.Progress(track_tqdm=True),
@@ -96,10 +96,6 @@ def generate(
96
 
97
  examples = [
98
  "neon holography crystal cat",
99
- "a cat eating a piece of cheese",
100
- "an astronaut riding a horse in space",
101
- "a cartoon of a boy playing with a tiger",
102
- "a cute robot artist painting on an easel, concept art",
103
  "a close up of a woman wearing a transparent, prismatic, elaborate nemeses headdress, over the should pose, brown skin-tone"
104
  ]
105
 
 
16
  DESCRIPTION += "\n<p>Running on CPU 🥶 This demo may not work on CPU.</p>"
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
19
+ CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES", "1") == "0"
20
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
21
  USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
22
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
 
56
  return seed
57
 
58
 
59
+ @spaces.GPU
60
  def generate(
61
  prompt: str,
62
  negative_prompt: str = "",
 
64
  seed: int = 0,
65
  width: int = 1024,
66
  height: int = 1024,
67
+ guidance_scale: float = 5,
68
  randomize_seed: bool = False,
69
  use_resolution_binning: bool = True,
70
  progress=gr.Progress(track_tqdm=True),
 
96
 
97
  examples = [
98
  "neon holography crystal cat",
 
 
 
 
99
  "a close up of a woman wearing a transparent, prismatic, elaborate nemeses headdress, over the should pose, brown skin-tone"
100
  ]
101