shellypeng commited on
Commit
ffbe7e1
·
verified ·
1 Parent(s): 8cd27b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -68,6 +68,7 @@ def translate(prompt):
68
 
69
 
70
  def load_pipe_scribble():
 
71
  if pipe_scribble is None:
72
  hed = HEDdetector.from_pretrained('lllyasviel/ControlNet')
73
 
@@ -94,6 +95,7 @@ def load_pipe_scribble():
94
 
95
 
96
  def load_pipe_depth():
 
97
  if pipe_depth is None:
98
  depth_estimator = pipeline('depth-estimation')
99
 
@@ -120,6 +122,7 @@ def load_pipe_depth():
120
  pipe_depth.to(device)
121
 
122
  def load_pipe_img2img():
 
123
  if pipe_img2img is None:
124
  pipe_img2img = StableDiffusionImg2ImgPipeline.from_single_file("https://huggingface.co/shellypeng/anime-god/blob/main/animeGod_v10.safetensors",
125
  torch_dtype=torch.float16, safety_checker=None, requires_safety_checker=False, token=HF_TOKEN)
 
68
 
69
 
70
  def load_pipe_scribble():
71
+ global pipe_scribble
72
  if pipe_scribble is None:
73
  hed = HEDdetector.from_pretrained('lllyasviel/ControlNet')
74
 
 
95
 
96
 
97
  def load_pipe_depth():
98
+ global pipe_depth
99
  if pipe_depth is None:
100
  depth_estimator = pipeline('depth-estimation')
101
 
 
122
  pipe_depth.to(device)
123
 
124
  def load_pipe_img2img():
125
+ global pipe_img2img
126
  if pipe_img2img is None:
127
  pipe_img2img = StableDiffusionImg2ImgPipeline.from_single_file("https://huggingface.co/shellypeng/anime-god/blob/main/animeGod_v10.safetensors",
128
  torch_dtype=torch.float16, safety_checker=None, requires_safety_checker=False, token=HF_TOKEN)