Bobby commited on
Commit
d29c72d
·
1 Parent(s): 2ea22b9
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -14,8 +14,6 @@ import numpy as np
14
  import imageio
15
  import torch
16
  from PIL import Image
17
- import torch._dynamo
18
- torch._dynamo.config.suppress_errors = True
19
  from diffusers import (
20
  ControlNetModel,
21
  DPMSolverMultistepScheduler,
@@ -87,8 +85,6 @@ if gr.NO_RELOAD:
87
 
88
  # experimental speedup?
89
  # pipe.compile()
90
- pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
91
- print("Model Compiled!")
92
 
93
  # torch.cuda.empty_cache()
94
  # gc.collect()
@@ -361,7 +357,7 @@ def process_image(
361
  image_resolution=image_resolution,
362
  detect_resolution=preprocess_resolution,
363
  )
364
- if style_selection is not None or style_selection is not "None":
365
  prompt = apply_style(style_selection) + "," + prompt
366
 
367
  custom_prompt=str(get_prompt(prompt, a_prompt))
 
14
  import imageio
15
  import torch
16
  from PIL import Image
 
 
17
  from diffusers import (
18
  ControlNetModel,
19
  DPMSolverMultistepScheduler,
 
85
 
86
  # experimental speedup?
87
  # pipe.compile()
 
 
88
 
89
  # torch.cuda.empty_cache()
90
  # gc.collect()
 
357
  image_resolution=image_resolution,
358
  detect_resolution=preprocess_resolution,
359
  )
360
+ if style_selection is not None or style_selection != "None":
361
  prompt = apply_style(style_selection) + "," + prompt
362
 
363
  custom_prompt=str(get_prompt(prompt, a_prompt))