|
6 | 6 | if platform.system() == "Linux": |
7 | 7 | sd_python_path=os.path.join(".", "model_conv/bin/python3") |
8 | 8 | chose_model=os.path.join(os.path.dirname(__file__), "sd_model_conversion.py") |
| 9 | + chose_model_controlnet=os.path.join(os.path.dirname(__file__), "controlnet_model_conversion.py") |
9 | 10 | else: |
10 | 11 | sd_python_path=r'model_conv\Scripts\python.exe' |
11 | 12 | chose_model=r'openvino-ai-plugins-gimp\sd_model_conversion.py' |
| 13 | + chose_model_controlnet=r'openvino-ai-plugins-gimp\controlnet_model_conversion.py' |
| 14 | + |
| 15 | + |
12 | 16 |
|
13 | 17 | print("=========Chose SD-1.5 models to download and convert=========") |
14 | 18 | print("1 - Square (512x512 output image) ") |
|
17 | 21 | print("4 - Portrait_512x768 (512x768 output image), will take time since model is large ") |
18 | 22 | print("5 - Landscape_768x512 (768x512 output image), will take time since model is large ") |
19 | 23 | print("6 - SD-1.5 Inapinting model (512x512 output image) ") |
20 | | -print("7 - ALL the above SD-1.5 models ") |
21 | | -print("8 - Only Square, Landscape, Portrait") |
22 | | -print("9 - Skip All SD-1.5 Model setup ") |
| 24 | +print("7 - SD-1.5 Controlnet-Openpose model (512x512 output image) ") |
| 25 | +print("8 - ALL the above SD-1.5 models ") |
| 26 | +print("9 - Only Square, Landscape, Portrait") |
| 27 | +print("10 - Skip All SD-1.5 Model setup ") |
23 | 28 |
|
24 | 29 | while True: |
25 | 30 | choice = input("Enter the Number for the model you want to download & convert: ") |
26 | 31 |
|
27 | 32 | # setup all the SD1.5 models |
28 | | - if choice=="7": |
| 33 | + if choice=="8": |
29 | 34 | for i in range(1,7): |
30 | 35 |
|
31 | 36 | subprocess.call([sd_python_path, chose_model, str(i)]) |
32 | | - |
| 37 | + |
| 38 | + subprocess.call([sd_python_path, chose_model_controlnet, "7"]) |
33 | 39 | break |
34 | 40 | # setup only square, landscape and Portrait |
35 | | - elif choice=="8": |
| 41 | + elif choice=="9": |
36 | 42 | for i in range(1,4): |
37 | 43 |
|
38 | 44 | subprocess.call([sd_python_path, chose_model, str(i)]) |
39 | 45 | break |
40 | | - elif choice=="9": |
| 46 | + elif choice=="10": |
41 | 47 | print("Exiting SD-1.5 Model setup.........") |
42 | 48 | break |
43 | 49 | elif choice in ["1","2","3","4","5","6"]: |
44 | 50 |
|
45 | 51 | subprocess.call([sd_python_path, chose_model, choice]) |
| 52 | + elif choice == "7": |
| 53 | + |
| 54 | + subprocess.call([sd_python_path, chose_model_controlnet, choice]) |
46 | 55 |
|
47 | 56 | break |
48 | 57 |
|
|
0 commit comments