dome272 commited on
Commit
bd44803
1 Parent(s): 029b3cb

fix to 4 resolutions + enable torch.compile

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -19,7 +19,7 @@ if not torch.cuda.is_available():
19
  MAX_SEED = np.iinfo(np.int32).max
20
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
21
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
22
- USE_TORCH_COMPILE = False
23
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
24
  PREVIEW_IMAGES = True
25
 
@@ -152,16 +152,16 @@ with gr.Blocks(css="style.css") as demo:
152
  with gr.Row():
153
  width = gr.Slider(
154
  label="Width",
155
- minimum=768,
156
  maximum=MAX_IMAGE_SIZE,
157
- step=128,
158
  value=1024,
159
  )
160
  height = gr.Slider(
161
  label="Height",
162
- minimum=768,
163
  maximum=MAX_IMAGE_SIZE,
164
- step=128,
165
  value=1024,
166
  )
167
  num_images_per_prompt = gr.Slider(
 
19
  MAX_SEED = np.iinfo(np.int32).max
20
  CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
21
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
22
+ USE_TORCH_COMPILE = True
23
  ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
24
  PREVIEW_IMAGES = True
25
 
 
152
  with gr.Row():
153
  width = gr.Slider(
154
  label="Width",
155
+ minimum=1024,
156
  maximum=MAX_IMAGE_SIZE,
157
+ step=512,
158
  value=1024,
159
  )
160
  height = gr.Slider(
161
  label="Height",
162
+ minimum=1024,
163
  maximum=MAX_IMAGE_SIZE,
164
+ step=512,
165
  value=1024,
166
  )
167
  num_images_per_prompt = gr.Slider(