Spaces:
Running
on
Zero
Running
on
Zero
- app.py +0 -2
- scripts/generate_prompt.py +0 -1
app.py
CHANGED
@@ -5,7 +5,6 @@ from PIL import Image
|
|
5 |
import base64
|
6 |
from scripts.process_utils import initialize, process_image_as_base64, image_to_base64
|
7 |
from scripts.anime import init_model
|
8 |
-
from scripts.generate_prompt import load_wd14_tagger_model
|
9 |
from datetime import datetime
|
10 |
from pytz import timezone
|
11 |
from scripts.survey import handle_form_submission, handle_visit_choice, handle_proceed, localize, script, generate_image, send_feedback
|
@@ -14,7 +13,6 @@ def initialize_models():
|
|
14 |
# 初期化
|
15 |
initialize(_use_local=False, use_gpu=True, use_dotenv=True)
|
16 |
init_model(use_local=False)
|
17 |
-
load_wd14_tagger_model()
|
18 |
|
19 |
def process_image(input_image, mode, weight1=None, weight2=None):
|
20 |
tokyo_time = datetime.now(timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S") # 日本時間のタイムスタンプ
|
|
|
5 |
import base64
|
6 |
from scripts.process_utils import initialize, process_image_as_base64, image_to_base64
|
7 |
from scripts.anime import init_model
|
|
|
8 |
from datetime import datetime
|
9 |
from pytz import timezone
|
10 |
from scripts.survey import handle_form_submission, handle_visit_choice, handle_proceed, localize, script, generate_image, send_feedback
|
|
|
13 |
# 初期化
|
14 |
initialize(_use_local=False, use_gpu=True, use_dotenv=True)
|
15 |
init_model(use_local=False)
|
|
|
16 |
|
17 |
def process_image(input_image, mode, weight1=None, weight2=None):
|
18 |
tokyo_time = datetime.now(timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S") # 日本時間のタイムスタンプ
|
scripts/generate_prompt.py
CHANGED
@@ -41,7 +41,6 @@ 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 |
-
@spaces.GPU
|
45 |
def load_wd14_tagger_model():
|
46 |
"""WD14タグ付けモデルをロード"""
|
47 |
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 |
def load_wd14_tagger_model():
|
45 |
"""WD14タグ付けモデルをロード"""
|
46 |
model_dir = "wd14_tagger_model"
|