JunhaoZhuang commited on
Commit
fa913d1
·
verified ·
1 Parent(s): c701af0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -136,9 +136,7 @@ ratio_list = [[800, 800], [768, 896], [704, 928], [672, 960], [640, 1024], [608,
136
  ratio_list += [[896, 768], [928, 704], [960, 672], [1024, 640], [1056, 608], [1088, 576], [1184, 576]]
137
 
138
  def get_rate(image):
139
- # 计算输入图片的长宽比
140
  input_rate = image.size[0] / image.size[1]
141
- # 计算与每个预设比例的差距
142
  min_diff = float('inf')
143
  best_idx = 0
144
 
@@ -292,7 +290,9 @@ def load_ckpt():
292
  )
293
 
294
  pipeline = pipeline.to("cuda")
295
-
 
 
296
  global cur_style
297
  cur_style = 'line + shadow'
298
  @spaces.GPU
@@ -333,9 +333,7 @@ def change_ckpt(style):
333
 
334
  return style
335
 
336
-
337
-
338
- load_ckpt()
339
 
340
  @spaces.GPU
341
  def fix_random_seeds(seed):
 
136
  ratio_list += [[896, 768], [928, 704], [960, 672], [1024, 640], [1056, 608], [1088, 576], [1184, 576]]
137
 
138
  def get_rate(image):
 
139
  input_rate = image.size[0] / image.size[1]
 
140
  min_diff = float('inf')
141
  best_idx = 0
142
 
 
290
  )
291
 
292
  pipeline = pipeline.to("cuda")
293
+
294
+ load_ckpt()
295
+
296
  global cur_style
297
  cur_style = 'line + shadow'
298
  @spaces.GPU
 
333
 
334
  return style
335
 
336
+
 
 
337
 
338
  @spaces.GPU
339
  def fix_random_seeds(seed):