yeq6x commited on
Commit
4c75bd8
1 Parent(s): c3251dc

set_lora_device

Browse files
Files changed (2) hide show
  1. app.py +14 -20
  2. scripts/process_utils.py +1 -1
app.py CHANGED
@@ -29,30 +29,24 @@ def process_image(input_image, mode, weight1, weight2):
29
  sample_images = [
30
  'images/sample1.png',
31
  'images/sample2.png',
32
- # 'images/sample3.png',
33
- 'images/sample4.png',
34
- 'images/sample5.png',
35
- 'images/sample6.png',
36
- 'images/sample7.png',
37
- 'images/sample8.png',
38
- # 'images/sample9.png',
39
- 'images/sample10.png',
40
- 'images/sample11.png',
41
- # 'images/sample12.png',
42
- # 'images/sample13.png',
43
- # 'images/sample14.png',
44
- 'images/sample15.png',
45
- 'images/sample16.png',
46
- # 'images/sample17.png',
47
- 'images/sample18.png',
48
- 'images/sample19.png',
49
- 'images/sample20.png',
50
- 'images/sample21.png',
51
  ]
52
 
53
  # Gradio インターフェースの定義
54
  with gr.Blocks() as demo:
55
- gr.Markdown("# Image2Body Test")
56
 
57
  with gr.Row():
58
  with gr.Column():
 
29
  sample_images = [
30
  'images/sample1.png',
31
  'images/sample2.png',
32
+ # 'images/sample4.png',
33
+ # 'images/sample5.png',
34
+ # 'images/sample6.png',
35
+ # 'images/sample7.png',
36
+ # 'images/sample8.png',
37
+ # 'images/sample10.png',
38
+ # 'images/sample11.png',
39
+ # 'images/sample15.png',
40
+ # 'images/sample16.png',
41
+ # 'images/sample18.png',
42
+ # 'images/sample19.png',
43
+ # 'images/sample20.png',
44
+ # 'images/sample21.png',
 
 
 
 
 
 
45
  ]
46
 
47
  # Gradio インターフェースの定義
48
  with gr.Blocks() as demo:
49
+ gr.Markdown("# Image2Body Demo")
50
 
51
  with gr.Row():
52
  with gr.Column():
scripts/process_utils.py CHANGED
@@ -102,7 +102,7 @@ def initialize_sotai_model():
102
 
103
  for lora_name, alpha in lora_names:
104
  lora_path = get_file_path(lora_name, subfolder=os.environ["lora_dir"])
105
- load_lora(sotai_gen_pipe, lora_path, adapter_name=lora_name, alpha=alpha)
106
 
107
  # スケジューラーの設定
108
  sotai_gen_pipe.scheduler = UniPCMultistepScheduler.from_config(sotai_gen_pipe.scheduler.config)
 
102
 
103
  for lora_name, alpha in lora_names:
104
  lora_path = get_file_path(lora_name, subfolder=os.environ["lora_dir"])
105
+ load_lora(sotai_gen_pipe, lora_path, adapter_name=lora_name.split(".")[0], alpha=alpha)
106
 
107
  # スケジューラーの設定
108
  sotai_gen_pipe.scheduler = UniPCMultistepScheduler.from_config(sotai_gen_pipe.scheduler.config)