yeq6x commited on
Commit
c08d8a8
β€’
1 Parent(s): afee3ef
scripts/anime.py CHANGED
@@ -19,6 +19,7 @@ import spaces
19
  model = None
20
  device = None
21
 
 
22
  def init_model(use_local=False):
23
  global model, device
24
  model_opt = "default"
 
19
  model = None
20
  device = None
21
 
22
+ @spaces.GPU
23
  def init_model(use_local=False):
24
  global model, device
25
  model_opt = "default"
scripts/generate_prompt.py CHANGED
@@ -41,6 +41,7 @@ def download_model_files(repo_id, model_dir, sub_dir, files, sub_files):
41
  for file in sub_files:
42
  hf_hub_download(repo_id, file, subfolder=sub_dir, cache_dir=os.path.join(model_dir, sub_dir), force_download=True, force_filename=file)
43
 
 
44
  def load_wd14_tagger_model():
45
  """WD14γ‚Ώγ‚°δ»˜γ‘γƒ’γƒ‡γƒ«γ‚’γƒ­γƒΌγƒ‰"""
46
  model_dir = "wd14_tagger_model"
 
41
  for file in sub_files:
42
  hf_hub_download(repo_id, file, subfolder=sub_dir, cache_dir=os.path.join(model_dir, sub_dir), force_download=True, force_filename=file)
43
 
44
+ @spaces.GPU
45
  def load_wd14_tagger_model():
46
  """WD14γ‚Ώγ‚°δ»˜γ‘γƒ’γƒ‡γƒ«γ‚’γƒ­γƒΌγƒ‰"""
47
  model_dir = "wd14_tagger_model"
scripts/process_utils.py CHANGED
@@ -35,6 +35,7 @@ def ensure_rgb(image):
35
  return image.convert('RGB')
36
  return image
37
 
 
38
  def initialize(_use_local=False, use_gpu=False, use_dotenv=False):
39
  if use_dotenv:
40
  load_dotenv()
 
35
  return image.convert('RGB')
36
  return image
37
 
38
+ @spaces.GPU
39
  def initialize(_use_local=False, use_gpu=False, use_dotenv=False):
40
  if use_dotenv:
41
  load_dotenv()