Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Génération contrôlée","local":"controlled-generation","sections":[{"title":"InstructPix2Pix","local":"instructpix2pix","sections":[],"depth":2},{"title":"Attend and Excite","local":"attend-and-excite","sections":[],"depth":2},{"title":"Guidage sémantique (SEGA)","local":"semantic-guidance-sega","sections":[],"depth":2},{"title":"Guidage par auto-attention (SAG)","local":"self-attention-guidance-sag","sections":[],"depth":2},{"title":"Depth2Image","local":"depth2image","sections":[],"depth":2},{"title":"MultiDiffusion Panorama","local":"multidiffusion-panorama","sections":[],"depth":2},{"title":"Affinage de vos propres modèles","local":"fine-tuning-your-own-models","sections":[],"depth":2},{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":2},{"title":"Inversion textuelle","local":"textual-inversion","sections":[],"depth":2},{"title":"ControlNet","local":"controlnet","sections":[],"depth":2},{"title":"Pondération des prompts","local":"prompt-weighting","sections":[],"depth":2},{"title":"Custom Diffusion","local":"custom-diffusion","sections":[],"depth":2},{"title":"DiffEdit","local":"diffedit","sections":[],"depth":2},{"title":"T2I-Adapter","local":"t2i-adapter","sections":[],"depth":2},{"title":"Fabric","local":"fabric","sections":[],"depth":2}],"depth":1}"/> | |
| <link href="/docs/diffusers/main/en/_app/immutable/entry/start.0S0_iEoG.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/I9eooN77.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/Bupkjr9f.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/CyvZ3FS5.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/l0QnnOED.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DnVIJfC5.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/nodes/0.DteTvmQZ.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/CoSrdQax.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/nodes/390.DYfxoBKz.js" rel="modulepreload"> | |
| <link href="/docs/diffusers/main/en/_app/immutable/chunks/DSPDl1gz.js" rel="modulepreload"> | |
| <!--1v3kjpy--><meta name="hf:doc:metadata" content="{"title":"Controlled generation","local":"controlled-generation","sections":[{"title":"InstructPix2Pix","local":"instructpix2pix","sections":[],"depth":2},{"title":"Attend and Excite","local":"attend-and-excite","sections":[],"depth":2},{"title":"Semantic Guidance (SEGA)","local":"semantic-guidance-sega","sections":[],"depth":2},{"title":"Self-attention Guidance (SAG)","local":"self-attention-guidance-sag","sections":[],"depth":2},{"title":"Depth2Image","local":"depth2image","sections":[],"depth":2},{"title":"MultiDiffusion Panorama","local":"multidiffusion-panorama","sections":[],"depth":2},{"title":"Fine-tuning your own models","local":"fine-tuning-your-own-models","sections":[],"depth":2},{"title":"DreamBooth","local":"dreambooth","sections":[],"depth":2},{"title":"Textual Inversion","local":"textual-inversion","sections":[],"depth":2},{"title":"ControlNet","local":"controlnet","sections":[],"depth":2},{"title":"Prompt Weighting","local":"prompt-weighting","sections":[],"depth":2},{"title":"Custom Diffusion","local":"custom-diffusion","sections":[],"depth":2},{"title":"DiffEdit","local":"diffedit","sections":[],"depth":2},{"title":"T2I-Adapter","local":"t2i-adapter","sections":[],"depth":2},{"title":"Fabric","local":"fabric","sections":[],"depth":2}],"depth":1}"/><!----> | |
| <link href="/docs/diffusers/main/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;"><div dir="ltr" class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----></span> <span dir="auto">Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="controlled-generation" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#controlled-generation"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Génération contrôlée<!----></span></h1><!--]--><!----> <p>Le contrôle des sorties générées par les modèles de diffusion est un objectif poursuivi depuis longtemps par la communauté et constitue désormais un sujet de recherche actif. Dans de nombreux modèles de diffusion populaires, des modifications subtiles des entrées, qu’il s’agisse d’images ou de prompts textuels, peuvent radicalement altérer les sorties. Dans un monde idéal, nous aimerions pouvoir contrôler la manière dont la sémantique est préservée ou modifiée.</p> <p>La plupart des exemples de préservation de la sémantique se réduisent à la capacité de cartographier avec précision un changement d’entrée vers un changement de sortie. Par exemple, ajouter un adjectif à un sujet dans un prompt préserve l’image entière, ne modifiant que le sujet concerné. De même, une variation d’image d’un sujet particulier préserve la pose de ce sujet.</p> <p>De plus, il existe des qualités des images générées que nous souhaitons influencer au-delà de la préservation sémantique. Autrement dit, de manière générale, nous aimerions que nos sorties soient de bonne qualité, respectent un style particulier ou soient réalistes.</p> <p>Nous documenterons certaines des techniques que <code>diffusers</code> prend en charge pour contrôler la génération des modèles de diffusion. Une grande partie relève de la recherche de pointe et peut être assez nuancée. Si un point nécessite des éclaircissements ou si vous avez une suggestion, n’hésitez pas à ouvrir une <a href="https://github.com/huggingface/diffusers/discussions" rel="nofollow">discussion GitHub</a> ou un <a href="https://github.com/huggingface/diffusers/issues" rel="nofollow">ticket GitHub</a>.</p> <p>Nous fournissons une explication de haut niveau de la manière dont la génération peut être contrôlée, ainsi qu’un aperçu des aspects techniques. Pour des explications plus approfondies sur les aspects techniques, les articles originaux, liés depuis les pipelines, restent toujours les meilleures ressources.</p> <p>Selon le cas d’usage, il convient de choisir la technique appropriée. Dans de nombreux cas, ces techniques peuvent être combinées. Par exemple, il est possible d’associer Textual Inversion à SEGA afin de fournir un guidage sémantique plus précis aux sorties générées à l’aide de Textual Inversion.</p> <p>Sauf mention contraire, il s’agit de techniques qui fonctionnent avec des modèles existants et qui ne nécessitent pas de poids propres.</p> <ol><li><a href="#instructpix2pix">InstructPix2Pix</a></li> <li><a href="#attend-and-excite">Attend and Excite</a></li> <li><a href="#semantic-guidance-sega">Guidage sémantique</a></li> <li><a href="#self-attention-guidance-sag">Guidage par auto-attention</a></li> <li><a href="#depth2image">Depth2Image</a></li> <li><a href="#multidiffusion-panorama">MultiDiffusion Panorama</a></li> <li><a href="#dreambooth">DreamBooth</a></li> <li><a href="#textual-inversion">Inversion textuelle</a></li> <li><a href="#controlnet">ControlNet</a></li> <li><a href="#prompt-weighting">Pondération des prompts</a></li> <li><a href="#custom-diffusion">Diffusion personnalisée</a></li> <li><a href="#diffedit">DiffEdit</a></li> <li><a href="#t2i-adapter">T2I-Adapter</a></li> <li><a href="#fabric">FABRIC</a></li></ol> <p>Pour votre confort, nous fournissons un tableau indiquant quelles méthodes sont réservées à l’inférence et lesquelles nécessitent un fine-tuning/entraînement.</p> <table><thead><tr><th align="center"><strong>Méthode</strong></th><th align="center"><strong>Inférence uniquement</strong></th><th align="center"><strong>Nécessite un entraînement /<br/> un affinement</strong></th><th align="center"><strong>Commentaires</strong></th></tr></thead><tbody><tr><td align="center"><a href="#instructpix2pix">InstructPix2Pix</a></td><td align="center">✅</td><td align="center">❌</td><td align="center">Peut en outre être <br/>ajusté finement pour une meilleure <br/>performance sur des <br/>instructions d'édition spécifiques.</td></tr><tr><td align="center"><a href="#attend-and-excite">Attend and Excite</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#semantic-guidance-sega">Guidage sémantique</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#self-attention-guidance-sag">Guidage par auto-attention</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#depth2image">Depth2Image</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#multidiffusion-panorama">MultiDiffusion Panorama</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#dreambooth">DreamBooth</a></td><td align="center">❌</td><td align="center">✅</td><td align="center"></td></tr><tr><td align="center"><a href="#textual-inversion">Inversion textuelle</a></td><td align="center">❌</td><td align="center">✅</td><td align="center"></td></tr><tr><td align="center"><a href="#controlnet">ControlNet</a></td><td align="center">✅</td><td align="center">❌</td><td align="center">Un ControlNet peut être <br/>entraîné/ajusté finement sur<br/>un conditionnement personnalisé.</td></tr><tr><td align="center"><a href="#prompt-weighting">Pondération des prompts</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#custom-diffusion">Diffusion personnalisée</a></td><td align="center">❌</td><td align="center">✅</td><td align="center"></td></tr><tr><td align="center"><a href="#diffedit">DiffEdit</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#t2i-adapter">T2I-Adapter</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr><tr><td align="center"><a href="#fabric">Fabric</a></td><td align="center">✅</td><td align="center">❌</td><td align="center"></td></tr></tbody></table> <!--[1--><h2 class="relative group"><a id="instructpix2pix" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#instructpix2pix"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->InstructPix2Pix<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2211.09800" rel="nofollow">Article</a></p> <p><a href="../api/pipelines/pix2pix">InstructPix2Pix</a> est ajusté à partir de Stable Diffusion pour prendre en charge l'édition d'images d'entrée. Il prend en entrée une image et un prompt décrivant une modification, et il renvoie l'image éditée. | |
| InstructPix2Pix a été explicitement entraîné pour fonctionner bien avec des prompts de type <a href="https://openai.com/blog/instruction-following/" rel="nofollow">InstructGPT</a>.</p> <!--[1--><h2 class="relative group"><a id="attend-and-excite" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#attend-and-excite"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Attend and Excite<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2301.13826" rel="nofollow">Article</a></p> <p>Attend and Excite permet aux sujets de l'invite d'être fidèlement représentés dans l'image finale.</p> <p>Un ensemble d’indices de jetons est fourni en entrée, correspondant aux sujets de l’invite qui doivent être présents dans l’image. Lors du débruitage, chaque indice de jeton est garanti d’atteindre un seuil minimal d’attention pour au moins un patch de l’image. Les latents intermédiaires sont optimisés itérativement au cours du processus de débruitage afin de renforcer l’attention du jeton de sujet le plus négligé, jusqu’à ce que le seuil d’attention soit atteint pour tous les jetons de sujet.</p> <p>Comme Pix2Pix Zero, Attend and Excite intègre également une boucle d'optimisation miniature (les poids pré-entraînés restant inchangés) dans son pipeline et peut nécessiter plus de mémoire que le <a href="../api/pipelines/stable_diffusion/text2img">StableDiffusionPipeline</a> habituel.</p> <!--[1--><h2 class="relative group"><a id="semantic-guidance-sega" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#semantic-guidance-sega"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Guidage sémantique (SEGA)<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2301.12247" rel="nofollow">Article</a></p> <p>SEGA permet d’appliquer ou de retirer un ou plusieurs concepts d’une image. L’intensité du concept peut également être contrôlée. Par exemple, le concept « sourire » peut être utilisé pour augmenter ou diminuer progressivement le sourire d’un portrait.</p> <p>De la même manière que le guidage sans classifieur fournit un guidage via des entrées de prompt vides, SEGA fournit un guidage sur des prompts conceptuels. Plusieurs de ces prompts conceptuels peuvent être appliqués simultanément. Chaque prompt conceptuel peut soit ajouter, soit supprimer son concept, selon que le guidage est appliqué de manière positive ou négative.</p> <p>Contrairement à Pix2Pix Zero ou Attend and Excite, SEGA interagit directement avec le processus de diffusion au lieu d'effectuer une optimisation explicite basée sur le gradient.</p> <!--[1--><h2 class="relative group"><a id="self-attention-guidance-sag" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#self-attention-guidance-sag"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Guidage par auto-attention (SAG)<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2210.00939" rel="nofollow">Article</a></p> <p>Le guidage par auto-attention améliore la qualité générale des images.</p> <p>SAG fournit des orientations à partir de prédictions non conditionnées sur les détails de haute fréquence jusqu’aux images entièrement conditionnées. Les détails de haute fréquence sont extraits des cartes d’auto-attention du UNet.</p> <!--[1--><h2 class="relative group"><a id="depth2image" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#depth2image"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Depth2Image<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/stabilityai/stable-diffusion-2-depth" rel="nofollow">Projet</a></p> <p><a href="../api/pipelines/stable_diffusion/depth2img">Depth2Image</a> est un modèle dérivé de Stable Diffusion, affiné pour mieux préserver la sémantique lors de la variation d’images guidée par du texte.</p> <p>Elle conditionne sur une estimation de profondeur monoculaire de l'image d'origine.</p> <!--[1--><h2 class="relative group"><a id="multidiffusion-panorama" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#multidiffusion-panorama"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->MultiDiffusion Panorama<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2302.08113" rel="nofollow">Article</a></p> <p>MultiDiffusion Panorama définit un nouveau processus de génération sur un modèle de diffusion pré-entraîné. Ce processus combine plusieurs méthodes de génération par diffusion qui peuvent être appliquées directement pour générer des images de haute qualité et variées. Les résultats respectent les contrôles fournis par l'utilisateur, tels que le ratio d'aspect souhaité (par exemple, panorama) et les signaux de guidage spatial, allant des masques de segmentation précis aux boîtes englobantes. | |
| MultiDiffusion Panorama vous permet de générer des images de haute qualité avec des ratios d'aspect arbitraires (par exemple, des panoramas).</p> <!--[1--><h2 class="relative group"><a id="fine-tuning-your-own-models" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#fine-tuning-your-own-models"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Affinage de vos propres modèles<!----></span></h2><!--]--><!----> <p>En plus des modèles pré-entraînés, Diffusers propose des scripts d'entraînement pour l'ajustement fin des modèles sur des données fournies par l'utilisateur.</p> <!--[1--><h2 class="relative group"><a id="dreambooth" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#dreambooth"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->DreamBooth<!----></span></h2><!--]--><!----> <p><a href="https://dreambooth.github.io/" rel="nofollow">Projet</a></p> <p><a href="../training/dreambooth">DreamBooth</a> ajuste finement un modèle pour lui apprendre un nouveau sujet. Par exemple, quelques photos d’une personne peuvent être utilisées pour générer des images de cette personne dans différents styles.</p> <!--[1--><h2 class="relative group"><a id="textual-inversion" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#textual-inversion"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Inversion textuelle<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2208.01618" rel="nofollow">Article</a></p> <p><a href="../training/text_inversion">Textual Inversion</a> ajuste finement un modèle pour lui apprendre un nouveau concept. Par exemple, quelques images d’un style artistique peuvent être utilisées pour générer des images dans ce style.</p> <!--[1--><h2 class="relative group"><a id="controlnet" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#controlnet"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->ControlNet<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2302.05543" rel="nofollow">Article</a></p> <p><a href="../api/pipelines/controlnet">ControlNet</a> est un réseau auxiliaire qui ajoute une condition supplémentaire. | |
| Il existe 8 ControlNets pré-entraînés canoniques, entraînés sur différentes conditions telles que la détection de contours, les gribouillis, | |
| les cartes de profondeur et les segmentations sémantiques.</p> <!--[1--><h2 class="relative group"><a id="prompt-weighting" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#prompt-weighting"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Pondération des prompts<!----></span></h2><!--]--><!----> <p><a href="../using-diffusers/weighted_prompts">Pondération des prompts</a> est une technique simple qui accorde plus de poids d'attention à certaines parties de l'entrée textuelle.</p> <!--[1--><h2 class="relative group"><a id="custom-diffusion" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#custom-diffusion"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Custom Diffusion<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2212.04488" rel="nofollow">Article</a></p> <p><a href="../training/custom_diffusion">Custom Diffusion</a> n’effectue un fine-tuning que des cartes d’attention croisée d’un modèle de diffusion texte-image pré-entraîné. Il permet également d’effectuer en complément du Textual Inversion. Il prend en charge la formation multi-concepts par conception. Comme DreamBooth et Textual Inversion, Custom Diffusion est également utilisé pour enseigner à un modèle de diffusion texte-image pré-entraîné de nouveaux concepts afin de générer des sorties impliquant le ou les concepts d’intérêt.</p> <!--[1--><h2 class="relative group"><a id="diffedit" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#diffedit"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->DiffEdit<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2210.11427" rel="nofollow">Article</a></p> <p>DiffEdit permet d'effectuer des modifications sémantiques sur des images d'entrée ainsi que sur les prompts d'entrée, tout en préservant les images d'entrée d'origine dans la mesure du possible.</p> <!--[1--><h2 class="relative group"><a id="t2i-adapter" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#t2i-adapter"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->T2I-Adapter<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2302.08453" rel="nofollow">Article</a></p> <p><a href="../api/pipelines/stable_diffusion/adapter">T2I-Adapter</a> est un réseau auxiliaire qui ajoute une condition supplémentaire. | |
| Il existe 8 adaptateurs pré-entraînés canoniques, entraînés sur différentes conditions telles que la détection de contours, le croquis, | |
| les cartes de profondeur et les segmentations sémantiques.</p> <!--[1--><h2 class="relative group"><a id="fabric" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#fabric"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->Fabric<!----></span></h2><!--]--><!----> <p><a href="https://huggingface.co/papers/2307.10159" rel="nofollow">Article</a></p> <p><a href="https://github.com/huggingface/diffusers/tree/442017ccc877279bcf24fbe92f92d3d0def191b6/examples/community#stable-diffusion-fabric-pipeline" rel="nofollow">Fabric</a> est une approche sans entraînement applicable à une large gamme de modèles de diffusion populaires, qui exploite la couche d'auto-attention présente dans les architectures les plus utilisées pour conditionner le processus de diffusion sur un ensemble d'images de retour d'information.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/controlling_generation.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]--> | |
| <script> | |
| { | |
| __sveltekit_1qsdbwf = { | |
| base: "/docs/diffusers/main/en", | |
| assets: "/docs/diffusers/main/en" | |
| }; | |
| const element = document.currentScript.parentElement; | |
| Promise.all([ | |
| import("/docs/diffusers/main/en/_app/immutable/entry/start.0S0_iEoG.js"), | |
| import("/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 390], | |
| data: [null,null], | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 40.4 kB
- Xet hash:
- d6f3b7284dbf6e318fb252aceb9357b69976eb4f7cc27b1f8d46534b5e9f8a94
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.