当前位置: 首页 > news >正文

<AI 学习> 下载 Stable Diffusions via Windows OS

注意:

不能使用 网络路径

不再支持 HTTPS 登录,需要 Token

1.  获得合法的授权 

Stability AI License — Stability AI

上面的链接打开,去申请 许可

2. 拥有 HuggingFace 账号

注册:https://huggingface.co/

3. 配置 Token

这里,我是创建了一个 HFT 名字的 Token ,并复制了 token 值。 

4. 安装 git 工具

  • 访问 Git 官方网站 Git。https://git-scm.com/
  • 点击 Download for Windows 按钮,下载适用于 Windows 的 Git 安装程序。

安装并初始化 Git LFS(Large File Storage)Git LFS 是一种 Git 扩展,专门用于管理和存储大型文件。

# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install

5. 配置 git 环境

C:\Users\dave\AI>git init

要用本地目录,不能是 nas 路径, map 也不行。会报错,如下: 可以加最后一行解决,但我的NAS 升级要重启,略过。使用本地目录。

Z:\AI>git remote set-url origin git@hf.com:DaveNian/stabilityai/stable-diffusion-3.5-large
fatal: detected dubious ownership in repository at '//davens/Multimedia/AI'
'//davens/Multimedia/AI' is owned by:(inconvertible) (S-1-5-21-711006005-3025803127-3149259277-1000)
but the current user is:DAVE-LAPTOP/cnjia (S-1-5-21-3662014829-1418797846-1562798262-1001)
To add an exception for this directory, call:git config --global --add safe.directory '%(prefix)///davens/Multimedia/AI'

6. 连接 HuggingFace /Token 

C:\Users\dave\AI>huggingface-cli login_|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|_|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|_|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|_|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|_|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|To log in, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .
Token can be pasted using 'Right-Click'.
Enter your token (input will not be visible):
Add token as git credential? (Y/n) y
Token is valid (permission: fineGrained).
The token `HFT` has been saved to C:\Users\dave\.cache\huggingface\stored_tokens
Your token has been saved in your configured git credential helpers (manager).
Your token has been saved to C:\Users\dave\.cache\huggingface\token
Login successful.
The current active token is: `HFT`

7. 下载 stabilityai/stable-diffusion-3.5-large

选右上角的 Clone Respository

每次下载,复制 HTTPS 第二段,贴到 CMD 运行:

C:\Users\dave\AI>git clone https://huggingface.co/stabilityai/stable-diffusion-3.5-large
Cloning into 'stable-diffusion-3.5-large'...
remote: Enumerating objects: 56, done.
remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56 (from 1)
Unpacking objects: 100% (56/56), 1.36 MiB | 2.81 MiB/s, done.
Updating files: 100% (45/45), done.
Filtering content: 100% (18/18), 14.66 GiB | 1.62 MiB/s, done.

不用一个个文件下载,大概用了 3-4 小时,目录size: 121GB,之间还下载了一些 Adapters ,如:

QNAP 通过 opkg 安装的 git 工具有问题,不支持 lfs,在验证身份时,还是 anonymous 折腾半小时没搞定,赶上 NAS FW升级,改用 Windows 下载。 不知道用 gcc make 来编译 git 能不能行得通。

更新1:并加了一些注示在4. 

更新2: 

下载了 https://github.com/git-lfs/git-lfs/releases amd64 版本,gunzip, tar xvf, ./install.sh, git lfs install, git 工具解决。 

http://www.lryc.cn/news/485985.html

相关文章:

  • 计算机图形学在游戏开发中的应用
  • 【CubeMX-HAL库】STM32H743II——SDRAM配置所遇问题
  • mac上使用docker搭建gitlab
  • 二维数组操作
  • uniapp设置tabBar高斯模糊并设置tabBar高度占位
  • 上市公司代理成本数据大全(第一类和第二类代理成本均有)1991-2023年
  • CA-Markov模型概述及其MATLAB实现
  • 《生成式 AI》课程 第3講 CODE TASK执行文章摘要的机器人
  • HCIP-HarmonyOS Application Developer 习题(二十二)
  • c++原型模式(Prototype Pattern)
  • 联通大数据面试题及参考答案
  • MySQL数据库:SQL语言入门 【3】(学习笔记)
  • uniapp 实现tabbar分类导航及滚动联动效果
  • 华为数字化转型的本质为何是管理变革
  • 【数据库】深入解析慢 SQL 的识别与优化策略
  • Linux从入门到精通
  • 代码随想录算法训练营第四十四天|Day44 动态规划
  • C++初阶——优先队列
  • 10月月报 | Apache DolphinScheduler进展总结
  • WSL--无需安装虚拟机和docker可以直接在Windows操作系统上使用Linux操作系统
  • 《AI 之影》
  • QT5.14*解决QSslSocket::connectToHostEncrypted: TLS initialization faile
  • 高效分支管理规范
  • 跟我学C++中级篇——RAII
  • C语言第九周课——经典算法
  • 【Pikachu】XML外部实体注入实战
  • vue2项目中在线预览csv文件
  • 基于VUE实现语音通话:边录边转发送语言消息、 播放pcm 音频
  • PMP--一、二、三模、冲刺--分类--变更--技巧--特点
  • CSS Grid 布局实战:从入门到精通