File size: 3,159 Bytes
01814d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "816b16cd-1d62-4cd8-81e3-efc81e462b0b",
   "metadata": {},
   "source": [
    "# 下载模型代码。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b4239c56-f8e7-4fca-8624-15f1c89e5a23",
   "metadata": {},
   "source": [
    "# 下载模型,直接把模型下载地址粘贴进去\n",
    "# 支持的模型下载站:liblib.ai, tusiart.com, Huggingface镜像站\n",
    "# 不支持的:Civitai,\n",
    "## HUggingface镜像站:huggingface.sukaka.top\n",
    "## 必须先把SD停下来再执行代码!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4ff5f047-49a6-4f2f-800f-622fe57f1f94",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/root/xlab-app-center/stable-diffusion-webui/models/Stable-diffusion\n",
      "开始下载模型:[二次元]Cuteyukimix-kemiaomiao.safetensors\n",
      " *** Download Progress Summary as of Tue Mar 26 22:03:49 2024 ***              33s\u001b[0m\u001b[35m]\u001b[0m\u001b[0mmm0m\n",
      "===============================================================================\n",
      "[#cd851a 1.4GiB/2.2GiB(67%) CN:16 DL:23MiB ETA:31s]\n",
      "FILE: /root/xlab-app-center/stable-diffusion-webui/models/Stable-diffusion/[二次元]Cuteyukimix-kemiaomiao.safetensors\n",
      "-------------------------------------------------------------------------------\n",
      "\n",
      "\u001b[35m[\u001b[0m#cd851a 2.2GiB/2.2GiB\u001b[36m(99%)\u001b[0m CN:1 DL:\u001b[32m47KiB\u001b[0m\u001b[35m]\u001b[0m\u001b[0m0m\u001b[35m]\u001b[0m\u001b[0mmm"
     ]
    }
   ],
   "source": [
    "# 下载 模型\n",
    "urls = ['https://hf-mirror.com/eienmojiki/CuteYukiMix-kemiaomiao/resolve/main/CuteYukiMix-kemiaomiao.safetensors?download=true']\n",
    "\n",
    "下载目录 = '/root/xlab-app-center/stable-diffusion-webui/models/Stable-diffusion'\n",
    "\n",
    "文件名 = \"[二次元]Cuteyukimix-kemiaomiao.safetensors\"\n",
    "# SD大模型目录 :/root/xlab-app-center/stable-diffusion-webui/models/Stable-diffusion\n",
    "# Lora目录:/root/xlab-app-center/stable-diffusion-webui/models/Lora\n",
    "# VAE目录:/root/xlab-app-center/stable-diffusion-webui/models/VAE\n",
    "\n",
    "%cd {下载目录}\n",
    "for url in urls:\n",
    "    !echo '开始下载模型:{文件名}'\n",
    "    !aria2c -x 16 -s 16 -c -k 1M --console-log-level=error \"{url}\" -o \"{文件名}\"\n",
    "%cd /root/xlab-app-center"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "234a9f96-d5ff-4aaf-9944-ba376761a17f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}