yeq6x commited on
Commit
c8129bb
·
1 Parent(s): ea8aac1
Files changed (2) hide show
  1. app.py +1 -4
  2. scripts/process_utils.py +1 -0
app.py CHANGED
@@ -1,7 +1,5 @@
1
- # spaces==0.30.4をインストール
2
- import os
3
- os.system("pip install spaces==0.30.4")
4
  import gradio as gr
 
5
  import io
6
  from PIL import Image
7
  import base64
@@ -13,7 +11,6 @@ from scripts.survey import handle_form_submission, handle_visit_choice, handle_p
13
 
14
  # 初期化
15
  initialize(_use_local=False, use_gpu=True, use_dotenv=True)
16
- init_model(use_local=False)
17
 
18
  def process_image(input_image, mode, weight1=None, weight2=None):
19
  tokyo_time = datetime.now(timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S") # 日本時間のタイムスタンプ
 
 
 
 
1
  import gradio as gr
2
+ import os
3
  import io
4
  from PIL import Image
5
  import base64
 
11
 
12
  # 初期化
13
  initialize(_use_local=False, use_gpu=True, use_dotenv=True)
 
14
 
15
  def process_image(input_image, mode, weight1=None, weight2=None):
16
  tokyo_time = datetime.now(timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S") # 日本時間のタイムスタンプ
scripts/process_utils.py CHANGED
@@ -224,6 +224,7 @@ def generate_sotai_image(input_image: Image.Image, output_width: int, output_hei
224
  # EasyNegativeV2の内容
225
  easy_negative_v2 = "(worst quality, low quality, normal quality:1.4), lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry, artist name, (bad_prompt_version2:0.8)"
226
 
 
227
  output = sotai_gen_pipe(
228
  prompt,
229
  image=[input_image, input_image],
 
224
  # EasyNegativeV2の内容
225
  easy_negative_v2 = "(worst quality, low quality, normal quality:1.4), lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, jpeg artifacts, signature, watermark, username, blurry, artist name, (bad_prompt_version2:0.8)"
226
 
227
+ print(f"{sotai_gen_pipe.device}で画像生成中...")
228
  output = sotai_gen_pipe(
229
  prompt,
230
  image=[input_image, input_image],