摘要:更新保存按钮;修复 Windows 上的路径错误;添加 and 文件,方便在 Windows 和 Linux 上安装环境。感谢 lior007 和 JamesIV4。.bat.sh[2024.11.25] 新的用户界面更新:拖放图片+下载按钮:我们增强了我们的
要更新最新功能,请提取最新代码并重新安装 gradio_magicquill:
pip uninstall -y gradio_magicquill-0.0.1-py3-none-any.whlpip install gradio_magicquill-0.0.1-py3-none-any.whl运行 MagicQuill 需要 GPU。通过我们的测试,我们确认该模型可以在具有 8GB VRAM 的 GPU(RTX4070 笔记本电脑)上运行。对于 GPU 资源有限的用户,请尝试我们的 huggingface Demo 和 Modelscope Demo。此外,如果在您的机器上花费的时间太长,请考虑通过单击上面的魔杖图标来禁用 DrawNGuess 自动提示填充。
按照以下指南设置环境。
gitclone 存储库。请不要忘记 --recursive 标志。否则,您会发现 submodule 缺失。LLaVAgit clone --recursive https://github.com/magic-quill/MagicQuill.git cd MagicQuill
下载并解压缩检查点 如果无法访问 .zip 文件,请通过浏览器下载。所有检查点总共约为 25 GB。下载可能需要一些时间。或者,查看我们在 huggingface 的检查站。wget -O models.zip "https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&download=1" unzip models.zip
如果你是 Windows 用户,你可以尝试使用来方便地安装环境,只需在你的 Python shell 中输入即可。对于 Linux 用户,请选中 。windows_setup.batwindows_setup.batlinux_setup.sh
或者,按照分步安装指南进行作。
创建环境conda create -n MagicQuill python=3.10 -y conda activate MagicQuill
安装支持 GPU 的 Torchpip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
安装接口pip install gradio_magicquill-0.0.1-py3-none-any.whl
安装 Llava 环境(For Linux) cp -f pyproject.toml MagicQuill/LLaVA/ pip install -e MagicQuill/LLaVA/
或
(For Windows) copy /Y pyproject.toml MagicQuill\LLaVA\ pip install -e MagicQuill\LLaVA\
(对于 Windows PowerShell,第一行应为Copy-Item -Path pyproject.toml -Destination "MagicQuill\LLaVA" -Force)
安装剩余环境pip install -r requirements.txt
运行 MagicQuillpython gradio_run.py
如果你是大陆用户,可以尝试使用 huggingface mirror 来方便下载一些必要的 checkpoint 来运行我们的系统。export HF_ENDPOINT=https://hf-mirror.com您可以使用 MagicQuill 构建 docker 容器,如下所示:
git clone 存储库。请不要忘记 --recursive 标志。否则,您会发现 submodule 缺失。LLaVA下载并解压缩检查点如果无法访问 .zip 文件,请通过浏览器下载。所有检查点总共约为 25 GB。下载可能需要一些时间。或者,查看我们在 huggingface 的检查站。注意:这些可以位于主机上的任何位置,但 Docker Compose 默认希望它们位于 其中。如果将它们解压缩到其他位置,则更新。/data/magicquill/modelsdocker-compose.yaml构建镜像docker compose build
运行映像docker compose up -d
来源:夏琳科技论