<?xml version="1.0" encoding="utf-8" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:tt="http://teletype.in/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"><title>@iodiva</title><author><name>@iodiva</name></author><id>https://teletype.in/atom/iodiva</id><link rel="self" type="application/atom+xml" href="https://teletype.in/atom/iodiva?offset=0"></link><link rel="alternate" type="text/html" href="https://teletype.in/@iodiva?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=iodiva"></link><link rel="next" type="application/rss+xml" href="https://teletype.in/atom/iodiva?offset=10"></link><link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></link><updated>2026-05-25T15:15:28.317Z</updated><entry><id>iodiva:sampling-method</id><link rel="alternate" type="text/html" href="https://teletype.in/@iodiva/sampling-method?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=iodiva"></link><title>Разбираем Sampling method для SD</title><published>2022-11-16T01:58:31.281Z</published><updated>2022-11-16T01:58:31.281Z</updated><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img1.teletype.in/files/ca/25/ca25f980-48c0-4020-a339-0ab5e0e961bd.png"></media:thumbnail><summary type="html">&lt;img src=&quot;https://img1.teletype.in/files/86/06/8606c668-8017-41f0-9535-6aa3d4c3e5d7.png&quot;&gt;Что такое Sampling method? 
Это методы выборки для предсказание объектов из задонного вами промпта в сгенерированном шуме для приведения промпта к картинке. Промпт это текст который вы хотите сгенерировать.</summary><content type="html">
  &lt;figure id=&quot;tQgE&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/86/06/8606c668-8017-41f0-9535-6aa3d4c3e5d7.png&quot; width=&quot;559&quot; /&gt;
    &lt;figcaption&gt;Окно Sampling Steps и Sampling method&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;Wfsq&quot;&gt;&lt;em&gt;Что такое Sampling method? &lt;/em&gt;&lt;br /&gt;Это методы выборки для предсказание объектов из задонного вами промпта в сгенерированном шуме для приведения промпта к картинке. Промпт это текст который вы хотите сгенерировать.&lt;/p&gt;
  &lt;p id=&quot;f1b4&quot;&gt;Automatic1111 имеет на борту 17 Sampling method. Если охота прямо разобраться на коде как работают методы то советую почитать&lt;a href=&quot;https://huggingface.co/docs/diffusers/v0.7.0/en/api/schedulers#diffusers.DDPMScheduler&quot; target=&quot;_blank&quot;&gt; документацию с HuggingFace&lt;/a&gt;&lt;/p&gt;
  &lt;h3 id=&quot;AAf7&quot;&gt;&lt;em&gt;Так какой же метод использовать и что значат ползунки?&lt;/em&gt;&lt;/h3&gt;
  &lt;figure id=&quot;OARQ&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/d7/7b/d77b73c3-4758-4a15-a3fb-43f15f91e60d.png&quot; width=&quot;557&quot; /&gt;
    &lt;figcaption&gt;CFG Scale&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;5Y72&quot;&gt;С начала разберемся в простом. CFG Scale это параметр определяющий на сколько промпт будет усилен (Чем больше число тем сильнее промпт ищется на картинке, но появляются артефакты). Нормальны результаты можно получить варьируя числа от 5 до 15.&lt;/p&gt;
  &lt;figure id=&quot;eQuZ&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/e7/f0/e7f0a7a3-060b-48e2-a834-cd424b0b0995.png&quot; width=&quot;2432&quot; /&gt;
    &lt;figcaption&gt;Пример с значериями CFG Scale 5, 8, 15, 30&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;h3 id=&quot;c9E9&quot;&gt;&lt;em&gt;Что такое Sampling Steps и какое число брать?&lt;/em&gt;&lt;/h3&gt;
  &lt;p id=&quot;n0Lm&quot;&gt;&lt;em&gt;Sampling Steps э&lt;/em&gt;то число сколько раз программа пройдет через нейросеть в поисках обьектов из промпта одним из выбранных Sampling method&amp;#x27;ов. &lt;/p&gt;
  &lt;figure id=&quot;FvRO&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/b7/b1/b7b140e3-1ec0-4a48-9d94-59cbe8aae630.png&quot; width=&quot;718&quot; /&gt;
    &lt;figcaption&gt;Из шума в жука&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;jn5t&quot;&gt;Собственно прогоним все  Sampling method и посмотрим на результаты&lt;/p&gt;
  &lt;p id=&quot;cE2r&quot;&gt;Prompt: &lt;em&gt;An intricate painting of divali celebrations by moebius and makoto shinkai, featured on artstation, pixiv, volumetric lighting, 8 k, highly detailed render, soft glow &lt;/em&gt;&lt;/p&gt;
  &lt;p id=&quot;LhmL&quot;&gt;Divali celebrations - это праздник, фестиваль света в индии&lt;/p&gt;
  &lt;h2 id=&quot;iKA6&quot;&gt;Euler a, Euler, LMS, Heun, DPM2&lt;/h2&gt;
  &lt;figure id=&quot;MK9f&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/57/ff/57ff9f80-e8c2-4924-b205-df7505b5f5fa.jpeg&quot; width=&quot;2940&quot; /&gt;
    &lt;figcaption&gt;Euler a, Euler, LMS, Heun, DPM2&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;h2 id=&quot;IOIN&quot;&gt;&lt;strong&gt;DPM2 a, DPM++ 2S a, DPM++ 2M, DPM fast, DPM adaptive, LMS Karras&lt;/strong&gt;&lt;/h2&gt;
  &lt;figure id=&quot;eX6p&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/98/c6/98c67c47-741e-4098-a142-cc587d27911c.jpeg&quot; width=&quot;3435&quot; /&gt;
    &lt;figcaption&gt;DPM2 a, DPM++ 2S a, DPM++ 2M, DPM fast, DPM adaptive, LMS Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;h2 id=&quot;momi&quot;&gt;DPM2 Karras, DPM2 a Karras, DPM++ 2S a Karras, DPM++ 2M Karras, DDIM, PLMS&lt;/h2&gt;
  &lt;figure id=&quot;NwBF&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/e7/dd/e7dd485f-5ae2-4632-ad2d-d0bcce8e5c81.jpeg&quot; width=&quot;3450&quot; /&gt;
    &lt;figcaption&gt;DPM2 Karras, DPM2 a Karras, DPM++ 2S a Karras, DPM++ 2M Karras, DDIM, PLMS,&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;h2 id=&quot;gVvP&quot;&gt;И финальный прогон по 50 &lt;em&gt;Sampling Steps&lt;/em&gt; с записью времени&lt;/h2&gt;
  &lt;figure id=&quot;ZsjB&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/91/d9/91d9a3bd-c8d1-48ce-94e5-d467d509757b.jpeg&quot; width=&quot;3078&quot; /&gt;
    &lt;figcaption&gt;50 шагов&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;sMX2&quot;&gt;Как видно можно получить идентичный результат, потратив разное время, иногда &lt;strong&gt;более чем в два раза.&lt;/strong&gt;&lt;br /&gt;Так что в финал я выбрал самых шустрых и прикольных на мой вкус&lt;/p&gt;
  &lt;h2 id=&quot;OOxc&quot;&gt;&lt;br /&gt;Euler a, LMS, DPM fast, LMS Karras, DPM++ 2M Karras&lt;/h2&gt;
  &lt;p id=&quot;UQE2&quot;&gt;&lt;br /&gt;и устрол им мини забег на короткую дистанцию 1, 2, 3, 4, 8, 10 шагов.&lt;/p&gt;
  &lt;figure id=&quot;sj5L&quot; class=&quot;m_original&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/81/21/8121b63b-ab46-422b-b177-93eec4ca4dfe.jpeg&quot; width=&quot;3456&quot; /&gt;
  &lt;/figure&gt;
  &lt;h2 id=&quot;ZQvi&quot;&gt;Результаты&lt;/h2&gt;
  &lt;p id=&quot;gZe5&quot;&gt;По полученым результатам, я скажу так &lt;strong&gt;LMS&lt;/strong&gt; меня удивил и теперь его я не оставлю без внимания, я бы не выбирал между &lt;strong&gt;DPM++ 2M Karras И LMS Karras&lt;/strong&gt;, так как результаты похожи, но &lt;strong&gt;LMS Karras&lt;/strong&gt; на две сек быстрее так что победа. &lt;br /&gt;Надеюсь стало понятнее что за семплер методы и на что они влияют (как минимум на скорость). Кстати забавно как DPM себя показал ужасно на короткой.&lt;/p&gt;
  &lt;h2 id=&quot;twgJ&quot;&gt;ПОБЕДА &lt;strong&gt;LMS Karras&lt;/strong&gt;&lt;/h2&gt;
  &lt;p id=&quot;Ou20&quot;&gt;&lt;/p&gt;
  &lt;figure id=&quot;A7vn&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/79/64/79648164-414a-4599-b472-fbe53e4bc26e.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;Euler a&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;rJVd&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/79/73/797341cf-5993-4425-98b8-170177fa9d0e.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;Euler&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;UmR2&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/c4/09/c4094be3-247f-4673-88a0-dd60a3926a98.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;LMS&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;GaOg&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/37/3a/373afad1-ea5b-4a85-a0d0-16759498d2f1.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt; Heun&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;uXGW&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/f7/a5/f7a5be14-82ed-4ac7-876f-fc343d7ef6dc.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM2&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;ywbC&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/4f/5c/4f5c05ba-531c-4c51-84dd-a6ca3b58fe86.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM2 a&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;MkRl&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/25/70/2570daca-7c37-47b6-a7c1-a0ecf9dc3507.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM++ 2S a&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;hS2U&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/fc/72/fc72f71b-f0a7-4619-a063-e69fc261843d.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM++ 2M&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;GTk3&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/4d/47/4d47b81f-ab59-4688-9c69-3f010b80f7bf.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM fast&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;cIzL&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/29/e2/29e23dc5-8052-4b7e-91b0-76d9d788e2ac.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt; DPM adaptive&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;mKGc&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/62/e4/62e4fb06-a16f-45b1-bca2-823d00bb2e38.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;LMS Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;j5uq&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/42/38/42382c59-0e4b-41df-8b45-e41961c9fb1c.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM2 Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;QnB2&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/e8/81/e88192a6-d6c5-4e63-a4b4-8f49f155fb98.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM2 a Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;elLe&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img3.teletype.in/files/65/c9/65c99bb0-2a21-42d7-9425-8e4aef9f5e69.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM++ 2S a Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;nBSZ&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/d7/1d/d71d6955-2280-4725-809b-3cb4bb211d24.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DPM++ 2M Karras&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;9jmf&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img1.teletype.in/files/ce/58/ce584834-eca1-4963-a14e-1137f9b868c4.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;DDIM&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;figure id=&quot;BOHS&quot; class=&quot;m_original&quot; data-caption-align=&quot;center&quot;&gt;
    &lt;img src=&quot;https://img2.teletype.in/files/96/8c/968c3e85-f33f-44a2-b3b4-2d87e005c4f1.png&quot; width=&quot;512&quot; /&gt;
    &lt;figcaption&gt;PLMS&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;Yiik&quot;&gt;ПОБЕДА &lt;strong&gt;LMS Karras&lt;/strong&gt;&lt;/p&gt;

</content></entry></feed>