viyi commited on
Commit
cb9215c
·
verified ·
1 Parent(s): c50d96a

Upload 2 files

Browse files
sdwui-start-util.ipynb CHANGED
@@ -1346,7 +1346,7 @@
1346
  "outputs": [],
1347
  "source": [
1348
  "envInstalled=False\n",
1349
- "quickStart = True\n",
1350
  "#安装\n",
1351
  "def install():\n",
1352
  " print('安装')\n",
@@ -1428,7 +1428,28 @@
1428
  "\n",
1429
  " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -V''')\n",
1430
  " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip -V''')\n",
1431
- "\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1432
  " envInstalled = True\n",
1433
  " print('安装需要的python环境 完成')\n",
1434
  " \n",
@@ -1558,6 +1579,7 @@
1558
  " proxy_thread.start()\n",
1559
  " if isInstall is False or _reLoad: \n",
1560
  " print('安装运行环境')\n",
 
1561
  " install()\n",
1562
  " link_dir()\n",
1563
  " init_huggingface()\n",
@@ -1705,7 +1727,7 @@
1705
  "name": "python",
1706
  "nbconvert_exporter": "python",
1707
  "pygments_lexer": "ipython3",
1708
- "version": "3.10.11"
1709
  }
1710
  },
1711
  "nbformat": 4,
 
1346
  "outputs": [],
1347
  "source": [
1348
  "envInstalled=False\n",
1349
+ "quickStart = False\n",
1350
  "#安装\n",
1351
  "def install():\n",
1352
  " print('安装')\n",
 
1428
  "\n",
1429
  " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -V''')\n",
1430
  " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip -V''')\n",
1431
+ " \n",
1432
+ " if not quickStart:\n",
1433
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -V''')\n",
1434
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip -V''')\n",
1435
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121''')\n",
1436
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install xformers==0.0.27''')\n",
1437
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install -r requirements_versions.txt''')\n",
1438
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install spandrel==0.3.0''')\n",
1439
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install opencv-python''')\n",
1440
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install pydantic==1.10.15''')\n",
1441
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install transformers -U''')\n",
1442
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install llama-cpp-python''')\n",
1443
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install pytorch_lightning==2.3.3 torchsde==0.2.6 spandrel==0.3.4''')\n",
1444
+ " \n",
1445
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install open-clip-torch -U''')\n",
1446
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install protobuf==4.25.8''')\n",
1447
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install blendmodes==2022''')\n",
1448
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install Pillow==9.5.0''')\n",
1449
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install basicsr''')\n",
1450
+ " \n",
1451
+ " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install basicsr''')\n",
1452
+ " \n",
1453
  " envInstalled = True\n",
1454
  " print('安装需要的python环境 完成')\n",
1455
  " \n",
 
1579
  " proxy_thread.start()\n",
1580
  " if isInstall is False or _reLoad: \n",
1581
  " print('安装运行环境')\n",
1582
+ " os.environ['MPLBACKEND'] = 'Agg'\n",
1583
  " install()\n",
1584
  " link_dir()\n",
1585
  " init_huggingface()\n",
 
1727
  "name": "python",
1728
  "nbconvert_exporter": "python",
1729
  "pygments_lexer": "ipython3",
1730
+ "version": "3.10.13"
1731
  }
1732
  },
1733
  "nbformat": 4,
sdwui-start-util.mini.ipynb CHANGED
@@ -1287,7 +1287,7 @@
1287
  "outputs": [],
1288
  "source": [
1289
  "envInstalled=False\n",
1290
- "quickStart = True\n",
1291
  "#安装\n",
1292
  "def install():\n",
1293
  " print('安装')\n",
@@ -1354,9 +1354,27 @@
1354
  " if not Path(f'{_install_path}/{_ui_dir_name}/venv/bin/pip').exists():\n",
1355
  " run('curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py')\n",
1356
  " run(f'{_install_path}/{_ui_dir_name}/venv/bin/python3 get-pip.py')\n",
1357
- "\n",
1358
- " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -V''')\n",
1359
- " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip -V''')\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1360
  "\n",
1361
  " envInstalled = True\n",
1362
  " print('安装需要的python环境 完成')\n",
@@ -1410,7 +1428,6 @@
1410
  " root_path = _sub_path[i]\n",
1411
  " if root_path.endswith('/'): root_path = root_path[:-1]\n",
1412
  " if torch.cuda.device_count() == 2 and not _multi_case:\n",
1413
- " print(f'当前同时使用多张显卡进行并行推理提高出图速度')\n",
1414
  " os.environ['CUDA_VISIBLE_DEVICES']='0,1'\n",
1415
  " get_ipython().system(f'''venv/bin/python3 launch.py --port {str(_server_port+1+i)} --subpath={_sub_path[i]}''')\n",
1416
  " else: \n",
@@ -1488,6 +1505,7 @@
1488
  " proxy_thread.start()\n",
1489
  " if isInstall is False or _reLoad: \n",
1490
  " print('安装运行环境')\n",
 
1491
  " install()\n",
1492
  " link_dir()\n",
1493
  " init_huggingface()\n",
 
1287
  "outputs": [],
1288
  "source": [
1289
  "envInstalled=False\n",
1290
+ "quickStart = False\n",
1291
  "#安装\n",
1292
  "def install():\n",
1293
  " print('安装')\n",
 
1354
  " if not Path(f'{_install_path}/{_ui_dir_name}/venv/bin/pip').exists():\n",
1355
  " run('curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py')\n",
1356
  " run(f'{_install_path}/{_ui_dir_name}/venv/bin/python3 get-pip.py')\n",
1357
+ " \n",
1358
+ " if not quickStart:\n",
1359
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -V''')\n",
1360
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip -V''')\n",
1361
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121''')\n",
1362
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install xformers==0.0.27''')\n",
1363
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install -r requirements_versions.txt''')\n",
1364
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install spandrel==0.3.0''')\n",
1365
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install opencv-python''')\n",
1366
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install pydantic==1.10.15''')\n",
1367
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install transformers -U''')\n",
1368
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install llama-cpp-python''')\n",
1369
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python -m pip install pytorch_lightning==2.3.3 torchsde==0.2.6 spandrel==0.3.4''')\n",
1370
+ " \n",
1371
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install open-clip-torch -U''')\n",
1372
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install protobuf==4.25.8''')\n",
1373
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install blendmodes==2022''')\n",
1374
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install Pillow==9.5.0''')\n",
1375
+ " run(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install basicsr''')\n",
1376
+ " \n",
1377
+ " get_ipython().system(f'''{_install_path}/{_ui_dir_name}/venv/bin/python3 -m pip install basicsr''')\n",
1378
  "\n",
1379
  " envInstalled = True\n",
1380
  " print('安装需要的python环境 完成')\n",
 
1428
  " root_path = _sub_path[i]\n",
1429
  " if root_path.endswith('/'): root_path = root_path[:-1]\n",
1430
  " if torch.cuda.device_count() == 2 and not _multi_case:\n",
 
1431
  " os.environ['CUDA_VISIBLE_DEVICES']='0,1'\n",
1432
  " get_ipython().system(f'''venv/bin/python3 launch.py --port {str(_server_port+1+i)} --subpath={_sub_path[i]}''')\n",
1433
  " else: \n",
 
1505
  " proxy_thread.start()\n",
1506
  " if isInstall is False or _reLoad: \n",
1507
  " print('安装运行环境')\n",
1508
+ " os.environ['MPLBACKEND'] = 'Agg'\n",
1509
  " install()\n",
1510
  " link_dir()\n",
1511
  " init_huggingface()\n",