StoryDiffusion-一键生成漫画

StoryDiffusion-一键生成漫画
- 举报
绘梦AI:StoryDiffusion漫画创作节
参加“绘梦AI:StoryDiffusion漫画创作节”活动,完成互动讨论
有机会获得开发者盲盒礼品!
快来一键生成你的漫画故事,探索AI在艺术创作中的无限可能!
【活动背景】
在数字化时代,人工智能(AI)技术正以前所未有的速度发展,深刻影响着我们的生活和工作方式。特别是在创意产业,AI的应用正在打破传统边界,为艺术家和开发者提供了全新的表达工具和创作平台。
【活动内容】
华为云ModelArts平台,作为面向开发者的一站式AI开发平台,可快速创建和部署模型,提供模型开发、训练、推理端到端工具链,以及多规格、多样化AI算力,支持万亿参数模型训练。“绘梦AI:StoryDiffusion漫画创作节”活动,结合ModelArts开发平台与Stable Diffusion模型,通过趣味创作案例,让开发者了解AI绘画的技术原理和实现过程,体验如何利用ModelArts平台一键创作漫画,轻松掌握AI艺术创作技能。
【活动时间】
2024年11月22日-2024年12月31日
【参与方式】
- 点击活动页面右上角的“ModelArts中运行”按钮,注册或登录华为云账号
- 进入Notebook,等待右上角资源连接倒计时结束,连接免费算力资源
- 根据Notebook中的教程提示逐步操作,完成并保存您的漫画创作
- 完成漫画创作后,请在华为云开发者社区发帖分享您的创意漫画,或产品使用建议。标题格式为“StoryDiffusion漫画创作节活动分享-VOD/创意”,建议不少于30字,参与分享将有机会获得开发者盲盒礼品~
【奖项设置】
奖项设置 | 评选条件 | 获奖名额 | 激励礼品 |
---|---|---|---|
优质建议奖 | 由华为云专家组选择对产品功能有改进价值的10条建议 | 10名 | 开发者盲盒礼品 价值50-100元 |
最佳创意奖 | 由华为云专家组根据生成效果选择10幅漫画 | 10名 | 开发者盲盒礼品 价值50-100元 |
【注意事项】
①请务必使用本人实名账号参与活动(IAM、企业账号等账号参与无效)。为保证活动的公平公正,华为云有权对恶意刷活动资源(“恶意”是指为获取资源而异常注册账号等破坏活动公平性的行为,黑产用户不计入活动统计),利用资源从事违法违规行为的用户收回奖励资格,参与活动账号需和得奖收件人为同一人,否则不予发放奖励。
②本活动规则由华为云在法律规定范围内进行解释。华为云保留不时更新、修改或删除本活动规则的权利。上述更新、修改或删除于公布时即时生效,用户应当主动查阅本活动规则的最新内容。
③所有参加本活动的用户,均视为认可并同意遵守《华为云用户协议》,包括以援引方式纳入《华为云用户协议》的《可接受的使用政策》、《法律声明》、《隐私政策声明》、相关服务等级协议,以及华为云服务网站规定的其他协议和政策(统称为“云服务协议”)的约束。如果您不同意本活动规则和云服务协议的条款,请勿参加本活动。
1. StoryDiffusion简介
StoryDiffusion 是一款由南开大学HVision团队开发的人工智能工具,主要功能包括生成连贯的图像和视频故事,以及漫画生成创作。
StoryDiffusion利用一致性自注意力(Consistent Self-Attention)技术,能够在无需训练的情况下生成主题一致的图像,这些图像可以用于讲述故事或作为后续内容生成的输入。
本案例将StoryDiffusion迁移到ModelArts平台上,可以快速进行漫画生成。
2. 案例体验
🔹 点击右上方ModelArts中运行按钮,将会进入到ModelArts CodeLab中,这时需要你登录华为云账号,如果没有账号,则需要注册一个,且要进行实名认证,参考《ModelArts准备工作_简易版》 即可完成账号注册和实名认证。 登录之后,等待片刻,即可进入到CodeLab的运行环境.
🔹 本案例需使用 P100 及以上规格运行,请确保运行规格一致,可按照下图切换规格。
🔹 出现 Out Of Memory ,请检查是否为您的参数配置过高导致,修改参数配置,重启kernel或更换更高规格资源进行规避❗❗❗
2.1 下载StoryDiffusion模型
import moxing as mox
mox.file.copy_parallel('obs://modelarts-labs-bj4-v2/case_zoo/StoryDiffusion/StoryDiffusion', 'StoryDiffusion')
mox.file.copy_parallel('obs://modelarts-labs-bj4-v2/course/ModelBox/opus-mt-zh-en', 'opus-mt-zh-en')
mox.file.copy_parallel('obs://modelarts-labs-bj4-v2/course/ModelBox/frpc_linux_amd64', 'frpc_linux_amd64')
2.2 配置环境
本案例依赖Python3.10.10及以上环境,因此我们首先创建虚拟环境:
!/home/ma-user/anaconda3/bin/conda clean -i
!/home/ma-user/anaconda3/bin/conda create -n python-3.10.10 python=3.10.10 -y --override-channels --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
!/home/ma-user/anaconda3/envs/python-3.10.10/bin/pip install ipykernel
/home/ma-user/anaconda3/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environment location: /home/ma-user/anaconda3/envs/python-3.10.10 added / updated specs: - python=3.10.10 The following packages will be downloaded: package | build ---------------------------|----------------- _libgcc_mutex-0.1 | main 3 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main _openmp_mutex-5.1 | 1_gnu 21 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main bzip2-1.0.8 | h5eee18b_6 262 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main ca-certificates-2024.9.24 | h06a4308_0 130 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main ld_impl_linux-64-2.40 | h12ee557_0 710 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libffi-3.4.4 | h6a678d5_1 141 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libgcc-ng-11.2.0 | h1234567_1 5.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libgomp-11.2.0 | h1234567_1 474 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libstdcxx-ng-11.2.0 | h1234567_1 4.7 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libuuid-1.41.5 | h5eee18b_0 27 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main ncurses-6.4 | h6a678d5_0 914 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main openssl-1.1.1w | h7f8727e_0 3.7 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pip-24.2 | py310h06a4308_0 2.3 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python-3.10.10 | h7a1cb2a_2 26.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main readline-8.2 | h5eee18b_0 357 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main setuptools-75.1.0 | py310h06a4308_0 1.7 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main sqlite-3.45.3 | h5eee18b_0 1.2 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tk-8.6.14 | h39e8969_0 3.4 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tzdata-2024b | h04d1e81_0 115 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main wheel-0.44.0 | py310h06a4308_0 109 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main xz-5.4.6 | h5eee18b_1 643 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main zlib-1.2.13 | h5eee18b_1 111 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main ------------------------------------------------------------ Total: 53.2 MB The following NEW packages will be INSTALLED: _libgcc_mutex anaconda/pkgs/main/linux-64::_libgcc_mutex-0.1-main _openmp_mutex anaconda/pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu bzip2 anaconda/pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 ca-certificates anaconda/pkgs/main/linux-64::ca-certificates-2024.9.24-h06a4308_0 ld_impl_linux-64 anaconda/pkgs/main/linux-64::ld_impl_linux-64-2.40-h12ee557_0 libffi anaconda/pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 libgcc-ng anaconda/pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 libgomp anaconda/pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 libstdcxx-ng anaconda/pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 libuuid anaconda/pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 ncurses anaconda/pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 openssl anaconda/pkgs/main/linux-64::openssl-1.1.1w-h7f8727e_0 pip anaconda/pkgs/main/linux-64::pip-24.2-py310h06a4308_0 python anaconda/pkgs/main/linux-64::python-3.10.10-h7a1cb2a_2 readline anaconda/pkgs/main/linux-64::readline-8.2-h5eee18b_0 setuptools anaconda/pkgs/main/linux-64::setuptools-75.1.0-py310h06a4308_0 sqlite anaconda/pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 tk anaconda/pkgs/main/linux-64::tk-8.6.14-h39e8969_0 tzdata anaconda/pkgs/main/noarch::tzdata-2024b-h04d1e81_0 wheel anaconda/pkgs/main/linux-64::wheel-0.44.0-py310h06a4308_0 xz anaconda/pkgs/main/linux-64::xz-5.4.6-h5eee18b_1 zlib anaconda/pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1 Downloading and Extracting Packages ncurses-6.4 | 914 KB | ##################################### | 100% _libgcc_mutex-0.1 | 3 KB | ##################################### | 100% bzip2-1.0.8 | 262 KB | ##################################### | 100% tzdata-2024b | 115 KB | ##################################### | 100% ld_impl_linux-64-2.4 | 710 KB | ##################################### | 100% libffi-3.4.4 | 141 KB | ##################################### | 100% setuptools-75.1.0 | 1.7 MB | ##################################### | 100% libgomp-11.2.0 | 474 KB | ##################################### | 100% wheel-0.44.0 | 109 KB | ##################################### | 100% openssl-1.1.1w | 3.7 MB | ##################################### | 100% ca-certificates-2024 | 130 KB | ##################################### | 100% _openmp_mutex-5.1 | 21 KB | ##################################### | 100% readline-8.2 | 357 KB | ##################################### | 100% pip-24.2 | 2.3 MB | ##################################### | 100% python-3.10.10 | 26.9 MB | ##################################### | 100% tk-8.6.14 | 3.4 MB | ##################################### | 100% xz-5.4.6 | 643 KB | ##################################### | 100% libgcc-ng-11.2.0 | 5.3 MB | ##################################### | 100% libstdcxx-ng-11.2.0 | 4.7 MB | ##################################### | 100% libuuid-1.41.5 | 27 KB | ##################################### | 100% zlib-1.2.13 | 111 KB | ##################################### | 100% sqlite-3.45.3 | 1.2 MB | ##################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate python-3.10.10 # # To deactivate an active environment, use # # $ conda deactivate Looking in indexes: http://repo.myhuaweicloud.com/repository/pypi/simple Collecting ipykernel Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/94/5c/368ae6c01c7628438358e6d337c19b05425727fbb221d2a3c4303c372f42/ipykernel-6.29.5-py3-none-any.whl (117 kB) Collecting comm>=0.1.1 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e6/75/49e5bfe642f71f272236b5b2d2691cf915a7283cc0ceda56357b61daa538/comm-0.2.2-py3-none-any.whl (7.2 kB) Collecting debugpy>=1.6.5 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/11/b3/4119fa89b66bcc64a3b186ea52ee7c22bccc5d1765ee890887678b0e3e76/debugpy-1.8.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 99.9 MB/s eta 0:00:00 Collecting ipython>=7.23.1 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c5/a5/c15ed187f1b3fac445bb42a2dedd8dec1eee1718b35129242049a13a962f/ipython-8.29.0-py3-none-any.whl (819 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.9/819.9 kB 18.4 MB/s eta 0:00:00 Collecting jupyter-client>=6.1.12 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/11/85/b0394e0b6fcccd2c1eeefc230978a6f8cb0c5df1e4cd3e7625735a0d7d1e/jupyter_client-8.6.3-py3-none-any.whl (106 kB) Collecting jupyter-core!=5.0.*,>=4.12 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c9/fb/108ecd1fe961941959ad0ee4e12ee7b8b1477247f30b1fdfd83ceaf017f0/jupyter_core-5.7.2-py3-none-any.whl (28 kB) Collecting matplotlib-inline>=0.1 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl (9.9 kB) Collecting nest-asyncio (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB) Collecting packaging (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB) Collecting psutil (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/58/4d/8245e6f76a93c98aab285a43ea71ff1b171bcd90c9d238bf81f7021fb233/psutil-6.1.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (287 kB) Collecting pyzmq>=24 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/5e/3b/2eb1667c9b866f53e76ee8b0c301b0469745a23bd5a87b7ee3d5dd9eb6e5/pyzmq-26.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (868 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 868.8/868.8 kB 40.9 MB/s eta 0:00:00 Collecting tornado>=6.1 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/22/d4/54f9d12668b58336bd30defe0307e6c61589a3e687b05c366f804b7faaf0/tornado-6.4.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (436 kB) Collecting traitlets>=5.4.0 (from ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl (85 kB) Collecting decorator (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl (9.1 kB) Collecting jedi>=0.16 (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/20/9f/bc63f0f0737ad7a60800bfd472a4836661adae21f9c2535f3957b1e54ceb/jedi-0.19.1-py2.py3-none-any.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 23.2 MB/s eta 0:00:00 Collecting prompt-toolkit<3.1.0,>=3.0.41 (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a9/6a/fd08d94654f7e67c52ca30523a178b3f8ccc4237fce4be90d39c938a831a/prompt_toolkit-3.0.48-py3-none-any.whl (386 kB) Collecting pygments>=2.4.0 (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 45.7 MB/s eta 0:00:00 Collecting stack-data (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl (24 kB) Collecting exceptiongroup (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl (16 kB) Collecting typing-extensions>=4.6 (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl (37 kB) Collecting pexpect>4.3 (from ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl (63 kB) Collecting python-dateutil>=2.8.2 (from jupyter-client>=6.1.12->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) Collecting platformdirs>=2.5 (from jupyter-core!=5.0.*,>=4.12->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl (18 kB) Collecting parso<0.9.0,>=0.8.3 (from jedi>=0.16->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl (103 kB) Collecting ptyprocess>=0.5 (from pexpect>4.3->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB) Collecting wcwidth (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) Collecting six>=1.5 (from python-dateutil>=2.8.2->jupyter-client>=6.1.12->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting executing>=1.2.0 (from stack-data->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b5/fd/afcd0496feca3276f509df3dbd5dae726fcc756f1a08d9e25abe1733f962/executing-2.1.0-py2.py3-none-any.whl (25 kB) Collecting asttokens>=2.1.0 (from stack-data->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/45/86/4736ac618d82a20d87d2f92ae19441ebc7ac9e7a581d7e58bbe79233b24a/asttokens-2.4.1-py2.py3-none-any.whl (27 kB) Collecting pure-eval (from stack-data->ipython>=7.23.1->ipykernel) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl (11 kB) Installing collected packages: wcwidth, pure-eval, ptyprocess, typing-extensions, traitlets, tornado, six, pyzmq, pygments, psutil, prompt-toolkit, platformdirs, pexpect, parso, packaging, nest-asyncio, executing, exceptiongroup, decorator, debugpy, python-dateutil, matplotlib-inline, jupyter-core, jedi, comm, asttokens, stack-data, jupyter-client, ipython, ipykernel Successfully installed asttokens-2.4.1 comm-0.2.2 debugpy-1.8.8 decorator-5.1.1 exceptiongroup-1.2.2 executing-2.1.0 ipykernel-6.29.5 ipython-8.29.0 jedi-0.19.1 jupyter-client-8.6.3 jupyter-core-5.7.2 matplotlib-inline-0.1.7 nest-asyncio-1.6.0 packaging-24.2 parso-0.8.4 pexpect-4.9.0 platformdirs-4.3.6 prompt-toolkit-3.0.48 psutil-6.1.0 ptyprocess-0.7.0 pure-eval-0.2.3 pygments-2.18.0 python-dateutil-2.9.0.post0 pyzmq-26.2.0 six-1.16.0 stack-data-0.6.3 tornado-6.4.1 traitlets-5.14.3 typing-extensions-4.12.2 wcwidth-0.2.13
import json
import os
data = {
"display_name": "python-3.10.10",
"env": {
"PATH": "/home/ma-user/anaconda3/envs/python-3.10.10/bin:/home/ma-user/anaconda3/envs/python-3.7.10/bin:/modelarts/authoring/notebook-conda/bin:/opt/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ma-user/modelarts/ma-cli/bin:/home/ma-user/modelarts/ma-cli/bin:/home/ma-user/anaconda3/envs/PyTorch-1.8/bin"
},
"language": "python",
"argv": [
"/home/ma-user/anaconda3/envs/python-3.10.10/bin/python",
"-m",
"ipykernel",
"-f",
"{connection_file}"
]
}
if not os.path.exists("/home/ma-user/anaconda3/share/jupyter/kernels/python-3.10.10/"):
os.mkdir("/home/ma-user/anaconda3/share/jupyter/kernels/python-3.10.10/")
with open('/home/ma-user/anaconda3/share/jupyter/kernels/python-3.10.10/kernel.json', 'w') as f:
json.dump(data, f, indent=4)
创建完成后,稍等片刻,或刷新页面,点击右上角kernel选择python-3.10.10(有时会出现在左上角,同样切换即可)
2.3 安装依赖库
%cd StoryDiffusion
/home/ma-user/work/StoryDiffusion/StoryDiffusion
/home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages/IPython/core/magics/osm.py:417: UserWarning: This is now an optional IPython functionality, setting dhist requires you to install the `pickleshare` library. self.shell.db['dhist'] = compress_dhist(dhist)[-100:]
!pip install -r requirements.txt
!pip install sentencepiece
!cp ../frpc_linux_amd64 /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages/gradio/frpc_linux_amd64_v0.2
!chmod +x /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages/gradio/frpc_linux_amd64_v0.2
Looking in indexes: http://repo.myhuaweicloud.com/repository/pypi/simple Collecting gradio==4.25.0 (from -r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a7/06/29af2174e7aa1f3890e46483902bbb10628a90ddc053b2b02fcd201da89e/gradio-4.25.0-py3-none-any.whl (17.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 75.1 MB/s eta 0:00:0000:01 Collecting xformers==0.0.20 (from -r requirements.txt (line 2)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/4b/b0/dfbb3b0ceafdb73cd1b2bbe33f65dc1c5c47dcb0d4b03ba6f95da6557306/xformers-0.0.20-cp310-cp310-manylinux2014_x86_64.whl (109.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.1/109.1 MB 157.1 MB/s eta 0:00:0000:0100:01 Collecting torch==2.0.1 (from -r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/8c/4d/17e07377c9c3d1a0c4eb3fde1c7c16b5a0ce6133ddbabc08ceef6b7f2645/torch-2.0.1-cp310-cp310-manylinux1_x86_64.whl (619.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.9/619.9 MB 85.7 MB/s eta 0:00:0000:0100:01 Collecting torchvision==0.15.2 (from -r requirements.txt (line 4)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/87/0f/88f023bf6176d9af0f85feedf4be129f9cf2748801c4d9c690739a10c100/torchvision-0.15.2-cp310-cp310-manylinux1_x86_64.whl (6.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 107.2 MB/s eta 0:00:00 Collecting diffusers==0.25.0 (from -r requirements.txt (line 5)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/aa/0b/af1dd4b355accf28fa413d93c3b7df2c25922ebc3435eecc56818a3f8c1e/diffusers-0.25.0-py3-none-any.whl (1.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 27.8 MB/s eta 0:00:00 Collecting transformers==4.36.2 (from -r requirements.txt (line 6)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/20/0a/739426a81f7635b422fbe6cb8d1d99d1235579a6ac8024c13d743efa6847/transformers-4.36.2-py3-none-any.whl (8.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 MB 96.4 MB/s eta 0:00:00 Collecting huggingface-hub==0.24.5 (from -r requirements.txt (line 7)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/0b/05/31b21998f68c31e7ffcc27ff08531fb9af5506d765ce8d661fb0036e6918/huggingface_hub-0.24.5-py3-none-any.whl (417 kB) Collecting spaces==0.19.4 (from -r requirements.txt (line 8)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/2e/45/0483422a3f5be1f7468eeed6ea5878b6bd6dc1f99ee8d386c6cfbd79becb/spaces-0.19.4-py3-none-any.whl (15 kB) Collecting numpy (from -r requirements.txt (line 9)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/05/db/5d9c91b2e1e2e72be1369278f696356d44975befcae830daf2e667dcb54f/numpy-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.3/16.3 MB 115.9 MB/s eta 0:00:00 Collecting accelerate (from -r requirements.txt (line 10)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/d1/d5/0050b2820a1e709ffa623f9a9e8ae42d0903535f2150613cbfeb7f16932a/accelerate-1.1.1-py3-none-any.whl (333 kB) Collecting safetensors (from -r requirements.txt (line 11)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b9/df/6f766b56690709d22e83836e4067a1109a7d84ea152a6deb5692743a2805/safetensors-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (435 kB) Collecting omegaconf (from -r requirements.txt (line 12)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl (79 kB) Collecting peft (from -r requirements.txt (line 13)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/78/9d/5f95bfb298c8d3b4e3a107701f9a4e7774a0d4d1f8eb0c9d5420b80f7c9d/peft-0.13.2-py3-none-any.whl (320 kB) Collecting httpx==0.27.0 (from -r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/41/7b/ddacf6dcebb42466abd03f368782142baa82e08fc0c1f8eaa05b4bae87d5/httpx-0.27.0-py3-none-any.whl (75 kB) Collecting safetensors (from -r requirements.txt (line 11)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/20/4e/878b080dbda92666233ec6f316a53969edcb58eab1aa399a64d0521cf953/safetensors-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 54.1 MB/s eta 0:00:00 Collecting fastapi==0.112.4 (from -r requirements.txt (line 16)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f5/cf/5b703250f4d85e86ec13ec28bb5ac36790092bfe45e94e414529371d6f11/fastapi-0.112.4-py3-none-any.whl (93 kB) Collecting aiofiles<24.0,>=22.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c5/19/5af6804c4cc0fed83f47bff6e413a98a36618e7d40185cd36e69737f3b0e/aiofiles-23.2.1-py3-none-any.whl (15 kB) Collecting altair<6.0,>=4.2.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/9b/52/4a86a4fa1cc2aae79137cc9510b7080c3e5aede2310d14fae5486feec7f7/altair-5.4.1-py3-none-any.whl (658 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 658.1/658.1 kB 17.1 MB/s eta 0:00:00 Collecting ffmpy (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ff/1e/db99aa669eee301966bc6c997d60a0240f9cecae63f044b2e5a5310e4bf7/ffmpy-0.4.0-py3-none-any.whl (5.8 kB) Collecting gradio-client==0.15.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/bc/63/534dfb5a0a3ff3ea6aa26dd394cef0e389f05bc15443fcb877b6a0cf2767/gradio_client-0.15.0-py3-none-any.whl (313 kB) Collecting importlib-resources<7.0,>=1.3 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e1/6a/4604f9ae2fa62ef47b9de2fa5ad599589d28c9fd1d335f32759813dfa91e/importlib_resources-6.4.5-py3-none-any.whl (36 kB) Collecting jinja2<4.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl (133 kB) Collecting markupsafe~=2.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/7c/52/2b1b570f6b8b803cef5ac28fdf78c0da318916c7d2fe9402a84d591b394c/MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB) Collecting matplotlib~=3.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/8d/9d/d06860390f9d154fa884f1740a5456378fb153ff57443c91a4a32bab7092/matplotlib-3.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 111.5 MB/s eta 0:00:00 Collecting numpy (from -r requirements.txt (line 9)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/4b/d7/ecf66c1cd12dc28b4040b15ab4d17b773b87fa9d29ca16125de01adb36cd/numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 76.0 MB/s eta 0:00:0000:01 Collecting orjson~=3.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/97/6e/d291bf382173af7788b368e4c22d02c7bdb9b7ac29b83e92930841321c16/orjson-3.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB) Requirement already satisfied: packaging in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from gradio==4.25.0->-r requirements.txt (line 1)) (24.2) Collecting pandas<3.0,>=1.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/44/50/7db2cd5e6373ae796f0ddad3675268c8d59fb6076e66f0c339d61cea886b/pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.1/13.1 MB 77.4 MB/s eta 0:00:00 Collecting pillow<11.0,>=8.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/5e/dd/425b95d0151e1d6c951f45051112394f130df3da67363b6bc75dc4c27aba/pillow-10.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 47.4 MB/s eta 0:00:00 Collecting pydantic>=2.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/df/e4/ba44652d562cbf0bf320e0f3810206149c8a4e99cdbf66da82e97ab53a15/pydantic-2.9.2-py3-none-any.whl (434 kB) Collecting pydub (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl (32 kB) Collecting python-multipart>=0.0.9 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b4/fb/275137a799169392f1fa88fff2be92f16eee38e982720a8aaadefc4a36b2/python_multipart-0.0.17-py3-none-any.whl (24 kB) Collecting pyyaml<7.0,>=5.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (751 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 751.2/751.2 kB 16.4 MB/s eta 0:00:00 Collecting ruff>=0.2.2 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/43/7b/1daa712de1c5bc6cbbf9fa60e9c41cc48cda962dc6d2c4f2a224d2c3007e/ruff-0.7.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.0/11.0 MB 64.6 MB/s eta 0:00:00 Collecting semantic-version~=2.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl (15 kB) Collecting tomlkit==0.12.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/68/4f/12207897848a653d03ebbf6775a29d949408ded5f99b2d87198bc5c93508/tomlkit-0.12.0-py3-none-any.whl (37 kB) Collecting typer<1.0,>=0.9 (from typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/18/7e/c8bfa8cbcd3ea1d25d2beb359b5c5a3f4339a7e2e5d9e3ef3e29ba3ab3b9/typer-0.13.0-py3-none-any.whl (44 kB) Requirement already satisfied: typing-extensions~=4.0 in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from gradio==4.25.0->-r requirements.txt (line 1)) (4.12.2) Collecting uvicorn>=0.14.0 (from gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/eb/14/78bd0e95dd2444b6caacbca2b730671d4295ccb628ef58b81bee903629df/uvicorn-0.32.0-py3-none-any.whl (63 kB) Collecting pyre-extensions==0.0.29 (from xformers==0.0.20->-r requirements.txt (line 2)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ce/96/2fd3042ad8b21278f22b7de116b1489e286c445f07c309c85221db86f120/pyre_extensions-0.0.29-py3-none-any.whl (12 kB) Collecting filelock (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b9/f8/feced7779d755758a52d1f6635d990b8d98dc0a29fa568bbe0625f18fdf3/filelock-3.16.1-py3-none-any.whl (16 kB) Collecting sympy (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/99/ff/c87e0622b1dadea79d2fb0b25ade9ed98954c9033722eb707053d310d4f3/sympy-1.13.3-py3-none-any.whl (6.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 41.3 MB/s eta 0:00:00 Collecting networkx (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl (1.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 25.3 MB/s eta 0:00:00 Collecting nvidia-cuda-nvrtc-cu11==11.7.99 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ef/25/922c5996aada6611b79b53985af7999fc629aee1d5d001b6a22431e18fec/nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 83.0 MB/s eta 0:00:0000:01 Collecting nvidia-cuda-runtime-cu11==11.7.99 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/36/92/89cf558b514125d2ebd8344dd2f0533404b416486ff681d5434a5832a019/nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.3/849.3 kB 18.4 MB/s eta 0:00:00 Collecting nvidia-cuda-cupti-cu11==11.7.101 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e6/9d/dd0cdcd800e642e3c82ee3b5987c751afd4f3fb9cc2752517f42c3bc6e49/nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl (11.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 67.4 MB/s eta 0:00:00 Collecting nvidia-cudnn-cu11==8.5.0.96 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/dc/30/66d4347d6e864334da5bb1c7571305e501dcb11b9155971421bb7bb5315f/nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 557.1/557.1 MB 152.6 MB/s eta 0:00:0000:0100:01 Collecting nvidia-cublas-cu11==11.10.3.66 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ce/41/fdeb62b5437996e841d83d7d2714ca75b886547ee8017ee2fe6ea409d983/nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.1/317.1 MB 147.7 MB/s eta 0:00:0000:0100:01 Collecting nvidia-cufft-cu11==10.9.0.58 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/64/c8/133717b43182ba063803e983e7680a94826a9f4ff5734af0ca315803f1b3/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux2014_x86_64.whl (168.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.4/168.4 MB 148.3 MB/s eta 0:00:0000:0100:01 Collecting nvidia-curand-cu11==10.2.10.91 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/8f/11/af78d54b2420e64a4dd19e704f5bb69dcb5a6a3138b4465d6a48cdf59a21/nvidia_curand_cu11-10.2.10.91-py3-none-manylinux1_x86_64.whl (54.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.6/54.6 MB 125.1 MB/s eta 0:00:0000:0100:01 Collecting nvidia-cusolver-cu11==11.4.0.1 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/3e/77/66149e3153b19312fb782ea367f3f950123b93916a45538b573fe373570a/nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl (102.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.6/102.6 MB 166.9 MB/s eta 0:00:0000:0100:01 Collecting nvidia-cusparse-cu11==11.7.4.91 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ea/6f/6d032cc1bb7db88a989ddce3f4968419a7edeafda362847f42f614b1f845/nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl (173.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.2/173.2 MB 85.6 MB/s eta 0:00:0000:0100:01 Collecting nvidia-nccl-cu11==2.14.3 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/55/92/914cdb650b6a5d1478f83148597a25e90ea37d739bd563c5096b0e8a5f43/nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl (177.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.1/177.1 MB 180.1 MB/s eta 0:00:0000:0100:01 Collecting nvidia-nvtx-cu11==11.7.91 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/23/d5/09493ff0e64fd77523afbbb075108f27a13790479efe86b9ffb4587671b5/nvidia_nvtx_cu11-11.7.91-py3-none-manylinux1_x86_64.whl (98 kB) Collecting triton==2.0.0 (from torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ca/31/ff6be541195daf77aa5c72303b2354661a69e717967d44d91eb4f3fdce32/triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 133.7 MB/s eta 0:00:0000:0100:01 Collecting requests (from torchvision==0.15.2->-r requirements.txt (line 4)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB) Collecting importlib-metadata (from diffusers==0.25.0->-r requirements.txt (line 5)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a0/d9/a1e041c5e7caa9a05c925f4bdbdfb7f006d1f74996af53467bc394c97be7/importlib_metadata-8.5.0-py3-none-any.whl (26 kB) Collecting regex!=2019.12.17 (from diffusers==0.25.0->-r requirements.txt (line 5)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f2/98/26d3830875b53071f1f0ae6d547f1d98e964dd29ad35cbf94439120bb67a/regex-2024.11.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (781 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.7/781.7 kB 13.4 MB/s eta 0:00:00 Collecting tokenizers<0.19,>=0.14 (from transformers==4.36.2->-r requirements.txt (line 6)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/1c/5d/cf5e122ce4f1a29f165b2a69dc33d1ff30bce303343d58a54775ddba5d51/tokenizers-0.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 89.7 MB/s eta 0:00:00 Collecting tqdm>=4.27 (from transformers==4.36.2->-r requirements.txt (line 6)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/2b/78/57043611a16c655c8350b4c01b8d6abfb38cc2acb475238b62c2146186d7/tqdm-4.67.0-py3-none-any.whl (78 kB) Collecting fsspec>=2023.5.0 (from huggingface-hub==0.24.5->-r requirements.txt (line 7)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c6/b2/454d6e7f0158951d8a78c2e1eb4f69ae81beb8dca5fee9809c6c99e9d0d0/fsspec-2024.10.0-py3-none-any.whl (179 kB) Collecting psutil<6,>=2 (from spaces==0.19.4->-r requirements.txt (line 8)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/c5/4f/0e22aaa246f96d6ac87fe5ebb9c5a693fbe8877f537a1022527c47ca43c5/psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (288 kB) Collecting anyio (from httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e4/f5/f2b75d2fc6f1a260f340f0e7c6a060f4dd2961cc16884ed851b0d18da06a/anyio-4.6.2.post1-py3-none-any.whl (90 kB) Collecting certifi (from httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/12/90/3c9ff0512038035f59d279fddeb79f5f1eccd8859f06d6163c58798b9487/certifi-2024.8.30-py3-none-any.whl (167 kB) Collecting httpcore==1.* (from httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/06/89/b161908e2f51be56568184aeb4a880fd287178d176fd1c860d2217f41106/httpcore-1.0.6-py3-none-any.whl (78 kB) Collecting idna (from httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB) Collecting sniffio (from httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl (10 kB) Collecting starlette<0.39.0,>=0.37.2 (from fastapi==0.112.4->-r requirements.txt (line 16)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b7/9c/93f7bc03ff03199074e81974cc148908ead60dcf189f68ba1761a0ee35cf/starlette-0.38.6-py3-none-any.whl (71 kB) Collecting websockets<12.0,>=10.0 (from gradio-client==0.15.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/58/0a/7570e15661a0a546c3a1152d95fe8c05480459bab36247f0acbf41f01a41/websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB) Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx==0.27.0->-r requirements.txt (line 14)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl (58 kB) Requirement already satisfied: setuptools in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.1->-r requirements.txt (line 3)) (75.1.0) Requirement already satisfied: wheel in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.1->-r requirements.txt (line 3)) (0.44.0) Collecting typing-inspect (from pyre-extensions==0.0.29->xformers==0.0.20->-r requirements.txt (line 2)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl (8.8 kB) Collecting cmake (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b0/f0/3dae20c15e52a815c3013f512216193fa017fa452e9b43d4400b90c8d473/cmake-3.31.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 27.8/27.8 MB 128.5 MB/s eta 0:00:0000:01 Collecting lit (from triton==2.0.0->torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/96/06/b36f150fa7c5bcc96a31a4d19a20fddbd1d965b6f02510b57a3bb8d4b930/lit-18.1.8-py3-none-any.whl (96 kB) INFO: pip is looking at multiple versions of accelerate to determine which version is compatible with other requirements. This could take a while. Collecting accelerate (from -r requirements.txt (line 10)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/73/e7/e61feefda1b483f0d53a320909051252175ccbfea29ab99bd62df6083c81/accelerate-1.1.0-py3-none-any.whl (333 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/2c/92/48aec3736ca778ffe5fa68e19e3c18917cba4de43fa46fe6176cccafe267/accelerate-1.0.1-py3-none-any.whl (330 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/2a/7c/6daed4be624f903643edd1b91670ce321a4cf08afd2b96ac368461742e89/accelerate-1.0.0-py3-none-any.whl (330 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b0/5e/80cee674cdbe529ef008721d7eebb50ae5def4314211d82123aa23e828f8/accelerate-0.34.2-py3-none-any.whl (324 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b3/26/96502753da5282f577f07d5658f87035edabdb77cad76298813b8f2a6c9f/accelerate-0.34.1-py3-none-any.whl (324 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/02/0e/626f2dd4325f4545fbaaf9c590390d2d4ab8e7551579346fe1e319bd93af/accelerate-0.34.0-py3-none-any.whl (324 kB) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/15/33/b6b4ad5efa8b9f4275d4ed17ff8a44c97276171341ba565fdffb0e3dc5e8/accelerate-0.33.0-py3-none-any.whl (315 kB) Collecting antlr4-python3-runtime==4.9.* (from omegaconf->-r requirements.txt (line 12)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz (117 kB) Preparing metadata (setup.py) ... done Collecting jsonschema>=3.0 (from altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/69/4a/4f9dbeb84e8850557c02365a0eee0649abe5eb1d84af92a25731c6c0f922/jsonschema-4.23.0-py3-none-any.whl (88 kB) Collecting narwhals>=1.5.2 (from altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a1/f9/574c34b4386d994a468cc844bc733638fd76b8cdbbd7cb8364b68ea5fbae/narwhals-1.13.3-py3-none-any.whl (201 kB) Collecting contourpy>=1.0.1 (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/99/e6/d11966962b1aa515f5586d3907ad019f4b812c04e4546cc19ebf62b5178e/contourpy-1.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (322 kB) Collecting cycler>=0.10 (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl (8.3 kB) Collecting fonttools>=4.22.0 (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e5/12/9a45294a7c4520cc32936edd15df1d5c24af701d2f5f51070a9a43d7664b/fonttools-4.54.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 93.7 MB/s eta 0:00:00 Collecting kiwisolver>=1.3.1 (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/55/91/0a57ce324caf2ff5403edab71c508dd8f648094b18cfbb4c8cc0fde4a6ac/kiwisolver-1.4.7-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 26.8 MB/s eta 0:00:00 Collecting pyparsing>=2.3.1 (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/be/ec/2eb3cd785efd67806c46c13a17339708ddc346cbb684eade7a6e6f79536a/pyparsing-3.2.0-py3-none-any.whl (106 kB) Requirement already satisfied: python-dateutil>=2.7 in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) (2.9.0.post0) Collecting pytz>=2020.1 (from pandas<3.0,>=1.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/11/c3/005fcca25ce078d2cc29fd559379817424e94885510568bc1bc53d7d5846/pytz-2024.2-py2.py3-none-any.whl (508 kB) Collecting tzdata>=2022.7 (from pandas<3.0,>=1.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a6/ab/7e5f53c3b9d14972843a647d8d7a853969a58aecc7559cb3267302c94774/tzdata-2024.2-py2.py3-none-any.whl (346 kB) Collecting annotated-types>=0.6.0 (from pydantic>=2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl (13 kB) Collecting pydantic-core==2.23.4 (from pydantic>=2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/11/ac/1e647dc1121c028b691028fa61a4e7477e6aeb5132628fde41dd34c1671f/pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 69.8 MB/s eta 0:00:00 Collecting charset-normalizer<4,>=2 (from requests->torchvision==0.15.2->-r requirements.txt (line 4)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/f8/01/344ec40cf5d85c1da3c1f57566c59e0c9b56bcc5566c08804a95a6cc8257/charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (144 kB) Collecting urllib3<3,>=1.21.1 (from requests->torchvision==0.15.2->-r requirements.txt (line 4)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl (126 kB) Requirement already satisfied: exceptiongroup>=1.0.2 in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from anyio->httpx==0.27.0->-r requirements.txt (line 14)) (1.2.2) Collecting click>=8.0.0 (from typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl (97 kB) Collecting shellingham>=1.3.0 (from typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB) Collecting rich>=10.11.0 (from typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/19/71/39c7c0d87f8d4e6c020a393182060eaefeeae6c01dab6a84ec346f2567df/rich-13.9.4-py3-none-any.whl (242 kB) WARNING: typer 0.13.0 does not provide the extra 'all' Collecting zipp>=3.20 (from importlib-metadata->diffusers==0.25.0->-r requirements.txt (line 5)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b7/1a/7e4798e9339adc931158c9d69ecc34f5e6791489d469f5e50ec15e35f458/zipp-3.21.0-py3-none-any.whl (9.6 kB) Collecting mpmath<1.4,>=1.1.0 (from sympy->torch==2.0.1->-r requirements.txt (line 3)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 22.0 MB/s eta 0:00:00 Collecting attrs>=22.2.0 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/6a/21/5b6702a7f963e95456c0de2d495f67bf5fd62840ac655dc451586d23d39a/attrs-24.2.0-py3-none-any.whl (63 kB) Collecting jsonschema-specifications>=2023.03.6 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/d1/0f/8910b19ac0670a0f80ce1008e5e751c4a57e14d2c4c13a482aa6079fa9d6/jsonschema_specifications-2024.10.1-py3-none-any.whl (18 kB) Collecting referencing>=0.28.4 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b7/59/2056f61236782a2c86b33906c025d4f4a0b17be0161b63b70fd9e8775d36/referencing-0.35.1-py3-none-any.whl (26 kB) Collecting rpds-py>=0.7.1 (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/d4/31/2dd40abc26fc0fc037b86006583276dc375d38ac821d4ca2394274e8045b/rpds_py-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360 kB) Requirement already satisfied: six>=1.5 in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio==4.25.0->-r requirements.txt (line 1)) (1.16.0) Collecting markdown-it-py>=2.2.0 (from rich>=10.11.0->typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl (87 kB) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages (from rich>=10.11.0->typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) (2.18.0) Collecting mypy-extensions>=0.3.0 (from typing-inspect->pyre-extensions==0.0.29->xformers==0.0.20->-r requirements.txt (line 2)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/2a/e2/5d3f6ada4297caebe1a2add3b126fe800c96f56dbe5d1988a2cbe0b267aa/mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.9->typer[all]<1.0,>=0.9; sys_platform != "emscripten"->gradio==4.25.0->-r requirements.txt (line 1)) Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl (10.0 kB) Building wheels for collected packages: antlr4-python3-runtime Building wheel for antlr4-python3-runtime (setup.py) ... done Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144555 sha256=dedfdcdc584cc4a5ef93d037da57090b96636a97ddbb093ce616bbbe56276825 Stored in directory: /home/ma-user/.cache/pip/wheels/9a/69/d6/7299342d2d9a6f8a4475b95277cc8ad37d57625faf846fee7c Successfully built antlr4-python3-runtime Installing collected packages: pytz, pydub, mpmath, lit, antlr4-python3-runtime, zipp, websockets, urllib3, tzdata, tqdm, tomlkit, sympy, sniffio, shellingham, semantic-version, safetensors, ruff, rpds-py, regex, pyyaml, python-multipart, pyparsing, pydantic-core, psutil, pillow, orjson, nvidia-nvtx-cu11, nvidia-nccl-cu11, nvidia-cusparse-cu11, nvidia-curand-cu11, nvidia-cufft-cu11, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-cupti-cu11, nvidia-cublas-cu11, numpy, networkx, narwhals, mypy-extensions, mdurl, markupsafe, kiwisolver, importlib-resources, idna, h11, fsspec, fonttools, filelock, ffmpy, cycler, cmake, click, charset-normalizer, certifi, attrs, annotated-types, aiofiles, uvicorn, typing-inspect, requests, referencing, pydantic, pandas, omegaconf, nvidia-cusolver-cu11, nvidia-cudnn-cu11, markdown-it-py, jinja2, importlib-metadata, httpcore, contourpy, anyio, starlette, rich, pyre-extensions, matplotlib, jsonschema-specifications, huggingface-hub, httpx, typer, tokenizers, jsonschema, gradio-client, fastapi, diffusers, transformers, altair, gradio, spaces, triton, torch, accelerate, xformers, torchvision, peft Attempting uninstall: psutil Found existing installation: psutil 6.1.0 Uninstalling psutil-6.1.0: Successfully uninstalled psutil-6.1.0 Successfully installed accelerate-0.33.0 aiofiles-23.2.1 altair-5.4.1 annotated-types-0.7.0 antlr4-python3-runtime-4.9.3 anyio-4.6.2.post1 attrs-24.2.0 certifi-2024.8.30 charset-normalizer-3.4.0 click-8.1.7 cmake-3.31.0.1 contourpy-1.3.0 cycler-0.12.1 diffusers-0.25.0 fastapi-0.112.4 ffmpy-0.4.0 filelock-3.16.1 fonttools-4.54.1 fsspec-2024.10.0 gradio-4.25.0 gradio-client-0.15.0 h11-0.14.0 httpcore-1.0.6 httpx-0.27.0 huggingface-hub-0.24.5 idna-3.10 importlib-metadata-8.5.0 importlib-resources-6.4.5 jinja2-3.1.4 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 kiwisolver-1.4.7 lit-18.1.8 markdown-it-py-3.0.0 markupsafe-2.1.5 matplotlib-3.9.2 mdurl-0.1.2 mpmath-1.3.0 mypy-extensions-1.0.0 narwhals-1.13.3 networkx-3.4.2 numpy-1.26.4 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 omegaconf-2.3.0 orjson-3.10.11 pandas-2.2.3 peft-0.13.2 pillow-10.4.0 psutil-5.9.8 pydantic-2.9.2 pydantic-core-2.23.4 pydub-0.25.1 pyparsing-3.2.0 pyre-extensions-0.0.29 python-multipart-0.0.17 pytz-2024.2 pyyaml-6.0.2 referencing-0.35.1 regex-2024.11.6 requests-2.32.3 rich-13.9.4 rpds-py-0.21.0 ruff-0.7.3 safetensors-0.4.0 semantic-version-2.10.0 shellingham-1.5.4 sniffio-1.3.1 spaces-0.19.4 starlette-0.38.6 sympy-1.13.3 tokenizers-0.15.2 tomlkit-0.12.0 torch-2.0.1 torchvision-0.15.2 tqdm-4.67.0 transformers-4.36.2 triton-2.0.0 typer-0.13.0 typing-inspect-0.9.0 tzdata-2024.2 urllib3-2.2.3 uvicorn-0.32.0 websockets-11.0.3 xformers-0.0.20 zipp-3.21.0 Looking in indexes: http://repo.myhuaweicloud.com/repository/pypi/simple Collecting sentencepiece Downloading http://repo.myhuaweicloud.com/repository/pypi/packages/a6/27/33019685023221ca8ed98e8ceb7ae5e166032686fa3662c68f1f1edf334e/sentencepiece-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 54.0 MB/s eta 0:00:00 Installing collected packages: sentencepiece Successfully installed sentencepiece-0.2.0
3. 模型测试
运行如下代码,点击“Running on public URL”后面的链接,即可开启gradio的交互界面,进行模型功能测试。
%env HF_ENDPOINT=https://hf-mirror.com
!python gradio_app_sdxl_specific_id_low_vram.py
env: HF_ENDPOINT=https://hf-mirror.com The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! /home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages/transformers/models/marian/tokenization_marian.py:197: UserWarning: Recommended: pip install sacremoses. warnings.warn("Recommended: pip install sacremoses.") {'Juggernaut': {'path': 'models/Juggernaut-XL_v9_RunDiffusionPhoto_v2.safetensors', 'single_files': True, 'use_safetensors': True}, 'Unstable': {'path': 'models/sdxl-unstable-diffusers-y', 'single_files': False, 'use_safetensors': False}} @@device:cuda Loading pipeline components...: 100%|█████████████| 7/7 [00:07<00:00, 1.08s/it] successsfully load paired self-attention number of the processor : 36 Running on local URL: http://0.0.0.0:7860 IMPORTANT: You are using gradio version 4.25.0, however version 4.44.1 is available, please upgrade. -------- Running on public URL: https://b19807c18312d324f4.gradio.live This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces) [Bob] A man in a black suit img [Alice] A woman in a white shirt img [Bob] At home, reading the new paper # at home, the paper says there's a treasure bank in the forest. [Bob] On the road, near the forest. [Alice] is on the phone at home # [Bob] inviting [Alice] to take risks with him. [NC] The car on the road, near the forest # they drive to the forest to find treasure. [NC] At night, a tiger appeared in the forest. [Bob] Very scared, open your mouth, in the woods, at night. [Alice] Opened his mouth in the woods at night and was very scared. [Bob] Runs fast in the woods at night. [NC] A house in the forest, at night # and suddenly they found the vault! [Bob] In a house full of treasures, smiled at night # and they looked out of the house. Loading pipeline components...: 100%|█████████████| 7/7 [00:07<00:00, 1.05s/it] Loading PhotoMaker components [1] id_encoder from [data]... Loading PhotoMaker components [2] lora_weights from [data] start_merge_step:7 ['[Bob] At home, reading the new paper ', '[Bob] On the road, near the forest.', '[Alice] is on the phone at home ', ' The car on the road, near the forest ', ' At night, a tiger appeared in the forest.', '[Bob] Very scared, open your mouth, in the woods, at night.', '[Alice] Opened his mouth in the woods at night and was very scared.', '[Bob] Runs fast in the woods at night.', ' A house in the forest, at night ', '[Bob] In a house full of treasures, smiled at night '] {'[Bob]': [0, 1, 5, 7, 9], '[Alice]': [2, 6]} {'[Bob]': ' A man in a black suit img', '[Alice]': ' A woman in a white shirt img'} {'[Bob]': [0, 1, 5, 7, 9], '[Alice]': [2, 6]} {0: ['[Bob]'], 1: ['[Bob]'], 2: ['[Alice]'], 5: ['[Bob]'], 6: ['[Alice]'], 7: ['[Bob]'], 9: ['[Bob]']} [Bob] [0, 1] [' A man in a black suit img At home, reading the new paper ', ' A man in a black suit img On the road, near the forest.'] comic a man in a black suit at home, reading the new paper. graphic illustration, comic art, graphic novel art, vibrant, highly detailed comic a man in a black suit on the road, near the forest.. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([2, 77, 2048]) torch.Size([2, 77, 2048]) torch.Size([2, 1280]) torch.Size([2, 77, 2048]) torch.Size([2, 1280]) torch.Size([2, 1280]) torch.Size([2, 4, 64, 64]) torch.Size([4, 6]) 0%| | 0/35 [00:00<?, ?it/s]/home/ma-user/anaconda3/envs/python-3.10.10/lib/python3.10/site-packages/diffusers/utils/torch_utils.py:106: UserWarning: ComplexHalf support is experimental and many operators don't support it yet. (Triggered internally at ../aten/src/ATen/EmptyTensor.cpp:31.) x_freq = fftn(x, dim=(-2, -1)) 100%|███████████████████████████████████████████| 35/35 [00:36<00:00, 1.03s/it] [<PIL.Image.Image image mode=RGB size=512x512 at 0x7F77AAFEF2E0>, <PIL.Image.Image image mode=RGB size=512x512 at 0x7F77AAFEF880>] 0 1 [Alice] [2, 6] [' A woman in a white shirt img is on the phone at home ', ' A woman in a white shirt img Opened his mouth in the woods at night and was very scared.'] comic a woman in a white shirt is on the phone at home. graphic illustration, comic art, graphic novel art, vibrant, highly detailed comic a woman in a white shirt opened his mouth in the woods at night and was very scared.. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([2, 77, 2048]) torch.Size([2, 77, 2048]) torch.Size([2, 1280]) torch.Size([2, 77, 2048]) torch.Size([2, 1280]) torch.Size([2, 1280]) torch.Size([2, 4, 64, 64]) torch.Size([4, 6]) 100%|███████████████████████████████████████████| 35/35 [00:35<00:00, 1.02s/it] [<PIL.Image.Image image mode=RGB size=512x512 at 0x7F77AAFEDB70>, <PIL.Image.Image image mode=RGB size=512x512 at 0x7F77AAFEF760>] 2 6 [3, 4, 5, 7, 8, 9] [] The car on the road, near the forest comic the car on the road, near the forest. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:20<00:00, 1.72it/s] [] At night, a tiger appeared in the forest. comic at night, a tiger appeared in the forest.. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:20<00:00, 1.69it/s] ['[Bob]'] A man in a black suit img Very scared, open your mouth, in the woods, at night. comic a man in a black suit very scared, open your mouth, in the woods, at night.. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:21<00:00, 1.63it/s] ['[Bob]'] A man in a black suit img Runs fast in the woods at night. comic a man in a black suit runs fast in the woods at night.. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:21<00:00, 1.64it/s] [] A house in the forest, at night comic a house in the forest, at night. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:20<00:00, 1.73it/s] ['[Bob]'] A man in a black suit img In a house full of treasures, smiled at night comic a man in a black suit in a house full of treasures, smiled at night. graphic illustration, comic art, graphic novel art, vibrant, highly detailed torch.Size([1, 77, 2048]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 77, 2048]) torch.Size([1, 1280]) torch.Size([1, 1280]) torch.Size([1, 4, 64, 64]) torch.Size([2, 6]) 100%|███████████████████████████████████████████| 35/35 [00:20<00:00, 1.67it/s] 6 [[<PIL.Image.Image image mode=RGB size=532x532 at 0x7F778E0AC970>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622110>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86205E0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8623D30>]] 0 [[<PIL.Image.Image image mode=RGB size=532x532 at 0x7F778E0AC970>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622110>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86205E0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8623D30>], [<PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8621690>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86202E0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622920>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622500>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86201C0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86BBDF0>]] [[<PIL.Image.Image image mode=RGB size=532x532 at 0x7F778E0AC970>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622110>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86205E0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8623D30>], [<PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8621690>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86202E0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622920>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A8622500>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86201C0>, <PIL.Image.Image image mode=RGB size=532x532 at 0x7F77A86BBDF0>]] 1 (18, 405) 1 (18, 437) 1 (18, 405) 0 (18, 468)
暂无数据