stable-diffusion 3 体验部署流程(ComfyUI)

news2025/7/10 15:19:24

环境准备

下载及简介

git clone https://huggingface.co/stabilityai/stable-diffusion-3-medium
SD3 checkpoints:

  1. sd3_medium_incl_clips.safetensors (5.5GB)
  2. sd3_medium_incl_clips_t5xxlfp8.safetensors (10.1GB)
  3. sd3_medium.safetensors (4.3GB)

前两个可以像 ComfyUI 中的任何常规checkpoints一样使用。这两个checkpoints之间的区别在于,第一个仅包含 2 个文本编码器:CLIP-L 和 CLIP-G,第二个包含 3 个:CLIP-L、CLIP-G 和 T5XXL。第三个模型不包含文本编码器,必须单独加载它们才能使用该文件。

模型保存

把如下三个模型放在 ComfyUI/models/checkpoints/ 目录中(可以选择其中一个模型体验)

  • sd3_medium_incl_clips.safetensors
  • sd3_medium_incl_clips_t5xxlfp8.safetensors
  • sd3_medium.safetensors
文本编码器保存

从text_encoders目录下载文本编码器,选择其中的一个文件保存到ComfyUI/models/clip/目录中:

  • clip_g.safetensors
  • clip_l.safetensors
  • t5xxl_fp8_e4m3fn.safetensors
  • t5xxl_fp16.safetensors

ComfyUI 测试体验

打开comfyui 界面 导入脚本并执行:

{
  "last_node_id": 272,
  "last_link_id": 599,
  "nodes": [
    {
      "id": 11,
      "type": "TripleCLIPLoader",
      "pos": [
        -1885,
        -49
      ],
      "size": {
        "0": 315,
        "1": 106
      },
      "flags": {},
      "order": 0,
      "mode": 0,
      "outputs": [
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            5,
            94
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "TripleCLIPLoader"
      },
      "widgets_values": [
        "clip_g.safetensors",
        "clip_l.safetensors",
        "t5xxl_fp8_e4m3fn.safetensors"
      ]
    },
    {
      "id": 71,
      "type": "CLIPTextEncode",
      "pos": [
        -1869.2871546875003,
        560.071803930664
      ],
      "size": {
        "0": 380.4615783691406,
        "1": 102.07693481445312
      },
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 94
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            93,
            580
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "title": "CLIP Text Encode (Negative Prompt)",
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "bad quality, poor quality, doll, disfigured, jpg, toy, bad anatomy, missing limbs, missing fingers, 3d, cgi"
      ],
      "color": "#322",
      "bgcolor": "#533"
    },
    {
      "id": 68,
      "type": "ConditioningSetTimestepRange",
      "pos": [
        -1010,
        167
      ],
      "size": {
        "0": 317.4000244140625,
        "1": 82
      },
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 90
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            91
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "ConditioningSetTimestepRange"
      },
      "widgets_values": [
        0.1,
        1
      ]
    },
    {
      "id": 70,
      "type": "ConditioningSetTimestepRange",
      "pos": [
        -1006,
        314
      ],
      "size": {
        "0": 317.4000244140625,
        "1": 82
      },
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 93,
          "slot_index": 0
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            92
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "ConditioningSetTimestepRange"
      },
      "widgets_values": [
        0,
        0.1
      ]
    },
    {
      "id": 67,
      "type": "ConditioningZeroOut",
      "pos": [
        -1370,
        337
      ],
      "size": {
        "0": 211.60000610351562,
        "1": 26
      },
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning",
          "type": "CONDITIONING",
          "link": 580
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            90
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "ConditioningZeroOut"
      }
    },
    {
      "id": 266,
      "type": "Note",
      "pos": [
        -2352,
        576
      ],
      "size": {
        "0": 308.061279296875,
        "1": 102.86902618408203
      },
      "flags": {},
      "order": 1,
      "mode": 0,
      "properties": {
        "text": ""
      },
      "widgets_values": [
        "Resolution should be around 1 megapixel and width/height must be multiple of 64"
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 13,
      "type": "ModelSamplingSD3",
      "pos": [
        -974,
        -220
      ],
      "size": {
        "0": 315,
        "1": 58
      },
      "flags": {
        "collapsed": false
      },
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 565
        }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            591
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "ModelSamplingSD3"
      },
      "widgets_values": [
        3
      ]
    },
    {
      "id": 69,
      "type": "ConditioningCombine",
      "pos": [
        -662,
        165
      ],
      "size": {
        "0": 228.39999389648438,
        "1": 46
      },
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "conditioning_1",
          "type": "CONDITIONING",
          "link": 91
        },
        {
          "name": "conditioning_2",
          "type": "CONDITIONING",
          "link": 92
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            592
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "ConditioningCombine"
      }
    },
    {
      "id": 233,
      "type": "PreviewImage",
      "pos": [
        535.1143750722272,
        -147.92548481673106
      ],
      "size": {
        "0": 604.7489624023438,
        "1": 592.15576171875
      },
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 599
        }
      ],
      "properties": {
        "Node name for S&R": "PreviewImage"
      }
    },
    {
      "id": 231,
      "type": "VAEDecode",
      "pos": [
        141,
        -177
      ],
      "size": {
        "0": 210,
        "1": 46
      },
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 596
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 557
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            599
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "VAEDecode"
      }
    },
    {
      "id": 252,
      "type": "CheckpointLoaderSimple",
      "pos": [
        -2314,
        -203
      ],
      "size": {
        "0": 746.7357788085938,
        "1": 98
      },
      "flags": {},
      "order": 2,
      "mode": 0,
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            565
          ],
          "shape": 3,
          "slot_index": 0
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [],
          "shape": 3,
          "slot_index": 1
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            557
          ],
          "shape": 3,
          "slot_index": 2
        }
      ],
      "properties": {
        "Node name for S&R": "CheckpointLoaderSimple"
      },
      "widgets_values": [
        "sdv3/2b_1024/sd3_medium.safetensors"
      ]
    },
    {
      "id": 271,
      "type": "KSampler",
      "pos": [
        -269,
        -179
      ],
      "size": {
        "0": 315,
        "1": 446
      },
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 591
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 595
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 592
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 593
        },
        {
          "name": "seed",
          "type": "INT",
          "link": 597,
          "widget": {
            "name": "seed"
          },
          "slot_index": 4
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            596
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        945512652412924,
        "fixed",
        28,
        4.5,
        "dpmpp_2m",
        "sgm_uniform",
        1
      ]
    },
    {
      "id": 135,
      "type": "EmptySD3LatentImage",
      "pos": [
        -2352,
        438
      ],
      "size": {
        "0": 315,
        "1": 106
      },
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            593
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "EmptySD3LatentImage"
      },
      "widgets_values": [
        1024,
        1024,
        1
      ]
    },
    {
      "id": 6,
      "type": "CLIPTextEncode",
      "pos": [
        -1876.2871546875003,
        284.0718039306641
      ],
      "size": {
        "0": 389.06927490234375,
        "1": 207.84902954101562
      },
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 5
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            595
          ],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "a female character with long, flowing hair that appears to be made of ethereal, swirling patterns resembling the Northern Lights or Aurora Borealis. The background is dominated by deep blues and purples, creating a mysterious and dramatic atmosphere. The character's face is serene, with pale skin and striking features. She wears a dark-colored outfit with subtle patterns. The overall style of the artwork is reminiscent of fantasy or supernatural genres"
      ],
      "color": "#232",
      "bgcolor": "#353"
    },
    {
      "id": 272,
      "type": "PrimitiveNode",
      "pos": [
        -2342,
        278
      ],
      "size": {
        "0": 210,
        "1": 82
      },
      "flags": {},
      "order": 4,
      "mode": 0,
      "outputs": [
        {
          "name": "INT",
          "type": "INT",
          "links": [
            597
          ],
          "slot_index": 0,
          "widget": {
            "name": "seed"
          }
        }
      ],
      "title": "Seed",
      "properties": {
        "Run widget replace on values": false
      },
      "widgets_values": [
        945512652412924,
        "fixed"
      ]
    }
  ],
  "links": [
    [
      5,
      11,
      0,
      6,
      0,
      "CLIP"
    ],
    [
      90,
      67,
      0,
      68,
      0,
      "CONDITIONING"
    ],
    [
      91,
      68,
      0,
      69,
      0,
      "CONDITIONING"
    ],
    [
      92,
      70,
      0,
      69,
      1,
      "CONDITIONING"
    ],
    [
      93,
      71,
      0,
      70,
      0,
      "CONDITIONING"
    ],
    [
      94,
      11,
      0,
      71,
      0,
      "CLIP"
    ],
    [
      557,
      252,
      2,
      231,
      1,
      "VAE"
    ],
    [
      565,
      252,
      0,
      13,
      0,
      "MODEL"
    ],
    [
      580,
      71,
      0,
      67,
      0,
      "CONDITIONING"
    ],
    [
      591,
      13,
      0,
      271,
      0,
      "MODEL"
    ],
    [
      592,
      69,
      0,
      271,
      2,
      "CONDITIONING"
    ],
    [
      593,
      135,
      0,
      271,
      3,
      "LATENT"
    ],
    [
      595,
      6,
      0,
      271,
      1,
      "CONDITIONING"
    ],
    [
      596,
      271,
      0,
      231,
      0,
      "LATENT"
    ],
    [
      597,
      272,
      0,
      271,
      4,
      "INT"
    ],
    [
      599,
      231,
      0,
      233,
      0,
      "IMAGE"
    ]
  ],
  "groups": [
    {
      "title": "Load Models",
      "bounding": [
        -2410,
        -339,
        969,
        488
      ],
      "color": "#3f789e",
      "font_size": 24
    },
    {
      "title": "Input",
      "bounding": [
        -2409,
        181,
        972,
        523
      ],
      "color": "#3f789e",
      "font_size": 24
    },
    {
      "title": "Output",
      "bounding": [
        464,
        -273,
        741,
        814
      ],
      "color": "#3f789e",
      "font_size": 24
    }
  ],
  "config": {},
  "extra": {},
  "version": 0.4
}

测试结果展示
image.png
image.png
image.png
image.png
image.png
image.png


【Qinghub Studio 】更适合开发人员的低代码开源开发平台
QingHub企业级应用统一部署
QingHub企业级应用开发管理
QingHub演示
https://qingplus.cn

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1822273.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

RK3568笔记三十二:PaddleSeg训练部署

一、环境 1、Autodl配置 PyTorch 1.7.0Python 3.8(ubuntu18.04)Cuda 11.02、所需环境需求 - OS: 64-bit - Python 3(3.6/3.7/3.8/3.9/3.10),64-bit version - pip/pip3(9.0.1),64-bit version - CUDA > 10.2 - cuDNN > 7.6 - PaddlePaddle (the…

qmt量化交易策略小白学习笔记第28期【qmt编程之获取财务数据列表--十大股东和股东数】

qmt编程之获取财务数据 qmt更加详细的教程方法,会持续慢慢梳理。 也可找寻博主的历史文章,搜索关键词查看解决方案 ! 感谢关注,咨询免费开通量化回测与获取实盘权限,欢迎和博主联系! 十大股东/十大流通…

数据结构-稀疏数组

稀疏数组是一种特殊的数据结构,主要用于存储那些大部分元素为零或者未使用的大型数组。以下是关于稀疏数组的详细知识点,按照分点表示和归纳的方式整理: 一、定义 稀疏数组是指那些大部分内容值为空(通常为0)的数组。…

【Spring6】13-19章 JdbcTemplate+代理模式+AOP+Spring事务+Spring集成MyBatis

十三、JdbcTemplate JdbcTemplate是Spring提供的一个JDBC模板类,是对JDBC的封装,简化JDBC代码。 当然,你也可以不用,可以让Spring集成其它的ORM框架,例如:MyBatis、Hibernate等。 接下来我们简单来学习一下…

【网络编程】TCP原理

TCP套接字中的I/O缓冲 write函数调用后并非立即传输数据,read函数调用后也非马上接收数据。write函数调用瞬间,数据将移至输出缓冲;read函数调用瞬间,从缓冲读取数据。 这些IO缓冲特性可整理如下。 口IO缓冲在每个TCP套接字中单…

人工智能发展历程和工具搭建学习

目录 人工智能的三次浪潮 开发环境介绍 Anaconda Anaconda的下载和安装 下载说明 安装指导 模块介绍 使用Anaconda Navigator Home界面介绍 Environment界面介绍 使用Jupter Notebook 打开Jupter Notebook 配置默认目录 新建文件 两种输入模式 Conda 虚拟环境 添…

C#开发-集合使用和技巧(一)常用集合和方法介绍

C#开发-集合使用和技巧 &#xff08;一&#xff09;常用集合和方法介绍常用集合和方法介绍 C#开发-集合使用和技巧1. 集合基础集合介绍集合跟数组对比 2.我们常用的集合类型列表List<T>键值对集合Dictionary<TKey,TValue>队列Queue<T>其他一些集合类型堆栈St…

04-让LLM理解知识 -Prompt

1 Prompt Prompt 可理解为用于指导AI模型生成特定类型、主题或格式内容的文本。在NLP中&#xff0c;Prompt 通常由一个问题或任务描述组成&#xff0c;例如“给我写一篇有关RAG的文章”&#xff0c;这句话就是Prompt。 Prompt赋予了LLM小样本甚至零样本学习的能力。 大模型的…

07 SpringBoot 配置绑定

所谓“配置绑定”就是把配置文件中的值与 JavaBean 中对应的属性进行绑定。通常&#xff0c;我们会把一些配置信息&#xff08;例如&#xff0c;数据库配置&#xff09;放在配置文件中&#xff0c;然后通过 Java 代码去读取该配置文件&#xff0c;并且把配置文件中指定的配置封…

TF-IDF算法:从文本中发现价值的黄金法则

TF-IDF算法 一、简介二、TF-IDF算法原理2.1 词频&#xff08;TF&#xff09;2.2 逆文档频率&#xff08;IDF&#xff09;2.3 TF-IDF的计算 三、TF-IDF算法应用3.1 搜索引擎3.2 文本分类3.3 信息提取3.4 文本摘要 四、TF-IDF算法的改进4.1、TF-IDF算法的改进4.1.1. 基于词的权重…

DC12V升压24V/5A电流 布控球产品应用 升压恒压SL4010耐压40V芯片

随着科技的不断发展&#xff0c;布控球作为一种高效、精准的安全监控设备&#xff0c;被广泛应用于公安、消防、交通等多个领域。然而&#xff0c;布控球在工作过程中需要稳定的电源供应&#xff0c;以保证其正常运行和长期稳定性。因此&#xff0c;一款性能优良的升压恒压芯片…

百度地图3.0截图,下载(解决图形下载偏移的问题)

百度地图应用3.0开发的页面&#xff0c;需要截图并下载的功能。前端采用html2canvas生成base64图片 由于百度地图绘制多边形是svg&#xff0c;而html2canvas不支持生成。不绘制线的截图是正常的&#xff0c;绘制了线条就会出现偏移。以下是对比&#xff0c;上一张是正常的&…

深入解析B树:数据结构、存储结构与算法优势

一、引言 在计算机科学中&#xff0c;数据结构和算法是核心内容。它们的选择和应用直接影响程序的效率和性能。B树&#xff08;B-Tree&#xff09;作为一种自平衡的多叉树数据结构&#xff0c;广泛应用于数据库和文件系统中。本文将详细介绍B树的数据结构模型、存储结构&#…

ssm创意商城-计算机毕业设计源码03663

摘要 科技进步的飞速发展引起人们日常生活的巨大变化&#xff0c;电子信息技术的飞速发展使得电子信息技术的各个领域的应用水平得到普及和应用。信息时代的到来已成为不可阻挡的时尚潮流&#xff0c;人类发展的历史正进入一个新时代。在现实运用中&#xff0c;应用软件的工作规…

JavaScript快速入门系列-2(JavaScript语言基础)

第二章&#xff1a;JavaScript语言基础 2.1 变量声明&#xff1a;let, const, var2.1.1 变量是什么&#xff1f;2.1.2 var2.1.3 let与const2.1.4 选择哪个关键字&#xff1f; 2.2 数据类型2.2.1 基本数据类型2.2.2 复杂数据类型2.2.3 示例与类型检测 2.3 运算符2.3.1 算术运算符…

C++基础知识(八:STL标准库 Map和multimap )

Map C 标准模板库&#xff08;STL&#xff09;中的 map 容器是一种非常有用的关联容器&#xff0c;用于存储键值对&#xff08;key-value pairs&#xff09;。在 map 中&#xff0c;每个元素都由一个键和一个值组成&#xff0c;其中键是唯一的&#xff0c;而值则可以重复。 基…

来自IEEE编委的发文建议及最佳实践

1.注意关键词(会涉及是否能找到合适的评审人) 2. Intro部分 contribution 通常3-4点 3. 注意文章中的符号使用前后统一 4.需要分析最终的结果(对之后的研究有什么帮助) 5.结论的部分 切忌虎头蛇尾,需要分析优点和缺点 建议未来的研究方向 6.参考文献

2001-2023年上市公司数字化转型测算数据(含原始数据+处理代码+计算结果)

2001-2023年上市公司数字化转型测算数据&#xff08;含原始数据处理代码计算结果&#xff09;&#xff08;吴非&#xff09; 1、时间&#xff1a;2001-2023年 2、来源&#xff1a;上市公司年报 3、指标:行业代码、行业名称、证券简称、是否发生ST或ST或PT、是否发生暂停上市…

max code size exceeded

Warning! Error encountered during contract execution [max code size exceeded] 智能合约编译时提示 contracts/core/CORE.sol:15:1: Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on m…

自研一套带双向认证的Android通用网络库

当前&#xff0c;许多网络库基于Retrofit或OkHttp开发&#xff0c;但实际项目中常需要定制化&#xff0c;并且需要添加类似双向认证等安全功能。这意味着每个项目都可能需要二次开发。那么&#xff0c;有没有一种通用的封装方式&#xff0c;可以满足大多数项目需求&#xff1f;…