InvokeAI:Stable Diffusion最好的WebUI?

今天,我想向你展示一个我所见过的最好的用于Stable Diffusion的最佳WebUI之一。

它的设置超级简单,使用起来非常直观。这是一个新的WebUI,他们超级专注,他们非常有帮助,顺便说一下,最令人惊讶的是,这是开发在Windows Mac和Linux上运行的,可适用于只有4G内存的GPU的AI图片生成应用。

我现在想告诉你设置这个是多么容易,去这个页面: https://github.com/invoke-ai/InvokeAI,你可以下载invoke AI的安装脚本,在其release页面中(https://github.com/invoke-ai/InvokeAI/releases/tag/v2.2.3)有Linux的mac和Windows的安装脚本:

下载和安装

现在,我们以Linux上的安装为例。首先,下载invokeAI-src-installer-2.2.3-linux.zip。该文件中只是包含了一个install.sh下载脚本和README.md。整个过程比较简单和傻瓜,你只需在网络顺畅的情况下,执行一次install.sh即可。默认安装下来,大概需要20多GB的磁盘空间,其中包括完整的Python、pytorch运行环境,WebUI本身的运行前后端,以及推荐的各种AI模型。

中途唯二的两次需要人工介入的是:

  1. 你需要选择一次模型的安装目录和内容的输出目录,以及一些默认配置,对应的输入会记录在home目录下的.invokeai文件
Loading Python libraries...

Welcome to InvokeAI. This script will help download the Stable Diffusion weight files
and other large models that are needed for text to image generation. At any point you may interrupt
this program and resume later.

** INITIALIZING INVOKEAI RUNTIME DIRECTORY **
Select a directory in which to install InvokeAI's models and configuration files [/home/ubuntu/invokeai]: /apps/invokeAI
Select the default directory for image outputs [/apps/invokeAI/outputs]: /apps/invokeAI/outputs

InvokeAI models and configuration files will be placed into "/apps/invokeAI" and image outputs will be placed into "/apps/invokeAI/outputs".
Accept these locations? [y] y

You may change the chosen directories at any time by editing the --root and --outdir options in "/home/ubuntu/.invokeai",
You may also change the runtime directory by setting the environment variable INVOKEAI_ROOT.

The NSFW (not safe for work) checker blurs out images that potentially contain sexual imagery.
It can be selectively enabled at run time with --nsfw_checker, and disabled with --no-nsfw_checker.
The following option will set whether the checker is enabled by default. Like other options, you can
change this setting later by editing the file /home/ubuntu/.invokeai.
Enable the NSFW checker by default? [y] n

The next choice selects the sampler to use by default. Samplers have different speed/performance
tradeoffs. If you are not sure what to select, accept the default.
Default sampler to use? (ddim, k_dpm_2_a, k_dpm_2, k_euler_a, k_euler, k_heun, k_lms, plms) [k_heun]:

The number of denoising steps affects both the speed and quality of the images generated.
Higher steps often (but not always) increases the quality of the image, but increases image
generation time. This can be changed at run time. Accept the default if you are unsure.
Default number of steps to use during generation? [20]:
Creating the initialization file at "/home/ubuntu/.invokeai".

2. 你需要在你的huggingface账户上同意相关的license协议,并提供hugging face的token,以便下载

Welcome to InvokeAI. This script will help download the Stable Diffusion weight files
and other large models that are needed for text to image generation. At any point you may interrupt
this program and resume later.

** DOWNLOADING DIFFUSION WEIGHTS **
You can download and configure the weights files manually or let this
script do it for you. Manual installation is described at:

https://github.com/invoke-ai/InvokeAI/blob/main/docs/installation/INSTALLING_MODELS.md

You may download the recommended models (about 10GB total), select a customized set, or
completely skip this step.

Download <r>ecommended models, <a>ll models, <c>ustomized list, or <s>kip this step? [r]: 
** LICENSE AGREEMENT FOR WEIGHT FILES **

To download the Stable Diffusion weight files from the official Hugging Face 
repository, you need to read and accept the CreativeML Responsible AI license.

This involves a few easy steps.

1. If you have not already done so, create an account on Hugging Face's web site
   using the "Sign Up" button:

   https://huggingface.co/join

   You will need to verify your email address as part of the HuggingFace
   registration process.

2. Log into your Hugging Face account:

    https://huggingface.co/login

3. Accept the license terms located here:

   https://huggingface.co/runwayml/stable-diffusion-v1-5

   and here:

   https://huggingface.co/runwayml/stable-diffusion-inpainting

    (Yes, you have to accept two slightly different license agreements)

Press <enter> when you are ready to continue:
(Fetching Hugging Face token from cache...not found

4. Thank you! The last step is to enter your HuggingFace access token so that
   this script is authorized to initiate the download. Go to the access tokens
   page of your Hugging Face account and create a token by clicking the 
   "New token" button:

   https://huggingface.co/settings/tokens

   (You can enter anything you like in the token creation field marked "Name". 
   "Role" should be "read").

   Now copy the token to your clipboard and paste it at the prompt. Windows
   users can paste with right-click.
   Token: 
Password: *************************************

** DOWNLOADING WEIGHTS **
* v1-5-pruned-emaonly.ckpt: Downloading...

这里建议的方式是在AWS或GCP上临时购置一台主机,因为按照默认配置,整个软件安装需要下来的软件非常多,很多都是需要从github和huggingface上直接下载的,而国内云厂商的网络的下行流量普遍偏慢,而上行带宽却是足够的。

需要注意的是,如果我们采用国外打包上传的方式,需要打包的目录包括

  • invokeAI的安装目录
  • home目录下的.cache目录(主要是~/.cache/torch/hub/checkpoints/checkpoint_liberty_with_aug.pth文件,也可以自己在腾讯云上下载,稍慢些,需要几分钟)

我个人的实践是,在GCP上完成linux环境的下载,大概需要20分钟左右,打包之后,将20多GB的压缩包从GCP发送到腾讯云,也只需要30多分钟。这比在腾讯云上直接下来要快多了。

服务器选择

可能你会好奇,我为什么会选择腾讯云?主要的原因是用于AI绘画的服务器,如果想有好的体验,是必须要有足够的计算资源的。除非自己日常用的电脑足够强劲,否则在体验阶段,我建议选择云,特别是腾讯云。

因为腾讯云的免费体验馆上,有目前我能看到的最优惠的机型:

1月免费体验15天,99元体验30天。而同样的配置,我在阿里云上看,一个月最低只能打4折,还是需要2000多元。

运行体验

只需要进到你解压之后的InvokeAI的目录,执行invoke.sh即可运行:

ubuntu@VM-0-6-ubuntu:/apps/invokeAI$ ./invoke.sh 
Do you want to generate images using the
1. command-line
2. browser-based UI
3. open the developer console
Please enter 1, 2, or 3: 2

Starting the InvokeAI browser-based UI..
* Initializing, be patient...
>> Initialization file /home/ubuntu/.invokeai found. Loading...
>> InvokeAI runtime directory is "/apps/invokeAI"
>> patchmatch.patch_match: INFO - Compiling and loading c extensions from "/apps/invokeAI/src/pypatchmatch/patchmatch".
>> patchmatch.patch_match: WARNING - patchmatch failed to load or compile.
>> patchmatch.patch_match: WARNING - Refer to https://github.com/invoke-ai/InvokeAI/blob/main/docs/installation/INSTALL_PATCHMATCH.md for installation instructions.
>> Patchmatch not loaded (nonfatal)
>> GFPGAN Initialized
>> CodeFormer Initialized
>> ESRGAN Initialized
>> Using device_type cuda
>> Current VRAM usage:  0.00G
>> Scanning Model: stable-diffusion-1.5
>> Model Scanned. OK!!
>> Loading stable-diffusion-1.5 from /apps/invokeAI/models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
   | LatentDiffusion: Running in eps-prediction mode
   | DiffusionWrapper has 859.52 M params.
   | Making attention of type 'vanilla' with 512 in_channels
   | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
   | Making attention of type 'vanilla' with 512 in_channels
   | Using faster float16 precision
   | Loading VAE weights from: /apps/invokeAI/models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
>> Model loaded in 61.56s
>> Max VRAM used to load the model: 2.17G 
>> Current VRAM usage:2.17G
>> Current embedding manager terms: *
>> Setting Sampler to k_heun

* --web was specified, starting web server...
>> Initialization file /home/ubuntu/.invokeai found. Loading...
>> Started Invoke AI Web Server!
>> Default host address now 127.0.0.1 (localhost). Use --host 0.0.0.0 to bind any address.
>> Point your browser at http://127.0.0.1:9090

其运行界面如下:

特点

现在,令人惊奇的部分来了,他们在WebUI中建立了很多功能,所以我想在左边向你展示,你有一个文本到图像的模式,非常直观地使用,你有一个图像到图像的模式,也非常实用。但这些功能,如果你习惯使用了automatic 1111的stable-diffusion-webui,这部分可能不会让你觉得惊艳。

其实,让我决定尝试InvokeAI的理由,主要是它提供了一个比DreamStudio更好的画布功能,你可以在这里进行绘画,这是我见过的最好的绘画工具,所以你可以得到疯狂的好结果。

一句话总结,就是它可以在画布上对已有的作品,进行任意延展的创意设计。

比如,下面的这幅数字作品:

我可以在画布中,将其右上角扩展出一个同样风格的区域,并可以加入其他的元素:

他们还将增加一个节点模式,你可以连接不同的节点来生成你的图像,我甚至无法想象这将是多么神奇。

他们将有一个后期处理模式,所以这将是令人震惊的

他们还想在这里提供textual inversion和Dreambooth的培训:

但这些功能还得耐心等待更新

总结

随着这个市场越来越火热,社区中涌现出来越来越多的工具试图减少AI绘图的入门成本和缩短上手路径。只有当AI绘图能够真正的普惠到普罗大众,只需要基础的绘画知识和创意,而不需要机器学习的专业时,这个行业就能真正的成为一个创新的朝阳行业,而不只是一个讲故事,割韭菜,昙花一现的概念

原文地址:https://cloud.tencent.com/developer/article/2185616

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


学习编程是顺着互联网的发展潮流,是一件好事。新手如何学习编程?其实不难,不过在学习编程之前你得先了解你的目的是什么?这个很重要,因为目的决定你的发展方向、决定你的发展速度。
IT行业是什么工作做什么?IT行业的工作有:产品策划类、页面设计类、前端与移动、开发与测试、营销推广类、数据运营类、运营维护类、游戏相关类等,根据不同的分类下面有细分了不同的岗位。
女生学Java好就业吗?女生适合学Java编程吗?目前有不少女生学习Java开发,但要结合自身的情况,先了解自己适不适合去学习Java,不要盲目的选择不适合自己的Java培训班进行学习。只要肯下功夫钻研,多看、多想、多练
Can’t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock问题 1.进入mysql路径
oracle基本命令 一、登录操作 1.管理员登录 # 管理员登录 sqlplus / as sysdba 2.普通用户登录
一、背景 因为项目中需要通北京网络,所以需要连vpn,但是服务器有时候会断掉,所以写个shell脚本每五分钟去判断是否连接,于是就有下面的shell脚本。
BETWEEN 操作符选取介于两个值之间的数据范围内的值。这些值可以是数值、文本或者日期。
假如你已经使用过苹果开发者中心上架app,你肯定知道在苹果开发者中心的web界面,无法直接提交ipa文件,而是需要使用第三方工具,将ipa文件上传到构建版本,开...
下面的 SQL 语句指定了两个别名,一个是 name 列的别名,一个是 country 列的别名。**提示:**如果列名称包含空格,要求使用双引号或方括号:
在使用H5混合开发的app打包后,需要将ipa文件上传到appstore进行发布,就需要去苹果开发者中心进行发布。​
+----+--------------+---------------------------+-------+---------+
数组的声明并不是声明一个个单独的变量,比如 number0、number1、...、number99,而是声明一个数组变量,比如 numbers,然后使用 nu...
第一步:到appuploader官网下载辅助工具和iCloud驱动,使用前面创建的AppID登录。
如需删除表中的列,请使用下面的语法(请注意,某些数据库系统不允许这种在数据库表中删除列的方式):
前不久在制作win11pe,制作了一版,1.26GB,太大了,不满意,想再裁剪下,发现这次dism mount正常,commit或discard巨慢,以前都很快...
赛门铁克各个版本概览:https://knowledge.broadcom.com/external/article?legacyId=tech163829
实测Python 3.6.6用pip 21.3.1,再高就报错了,Python 3.10.7用pip 22.3.1是可以的
Broadcom Corporation (博通公司,股票代号AVGO)是全球领先的有线和无线通信半导体公司。其产品实现向家庭、 办公室和移动环境以及在这些环境...
发现个问题,server2016上安装了c4d这些版本,低版本的正常显示窗格,但红色圈出的高版本c4d打开后不显示窗格,
TAT:https://cloud.tencent.com/document/product/1340