stable-diffusion-aws-extension/en/user-guide/ComfyUI/inference/index.html

1716 lines
44 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://awslabs.github.io/stable-diffusion-aws-extension/user-guide/ComfyUI/inference/">
<link rel="prev" href="../../webUI/extensions-guide/">
<link rel="next" href="../../../developer-guide/source/">
<link rel="icon" href="https://s3.cn-north-1.amazonaws.com.cn/aws-assets-prod/libra-css/images/site/fav/favicon.ico">
<meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.30">
<title>ComfyUI guide - Extension for Stable Diffusion on AWS</title>
<link rel="stylesheet" href="../../../assets/stylesheets/main.3cba04c6.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#image-or-video-generation-through-comfyui-in-the-cloud" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="Extension for Stable Diffusion on AWS" class="md-header__button md-logo" aria-label="Extension for Stable Diffusion on AWS" data-md-component="logo">
<img src="https://s3.cn-north-1.amazonaws.com.cn/aws-assets-prod/libra-css/images/site/fav/favicon.ico" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Extension for Stable Diffusion on AWS
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
ComfyUI guide
</span>
</div>
</div>
</div>
<script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']"),palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent"));for([key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<div class="md-header__option">
<div class="md-select">
<button class="md-header__button md-icon" aria-label="Select language">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04M18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12m-2.62 7 1.62-4.33L19.12 17h-3.24Z"/></svg>
</button>
<div class="md-select__inner">
<ul class="md-select__list">
<li class="md-select__item">
<a href="/stable-diffusion-aws-extension/en/" hreflang="en" class="md-select__link">
English
</a>
</li>
<li class="md-select__item">
<a href="/stable-diffusion-aws-extension/zh/" hreflang="zh" class="md-select__link">
简体中文
</a>
</li>
<li class="md-select__item">
<a href="/stable-diffusion-aws-extension/ja/" hreflang="ja" class="md-select__link">
日本語
</a>
</li>
</ul>
</div>
</div>
</div>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/awslabs/stable-diffusion-aws-extension" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
awslabs/stable-diffusion-aws-extension
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
<div class="md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item md-tabs__item--active">
<a href="../../.." class="md-tabs__link">
Implementation Guide
</a>
</li>
</ul>
</div>
</nav>
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="Extension for Stable Diffusion on AWS" class="md-nav__button md-logo" aria-label="Extension for Stable Diffusion on AWS" data-md-component="logo">
<img src="https://s3.cn-north-1.amazonaws.com.cn/aws-assets-prod/libra-css/images/site/fav/favicon.ico" alt="logo">
</a>
Extension for Stable Diffusion on AWS
</label>
<div class="md-nav__source">
<a href="https://github.com/awslabs/stable-diffusion-aws-extension" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
</div>
<div class="md-source__repository">
awslabs/stable-diffusion-aws-extension
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" checked>
<label class="md-nav__link" for="__nav_1" id="__nav_1_label" tabindex="">
<span class="md-ellipsis">
Implementation Guide
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_1_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_1">
<span class="md-nav__icon md-icon"></span>
Implementation Guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_1" >
<label class="md-nav__link" for="__nav_1_1" id="__nav_1_1_label" tabindex="0">
<span class="md-ellipsis">
Solution Overview
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_1">
<span class="md-nav__icon md-icon"></span>
Solution Overview
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../solution-overview/features-and-benefits/" class="md-nav__link">
<span class="md-ellipsis">
Features and benefits
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../cost/" class="md-nav__link">
<span class="md-ellipsis">
Cost
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_3" >
<label class="md-nav__link" for="__nav_1_3" id="__nav_1_3_label" tabindex="0">
<span class="md-ellipsis">
Architecture Overview
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_3">
<span class="md-nav__icon md-icon"></span>
Architecture Overview
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../architecture-overview/architecture/" class="md-nav__link">
<span class="md-ellipsis">
Architecture diagram
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../architecture-overview/architecture-details/" class="md-nav__link">
<span class="md-ellipsis">
Architecture details
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_4" >
<label class="md-nav__link" for="__nav_1_4" id="__nav_1_4_label" tabindex="0">
<span class="md-ellipsis">
Plan your deployment
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_4">
<span class="md-nav__icon md-icon"></span>
Plan your deployment
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../plan-deployment/security/" class="md-nav__link">
<span class="md-ellipsis">
Security
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../plan-deployment/regions/" class="md-nav__link">
<span class="md-ellipsis">
Supported regions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../plan-deployment/quotas/" class="md-nav__link">
<span class="md-ellipsis">
Quotas
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_5" >
<label class="md-nav__link" for="__nav_1_5" id="__nav_1_5_label" tabindex="0">
<span class="md-ellipsis">
Deploy the solution
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_5">
<span class="md-nav__icon md-icon"></span>
Deploy the solution
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../deployment/permissions/" class="md-nav__link">
<span class="md-ellipsis">
Permissions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../deployment/template/" class="md-nav__link">
<span class="md-ellipsis">
AWS CloudFormation template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../deployment/deployment/" class="md-nav__link">
<span class="md-ellipsis">
Deploy for SD webUI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../deployment/deployment_comfyui/" class="md-nav__link">
<span class="md-ellipsis">
Deploy for ComfyUI
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../deployment/deployment_for_existing_users/" class="md-nav__link">
<span class="md-ellipsis">
Update SD webUI
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../uninstall/" class="md-nav__link">
<span class="md-ellipsis">
Uninstall the solution
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_7" checked>
<label class="md-nav__link" for="__nav_1_7" id="__nav_1_7_label" tabindex="0">
<span class="md-ellipsis">
Use the solution
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_7_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_1_7">
<span class="md-nav__icon md-icon"></span>
Use the solution
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../training-guide/" class="md-nav__link">
<span class="md-ellipsis">
Kohya Training guide
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_7_2" >
<label class="md-nav__link" for="__nav_1_7_2" id="__nav_1_7_2_label" tabindex="0">
<span class="md-ellipsis">
SD webUI guide
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_1_7_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_7_2">
<span class="md-nav__icon md-icon"></span>
SD webUI guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../webUI/multi-user/" class="md-nav__link">
<span class="md-ellipsis">
Configure API and Users Management
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../webUI/CloudAssetsManage/" class="md-nav__link">
<span class="md-ellipsis">
Cloud Assets Management
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../webUI/txt2img-guide/" class="md-nav__link">
<span class="md-ellipsis">
txt2img guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../webUI/img2img-guide/" class="md-nav__link">
<span class="md-ellipsis">
img2img guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../webUI/controlnet-guide/" class="md-nav__link">
<span class="md-ellipsis">
controlNet guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../webUI/extensions-guide/" class="md-nav__link">
<span class="md-ellipsis">
Other Extensions guide
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
ComfyUI guide
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
ComfyUI guide
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#step-1-connect-to-the-ec2-that-deploys-comfyui-frontend" class="md-nav__link">
<span class="md-ellipsis">
Step 1: Connect to the EC2 that deploys ComfyUI frontend
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-2-debug-the-workflow" class="md-nav__link">
<span class="md-ellipsis">
Step 2: Debug the workflow
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-3-repeat-step-2-as-needed-to-publish-multiple-templates" class="md-nav__link">
<span class="md-ellipsis">
Step 3: Repeat Step 2 as needed to publish multiple templates
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-4-deploy-new-inference-endpoint-for-future-inference-of-released-template" class="md-nav__link">
<span class="md-ellipsis">
Step 4: Deploy new inference endpoint for future inference of released template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-5-inference-of-released-template" class="md-nav__link">
<span class="md-ellipsis">
Step 5: Inference of released template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#manage-models" class="md-nav__link">
<span class="md-ellipsis">
Manage model(s)
</span>
</a>
<nav class="md-nav" aria-label="Manage model(s)">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#upload-model" class="md-nav__link">
<span class="md-ellipsis">
Upload model
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_8" >
<label class="md-nav__link" for="__nav_1_8" id="__nav_1_8_label" tabindex="0">
<span class="md-ellipsis">
Developer guide
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_8_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_1_8">
<span class="md-nav__icon md-icon"></span>
Developer guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../developer-guide/source/" class="md-nav__link">
<span class="md-ellipsis">
Source code
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/access/" class="md-nav__link">
<span class="md-ellipsis">
API Access Restriction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/api_upload_ckpt/" class="md-nav__link">
<span class="md-ellipsis">
API Upload Checkpoint Process
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/api_inference_process/" class="md-nav__link">
<span class="md-ellipsis">
API Inference Process
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/api_debugger/" class="md-nav__link">
<span class="md-ellipsis">
API Inference Debugger
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/api_authentication/" class="md-nav__link">
<span class="md-ellipsis">
API Authentication
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/api/" class="md-nav__link">
<span class="md-ellipsis">
API Details
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../developer-guide/byoc/" class="md-nav__link">
<span class="md-ellipsis">
Custom Container
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../../troubleshooting/" class="md-nav__link">
<span class="md-ellipsis">
Troubleshooting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../faq/" class="md-nav__link">
<span class="md-ellipsis">
FAQ
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../revisions/" class="md-nav__link">
<span class="md-ellipsis">
Revisions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../notices/" class="md-nav__link">
<span class="md-ellipsis">
Notices
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#step-1-connect-to-the-ec2-that-deploys-comfyui-frontend" class="md-nav__link">
<span class="md-ellipsis">
Step 1: Connect to the EC2 that deploys ComfyUI frontend
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-2-debug-the-workflow" class="md-nav__link">
<span class="md-ellipsis">
Step 2: Debug the workflow
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-3-repeat-step-2-as-needed-to-publish-multiple-templates" class="md-nav__link">
<span class="md-ellipsis">
Step 3: Repeat Step 2 as needed to publish multiple templates
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-4-deploy-new-inference-endpoint-for-future-inference-of-released-template" class="md-nav__link">
<span class="md-ellipsis">
Step 4: Deploy new inference endpoint for future inference of released template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#step-5-inference-of-released-template" class="md-nav__link">
<span class="md-ellipsis">
Step 5: Inference of released template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#manage-models" class="md-nav__link">
<span class="md-ellipsis">
Manage model(s)
</span>
</a>
<nav class="md-nav" aria-label="Manage model(s)">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#upload-model" class="md-nav__link">
<span class="md-ellipsis">
Upload model
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="image-or-video-generation-through-comfyui-in-the-cloud">Image or Video generation through ComfyUI in the cloud</h1>
<p>After successfully deploying the solution, you can open the native <strong>ComfyUI</strong> page provided by the deployed stack. The summary steps for workflow debugging, releasing, and inference are as follows:</p>
<ul>
<li>Step 1: Connect to the EC2 that deploys ComfyUI frontend.</li>
<li>Step 2: Open the <strong>Designer</strong> link provided by the stack of solution, debug the new workflow locally (on the EC2 virtual machine), install the missing nodes, upload the required inference models, and ensure they can be successfully loaded and inferred locally (on the EC2 virtual machine).</li>
<li>Step 3: Repeat Step 2 as needed to <strong>publish multiple workflow templates</strong>.</li>
<li>Step 4: After debugging one (or more) workflow templates, package and <strong>publish the current environment</strong> with one click, and deploy a new Amazon SageMaker inference endpoint.</li>
<li>Step 5: On the ComfyUI inference page, select the published templates and, if needed, modify the inference prompts, inference models, and inference images/videos. This step will use Amazon SageMaker resources.</li>
</ul>
<h2 id="step-1-connect-to-the-ec2-that-deploys-comfyui-frontend">Step 1: Connect to the EC2 that deploys ComfyUI frontend</h2>
<p>By connecting to the EC2 instance, you can check the corresponding directory structure locally, making it easier to view the log files during local workflow debugging and aid in diagnostics.</p>
<p>If you only need to view the local ComfyUI debugging logs, you can also achieve this through the following steps:</p>
<ol>
<li>Open the EC2 console in the same region where the deployment solution is located, select the <strong>comfy-on-aws-dev</strong> instance, and click <strong>Connect</strong> in the top right corner.</li>
<li>In the available connection methods, select the <strong>EC2 Instance Connect</strong> tab and click <strong>Connect</strong>.</li>
<li>After a short wait, a new EC2 connection page will pop up. You can enter the required commands as needed to perform various operations. Common commands include:</li>
</ol>
<div class="highlight"><pre><span></span><code>tail -f /var/log/cloud-init-output.log Used for real-time viewing of the initial logs during the EC2 startup process for Comfy.
sudo journalctl -u comfy -f Used for real-time viewing of Comfy runtime logs.
tail -f /root/stable-diffusion-aws-extension/container/*.log Used to view all logs of the Comfy runtime container.
sudo journalctl -u comfy --no-pager -n 200 Used to view the last 200 logs of the Comfy runtime.
docker images -q | xargs docker rmi -f
</code></pre></div>
<h2 id="step-2-debug-the-workflow">Step 2: Debug the workflow</h2>
<p>In the native <strong>Designer</strong> page provided by this solution, you can debug new workflows using the same methods as the local version of ComfyUI. Model management, and other tasks can be performed by connecting to the virtual machine (EC2) where ComfyUI is deployed.</p>
<p><img alt="major-designer" src="../../../images/senior-design.png" /></p>
<p>The steps for using the senior design version of ComfyUI are summarized as follows:</p>
<ol>
<li>(Optional) Drag an existing workflow JSON file into the ComfyUI interface to render the workflow.</li>
<li>Adjust (including adding and deleting) work nodes (custom nodes), and adjust inference parameters and the models used.</li>
<li>Click <strong>Queue Prompt</strong> to start an inference task based on the current page workflow.</li>
<li>
<p>(Optional) If step 3 results in an error prompt, follow the instructions to resolve it. For example, if a missing model is indicated, download the model to the corresponding directory on the EC2 instance; if missing custom nodes are indicated, click <strong>Manager</strong> and then <strong>Install Missing Custom Nodes</strong> to install the missing nodes. After resolving the error, repeat step 3 to test again.
<img alt="ComfyUI Management" src="../../../images/ComfyUI-Manager.png" /></p>
</li>
<li>
<p>Once the workflow is complete and the generated results are displayed on the interface, it indicates that the workflow debugging has been successful.</p>
</li>
<li>
<p>Click the plus sign above the <strong>Template List</strong> module in the right navigation bar. In the pop-up window, enter the name of the template to be published and the runtime environment to be bound, then click <strong>OK</strong>. </p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Please note that the new template name must not exceed 20 characters in length, should be a combination of letters and numbers, and is case-sensitive. Additionally, the name must be unique within the same region; if it conflicts with an existing template name, a creation error will be prompted. If the runtime environment is not yet published, you can return to modify the published templates after completing Step 4 to bind the correct runtime environment.</p>
</div>
<p><img alt="template release" src="../../../images/template_release.png" /></p>
</li>
<li>
<p>During the workflow publishing process, no updates should be made on the ComfyUI frontend. This process generally takes about ten seconds. After the publication is complete, a pop-up message will appear on the frontend indicating that the publication is finished.</p>
</li>
<li>Once the publishing is complete, refresh the page to see the newly published template in the workflow template list on the right navigation bar.</li>
</ol>
<h2 id="step-3-repeat-step-2-as-needed-to-publish-multiple-templates">Step 3: Repeat Step 2 as needed to publish multiple templates</h2>
<p>To ensure workflow stability and compatibility, and to maximize resource utilization, it is recommended that users continuously debug and publish multiple workflow templates within the ComfyUI default environment. Once these workflows are ready, the combined running environment should be published and bound to an Amazon SageMaker Inference Endpoint. This setup allows the published environment to stably run multiple templates while maximizing the resource utilization of the inference endpoint. Additionally, consider the environment size when publishing; a larger environment may result in longer cold start times during subsequent auto-scaling. Balancing the number of templates bound to a single environment is a trade-off decision users need to make.</p>
<h2 id="step-4-deploy-new-inference-endpoint-for-future-inference-of-released-template">Step 4: Deploy new inference endpoint for future inference of released template</h2>
<p>After completing Step 3, users can package and publish the workflow runtime environment with one click and create an Amazon SageMaker Inference Endpoint for cloud-based inference based on the selected workflow template.</p>
<ol>
<li>Click <strong>New Environment</strong> in the right navigation bar.</li>
<li>In the pop-up dialog, enter the name for the environment to be published. In the <em>Endpoint Config</em> section, select the parameters for the Amazon SageMaker Inference Endpoint to be bound to this environment, including instance type, auto-scaling options, etc. Click <strong>OK</strong> when finished.</li>
<li>The environment publishing process may take an uncertain amount of time, potentially up to 10+ minutes, depending on the size of the existing environment. During this time, the page will be locked to prevent any other operations that might disrupt the environment and cause the publishing process to fail.</li>
<li>Once the creation is successful, refresh the page. In the <strong>Template List</strong> section, select the templates to be bound, click the pencil icon, choose the newly published environment in the pop-up dialog, and click <strong>OK</strong>.</li>
</ol>
<h2 id="step-5-inference-of-released-template">Step 5: Inference of released template</h2>
<p>In the view of <strong>Designer</strong> or <strong>Junior Artists</strong>, you can easily perform inference based on a template using the following steps:</p>
<ol>
<li>Open the ComfyUI page and select a released template from the right-hand navigation bar. If in <strong>Designer</strong> view, also need to select the <strong>Prompt on AWS</strong> checkbox in the right-hand navigation bar.</li>
<li>The selected template will be automatically render in the ComfyUI page. Adjust the parameters as needed, and click <strong>Queue Prompt</strong> to submit the inference task.</li>
<li>Once the inference task is completed, the generated results will automatically be displayed on the page.</li>
</ol>
<h2 id="manage-models">Manage model(s)</h2>
<h3 id="upload-model">Upload model</h3>
<p>To ensure smooth access during the model debugging phase, new models need to be uploaded to EC2. You can achieve this by entering the corresponding subfolder for the model category under the <strong>models</strong> directory on EC2. Use either direct drag-and-drop or the <strong>wget</strong> command with the model download URL. Considering network speed, it is recommended to prioritize using the <strong>wget</strong> method for model downloads.</p>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": ["navigation.tabs"], "search": "../../../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": "develop"}</script>
<script src="../../../assets/javascripts/bundle.fe8b6f2b.min.js"></script>
</body>
</html>