Bobby commited on
Commit
4b8d6d8
·
1 Parent(s): 0977330
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -95,6 +95,7 @@ if gr.NO_RELOAD:
95
  def init(pipe):
96
  pipe.enable_xformers_memory_efficient_attention()
97
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
 
98
  print("Model Compiled!")
99
  init(pipe)
100
 
@@ -359,14 +360,14 @@ def process_image(
359
  start = time.time()
360
  preprocessor.load("NormalBae")
361
  # preprocessor.load("Canny") #20 steps, 9 guidance, 512, 512
 
362
  global compiled
363
-
364
  if not compiled:
365
- seed = random.randint(0, MAX_SEED)
366
- generator = torch.cuda.manual_seed(seed)
367
  print("Not Compiled")
368
  compiled = True
369
-
 
 
370
  control_image = preprocessor(
371
  image=image,
372
  image_resolution=image_resolution,
 
95
  def init(pipe):
96
  pipe.enable_xformers_memory_efficient_attention()
97
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
98
+ pipe.compile()
99
  print("Model Compiled!")
100
  init(pipe)
101
 
 
360
  start = time.time()
361
  preprocessor.load("NormalBae")
362
  # preprocessor.load("Canny") #20 steps, 9 guidance, 512, 512
363
+
364
  global compiled
 
365
  if not compiled:
 
 
366
  print("Not Compiled")
367
  compiled = True
368
+
369
+ seed = random.randint(0, MAX_SEED)
370
+ generator = torch.cuda.manual_seed(seed)
371
  control_image = preprocessor(
372
  image=image,
373
  image_resolution=image_resolution,