代码:https://github.com/lllyasviel/Fooocus
windows一键启动包下载:https://github.com/lllyasviel/Fooocus/releases/download/release/Fooocus_win64_2-1-831.7z
B站视频教程:AI绘画入门神器:Fooocus | 简化SD流程,专注于创意本身,一个免费随身的MidJourney工作室!

Fooocus是什么,为什么要使用?

  1. Fooocus 是一款对标**Midjourney**,并结合Stable diffusion核心功能,图像生成软件(基于 Gradio)。(开源可本地部署).
  2. 内置了很多质量优化方法、题词模板,只需简短题词(甚至1-2个单词)就可以生成高质量的图片
  3. Fooocus简化了安装(下载解压后即可运行)。在按“下载”和生成第一张图像之间,所需的鼠标点击次数严格限制在 3 次以内。最低 GPU 内存要求是 4GB (Nvidia)。
  4. 内置了动漫、真人、通用3个sd_xl相关的模型

下载与安装

建议20系以上的显卡

确定自己机器是否合适?

一般只要4G显存,但是10系需要8G

启动

解压后(自动下载模型,或者手动下载放到Fooocus\models\checkpoints下),

运行脚本

运行run.bat(调用的是通用模型)
run_anime.bat (动漫比较好)
run_realistic.bat (生成真人比较好)

对标midjouney的操作 (Fooocus的功能 )

左侧是对应midjourney相关,

MidjourneyFooocus
High-quality text-to-image without needing much prompt engineering or parameter tuning.
(未开源方法)
高质量的文本到图像,而不需要太多的提示工程或参数调整
(Fooocus有一个基于GPT-2的离线提示处理引擎和许多采样改进,因此无论你的提示是短到“花园里的房子”还是长到1000字,结果总是很漂亮
V1 V2 V3 V4 (表示Img2Img创建所选网格图像的细微变化。创建变体会生成与所选图像的整体风格和构图相似的新图像网格。)Input Image -> Upscale or Variation -> Vary (Subtle) / Vary (Strong)
U1 U2 U3 U4 (超分)Input Image -> Upscale or Variation -> Upscale (1.5x) / Upscale (2x)
Inpaint / Up / Down / Left / Right (Pan)Input Image -> Inpaint or Outpaint -> Inpaint / Up / Down / Left / Right
(Fooocus uses its own inpaint algorithm and inpaint models so that results are more satisfying than all other software that uses standard SDXL inpaint method/model)
Image PromptInput Image -> Image Prompt
(Fooocus使用自己的图像提示算法,因此与使用标准SDXL方法(如标准IP适配器或修订版)的所有其他软件相比,结果质量和即时理解更令人满意)
–styleAdvanced -> Style
–stylizeAdvanced -> Advanced -> Guidance
–nijiMultiple launchers: “run.bat”, “run_anime.bat”, and “run_realistic.bat”.
Fooocus support SDXL models on Civitai
(You can google search “Civitai” if you do not know about it)
–qualityAdvanced -> Quality
–repeatAdvanced -> Image Number
Multi Prompts (:Just use multiple lines of prompts
Prompt WeightsYou can use ” I am (happy:1.5)”.
Fooocus uses A1111’s reweighting algorithm so that results are better than ComfyUI if users directly copy prompts from Civitai. (Because if prompts are written in ComfyUI’s reweighting, users are less likely to copy prompt texts as they prefer dragging files)
To use embedding, you can use “(embedding:file_name:1.1)”
–noAdvanced -> Negative Prompt
–arAdvanced -> Aspect Ratios
InsightFaceInput Image -> Image Prompt -> Advanced -> FaceSwap
DescribeInput Image -> Describe

We also have a few things borrowed from the best parts of LeonardoAI:

LeonardoAIFooocus
Prompt MagicAdvanced -> Style -> Fooocus V2
Advanced Sampler Parameters (like Contrast/Sharpness/etc)Advanced -> Advanced -> Sampling Sharpness / etc
User-friendly ControlNetsInput Image -> Image Prompt -> Advanced

Fooocus also developed many “fooocus-only” features for advanced users to get perfect results. Click here to browse the advanced features.

配置

初始界面: 直接输入题词可以

基本生成 (测试题词 都只有 “a cat”)

选择配置 、选择风格,默认写实与增强

题词自动增强(仅做展示 无需操作 点击 history info能查看)

内置了风格 (除了默认风格3个同时勾选,其他风格1次只勾选1个)

风格化生成实测(水墨风)


生成过程

相似图片生成/超分

可以将生成图片拖入 input_image 功能,然后超分

附录

闲话:纪念创作2048天、第100篇日志

开始写博客的动机:大概是在知乎看到一个问题,25岁做什么,5年后一定会受益匪浅
当时突然看到一个回答,大概意思就是5年时间,如果你只坚持做一件事,一定能成为某方面的专家,然后99%的问题都能解决
于是我定下了目标,每个月坚持写一篇博客,虽然刚开始,很多都是一个月的最后2天写的,但是因为要求低(随便写),就坚持下来了。