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