{"id":7852,"date":"2024-07-03T09:24:41","date_gmt":"2024-07-03T09:24:41","guid":{"rendered":"https:\/\/sites.hslu.ch\/werkstatt\/?p=7852"},"modified":"2024-09-11T07:24:00","modified_gmt":"2024-09-11T07:24:00","slug":"train-stable-diffusion-with-replicate","status":"publish","type":"post","link":"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/","title":{"rendered":"Train Stable Diffusion with Replicate"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_section el_class=&#187;dkw-section-lead&#187;][vc_row][vc_column width=&#187;2\/3&#8243; offset=&#187;vc_col-sm-offset-2&#8243;][vc_column_text css=&#187;&#187;]In diesem Recipie schauen wir uns an, wie wir ein Stable Diffusion Modell mit <a href=\"https:\/\/replicate.com\/\">Replicate<\/a> trainieren k\u00f6nnen, um einen bestimmten Stil zu erzeugen. Was ist ein LoRA? Welche Daten braucht es? Was sind die Vor- und Nachteile von Replicate? Wie lange dauert es ein LoRA zu trainieren?[\/vc_column_text][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-section-content&#187;][vc_row][vc_column width=&#187;1\/3&#8243; el_class=&#187;dkw-col-toc&#187; offset=&#187;vc_col-lg-3&#8243;][vc_column_text]<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Upcoming_Event\" >Upcoming Event:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Was_ist_ein_LoRA\" >Was ist ein LoRA?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Was_fuer_Daten_brauche_ich_um_ein_eigenes_LoRA_zu_trainieren\" >Was f\u00fcr Daten brauche ich, um ein eigenes LoRA zu trainieren?<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Dataset-Ethik\" >Dataset-Ethik<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Ueber_Replicate\" >\u00dcber Replicate<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Was_ist_Replicate\" >Was ist Replicate?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Vorteile\" >Vorteile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Nachteile\" >Nachteile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Wie_viel_Zeit_und_Geld_braucht_es_ein_LoRA_mit_Replicate_zu_trainieren\" >Wie viel Zeit und Geld braucht es, ein LoRA mit Replicate zu trainieren?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Training_mit_Replicate\" >Training mit Replicate<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Python\" >Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Dataset_Vorbereitung\" >Dataset Vorbereitung<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#LoRA-Training\" >LoRA-Training<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Anwendung_des_Modells\" >Anwendung des Modells<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Prompt\" >Prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Weitere_Parameter\" >Weitere Parameter<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/sites.hslu.ch\/werkstatt\/train-stable-diffusion-with-replicate\/#Die_Resultate\" >Die Resultate<\/a><\/li><\/ul><\/nav><\/div>\n[\/vc_column_text][\/vc_column][vc_column width=&#187;2\/3&#8243; el_class=&#187;dkw-col-content&#187; offset=&#187;vc_col-lg-6&#8243;][vc_column_text css=&#187;&#187;]<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Upcoming_Event\"><\/span>Upcoming Event:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<blockquote class=\"wp-embedded-content\" data-secret=\"nRhljdxBtP\"><p><a href=\"https:\/\/sites.hslu.ch\/werkstatt\/digital-skills-bilder-generieren-mit-ki\/\">Digital Skills: Bilder generieren mit KI<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#171;Digital Skills: Bilder generieren mit KI&#187; &#8212; Werkst\u00e4tten Design Film Kunst\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/digital-skills-bilder-generieren-mit-ki\/embed\/#?secret=0koTtO8TyS#?secret=nRhljdxBtP\" data-secret=\"nRhljdxBtP\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Was_ist_ein_LoRA\"><\/span><strong>Was ist ein LoRA?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>LoRAs (Low-Rank Adaptations) sind kleinere Modelle, <strong>die du mit bestehenden Stable Diffusion Modellen kombinieren kannst<\/strong>. Sie erlauben es <strong>ein Bestehendes Modell \u00abfine zu tunen\u00bb<\/strong>. So kannst du neue Konzepte wie Styles, Subjekte und Objekte (je nach LoRA) in deinen generierten Bildern hinzuf\u00fcgen. Die Methode zum Training spezieller Stile \/ Konzepte, die wir nutzen, ist hier ziemlich ausf\u00fchrlich beschrieben: <a href=\"https:\/\/dreambooth.github.io\/\">Dreambooth<\/a>.<\/p>\n<p>Diese neuen Konzepte fallen ganz grob unter 2 Kategorien:<\/p>\n<ul>\n<li>Stile\n<ul>\n<li>z.B. Wasserfarbe, VHS Glitches, Comic Styles, Glas-Optik ect.,<\/li>\n<\/ul>\n<\/li>\n<li>Subjekte \/ Objekte\n<ul>\n<li>Prominente Personen \/ Charaktere<\/li>\n<li>z.B. Liam Gallagher, Rhianna \/ Lara Croft, Sauron ect.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Um ein LoRA zu aktivieren kannst du unter dem Tab LoRA ein entsprechendes LoRA aktivieren wichtig hierbei ist, dass das LoRA auch mit dem Basismodell kompatibel ist.<\/p>\n<p>Beispiele f\u00fcr die Anwendung von LoRAs findest du hier: <a href=\"https:\/\/sites.hslu.ch\/werkstatt\/stable-diffusion-webui\/#Style_Modelle_und_LoRAs\">Stable Diffusion \u2013 webUI<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Was_fuer_Daten_brauche_ich_um_ein_eigenes_LoRA_zu_trainieren\"><\/span><strong>Was f\u00fcr Daten brauche ich, um ein eigenes LoRA zu trainieren?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Du brauchst daf\u00fcr ein Dataset von <strong>ca. 10-30 Bildern<\/strong>. Dies k\u00f6nnen Bilder eines bestimmten Stils, eines Objekts oder z.B. des Gesichts einer Person (Selfies) sein. Im nachfolgenden Beispiel wurde ein Dataset mit 50 Bildern des Pilatus genutzt.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Dataset-Ethik\"><\/span><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7826\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1000x220.png\" alt=\"\" width=\"1000\" height=\"220\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1000x220.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-768x169.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1536x337.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-848x186.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1140x250.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1170x257.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-1920x422.png 1920w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56-600x132.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.52.56.png 2022w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Dataset-Ethik<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Bei Datens\u00e4tzen f\u00fcr KI-Trainings solltest du beachten, dass es gewisse ethische Probleme geben kann.<\/p>\n<p>F\u00fcrs Training unbedenklich sind Bilder:<\/p>\n<ul>\n<li>die du selbst gemacht hast, dir selbst geh\u00f6ren, deine Autorschaft tragen<\/li>\n<li>die im Besitz von Personen die dir klar und deutlich ihre Zustimmung gegeben haben<\/li>\n<li>die unter Creative Commons (<a href=\"https:\/\/creativecommons.org\/public-domain\/cc0\/\">CC0<\/a>) ver\u00f6ffentlicht wurden<\/li>\n<li>deren Copyright schon l\u00e4nger abgelaufen ist oder die nicht unters Urheberrecht fallen<\/li>\n<\/ul>\n<p><strong>Dies ist besonders wichtig, da deine Replicate-Modelle auf einem externen Server gehostet werden.<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ueber_Replicate\"><\/span><strong>\u00dcber Replicate<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"Was_ist_Replicate\"><\/span><strong>Was ist Replicate?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>Replicate ist eine Plattform, die verschiedenste Tools f\u00fcr die Arbeit mit AI zur anbietet<\/strong>. Darunter findet sich auch die M\u00f6glichkeit, das Stable-Diffusion-XL-Model durch ein LoRA zu verfeinern. Replicate stellt seinen Nutzern ausserdem Serverspace zur Verf\u00fcgung, um Modelle zu trainieren und anschliessend zu <a href=\"https:\/\/replicate.com\/explore\">hosten<\/a>.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Vorteile\"><\/span><strong>Vorteile<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Das Training mit Replicate ist einfach zu erlernen. Die Plattform will ML-Tools <strong>verst\u00e4ndlich uns zug\u00e4nglich gestalten<\/strong>. Zudem kannst du auf die Hardware des Anbieters zugreifen. F\u00fcr die Erstellung eines Modelles heisst das, dass du komplexe und rechenintensive Arbeiten innerhalb k\u00fcrzester Zeit durchf\u00fchren kannst. Ausserdem kannst du mehrere Trainings <strong>gleichzeitig<\/strong> laufen lassen. Bei der sp\u00e4teren Nutzung deines Modelles bedeutet dieser Vorteil, dass deine Projekte online zug\u00e4nglich sein werden. Du wirst also <strong>von \u00fcberall auf sie zugreifen<\/strong> und sie unkompliziert <strong>mit anderen teilen<\/strong> k\u00f6nnen.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Nachteile\"><\/span><strong>Nachteile<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>In der Online-Natur des Services liegt aber auch sein gr\u00f6sster Nachteil. Daten und Modelle, die du auf Replicate verarbeitest und erstellst, landen auf den Servern grosser, kommerzieller Firmen. Es ist insbesondere wichtig, sich dar\u00fcber im Klaren zu sein, <strong>wenn du mit sensiblen Daten (Gesichter, Copyright-gesch\u00fctzes Material, etc.) arbeitest<\/strong>. Modelle, die du auf Replicate erstellst, k\u00f6nnen ausserdem nicht gel\u00f6scht werden.<\/p>\n<p>Zudem ist Replicate eine kostenpflichtige (wenn auch sehr erschwingliche) L\u00f6sung.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Wie_viel_Zeit_und_Geld_braucht_es_ein_LoRA_mit_Replicate_zu_trainieren\"><\/span><strong>Wie viel Zeit und Geld braucht es, ein LoRA mit Replicate zu trainieren?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Das Training mit Replicate dauert <strong>um die 10 Minuten<\/strong>. Der ganze Vorgang, inklusive dem Generieren von 30 Bildern wird dich <strong>ca. 0.90 Franken<\/strong> kosten. Genaue Angaben zum Pricing findest du <a href=\"https:\/\/replicate.com\/pricing\">hier<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Training_mit_Replicate\"><\/span><strong>Training mit Replicate<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Du hast einen Datensatz von 10-30 Bildern und willst ein Training versuchen? Let&#8217;s Go!<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Python\"><\/span><strong>Python<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>In diesem Beispiel werden wir ein Python-Scrip nutzen, um unser Training zu initiieren.<\/strong> Es gibt die M\u00f6glichkeit, ein Modell durch andere Scripts, beispielsweisse in den Sprachen JavaScript oder Swift, zu erstellen. Eine \u00dcbersicht dazu findest du in der <a href=\"https:\/\/replicate.com\/docs\/guides\/fine-tune-an-image-model\">Dokumentation<\/a>.<\/p>\n<p>Stelle als erstes sicher, dass du Python auf deinem PC installiert hast. \u00d6ffne dazu ein Terminal-Fenster und f\u00fchre zuerst die Befehle <em>python &#8211;version<\/em> und <em>python3 &#8211;version<\/em> aus. wenn du bei beiden Inputs die Meldung <em>command not found<\/em> zur\u00fcckerh\u00e4ltst, musst du Python erst noch <a href=\"https:\/\/www.python.org\/downloads\/\">herunterladen<\/a>.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Dataset_Vorbereitung\"><\/span><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7824\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.40.00.png\" alt=\"\" width=\"654\" height=\"92\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.40.00.png 654w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-15.40.00-600x84.png 600w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/>Dataset Vorbereitung<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Zippe dein Dataset und lade es auf einen Server hoch (nicht lokal auf deiner Maschine). Das kann zum Beispiel \u00fcber das Webhosting deiner pers\u00f6nlichen Website sein. Falls du keinen Zugang zu einem solchen Service hast, kannst du deine Bilder auch auf deinem <a href=\"https:\/\/medium.com\/@jeftachibiya360\/how-to-host-images-for-your-website-on-github-a98d917284c5\">GitHub-Account hosten<\/a>.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"LoRA-Training\"><\/span><strong>LoRA-Training<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><strong>Replicate<\/strong><\/h5>\n<p>Um Replicate zu nutzen, brauchst du als erstes einen GitHub-Account. Mit dem meldest du dich anschliessend auf der <a href=\"https:\/\/replicate.com\/\">Replicate-Website<\/a> an. Da Replicate ein kostenpflichtiger Service ist, musst du zus\u00e4tzlich auf deinem Profil eine Debit- oder Kreditkarte hinterlegen.<\/p>\n<p>Danach kann es an die Vorbereitung des eigentlichen Trainings gehen. Erstelle dazu zuerst einen <a href=\"https:\/\/replicate.com\/account\/api-tokens\">API-Token<\/a>. Hier bestimmst du das Trigger-Wort, welches du sp\u00e4ter verwenden wirst, um dein LoRA zu aktivieren. In unserem Beispiel bestimme ich das Wort &#171;PILATUS&#187; als Token.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7816\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-1000x141.png\" alt=\"\" width=\"1000\" height=\"141\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-1000x141.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-768x109.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-1536x217.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-848x120.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-1140x161.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-1170x165.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47-600x85.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.41.47.png 1598w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Nachdem du den Token geschaffen hast, wird eine <strong>Token-ID<\/strong> erstellt, die du sp\u00e4ter in dein Script einf\u00fcgen wirst.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7817\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-1000x115.png\" alt=\"\" width=\"1000\" height=\"115\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-1000x115.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-768x88.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-1536x177.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-848x98.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-1140x131.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-1170x135.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01-600x69.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.43.01.png 1600w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Als n\u00e4chstes erstellst du \u00fcber dein Dashboard unter &#171;Models&#187; ein neues Model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7818\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1000x101.png\" alt=\"\" width=\"1000\" height=\"101\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1000x101.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-768x78.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1536x155.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-2048x207.png 2048w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-848x86.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1140x115.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1170x118.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-1920x194.png 1920w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.44.44-600x61.png 600w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Hier gibst du deinem neuen <strong>Modell zuerst einen Namen<\/strong>. Der gew\u00e4hlte Name darf nur Kleinbuchstaben, Zahlen, Bindestriche, Unterstriche oder Punkte enthalten und darf nicht mit einem Bindestrich, Unterstrich oder Punkt beginnen oder enden.<\/p>\n<p>Danach w\u00e4hlst du aus, <strong>ob dein Modell privat oder \u00f6ffentlich zug\u00e4nglich sein soll<\/strong>. Wenn du dich f\u00fcr die Option &#171;Public&#187; entscheidest, wird dein LoRA von anderen Personen eingesehen und genutzt werden k\u00f6nnen.<\/p>\n<p>Bei der <strong>Hardware<\/strong> ist die Option &#171;Nvidia A40 (Large) GPU&#187; grunds\u00e4tzlich ein guter Kompromiss zwischen Leistung und Kosten. Du kannst dich nat\u00fcrlich auch genauer \u00fcber das Pricing und die Specs der entsprechenden Hardware informieren und darauf aufbauend die beste Option f\u00fcr dein Projekt ausw\u00e4hlen.<\/p>\n<p>Beim letzten Drop-Down-Men\u00fc w\u00e4hlen wir <strong>die Art des geplanten Modells<\/strong>. In unserem Fall erstellen wir ein &#171;Fine-tuned image model (e.g. SDXL)&#187;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7819\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-1000x941.png\" alt=\"\" width=\"1000\" height=\"941\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-1000x941.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-768x723.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-1536x1446.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-848x798.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-1140x1073.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-1170x1101.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50-600x565.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-13.47.50.png 1604w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Best\u00e4tige deine Auswahl mit &#171;Create&#187;. Anschliessend kannst du \u00fcber das Dashboard zur\u00fcck zu deinen &#171;Models&#187;. Kopiere hier den Pfad (Username\/Projektname) deines Projektes \u2013 du wirst ihn ebenfalls f\u00fcr dein Python-Sript ben\u00f6tigen.<\/p>\n<h5><strong>Python-Code<\/strong><\/h5>\n<p>Als n\u00e4chstes ladest du den Code f\u00fcr das Training <a href=\"https:\/\/github.com\/MediaDock\/Fine-Tune-SDXL-Model-with-Replicate\">hier<\/a> herunter. Bevor wir diesen anpassen k\u00f6nnen, m\u00fcssen wir noch <strong>die Replicate-Library f\u00fcr Python installieren<\/strong>. \u00d6ffne dazu ein neues Terminal-Fenster. Hier gibst du den Befehl <em>pip install replicate<\/em> (bei Python Version 2 oder \u00e4lter) oder <em>pip3 install replicate<\/em> (bei Python Version 3) ein. Nachdem das Packet installiert wurde, kannst du das Replicate.py-Script in der Python IDE (IDLE), oder einer anderen Umgebung deiner Wahl \u00f6ffnen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7823\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1000x356.png\" alt=\"\" width=\"1000\" height=\"356\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1000x356.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-768x274.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1536x547.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-2048x730.png 2048w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-848x302.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1140x406.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1170x417.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-1920x684.png 1920w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.36.53-600x214.png 600w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Hier passt du nun folgende Variablen an:<\/p>\n<ul>\n<li><strong>[&#171;REPLICATE_API_TOKEN&#187;]:<\/strong> Hier f\u00fcgst du die ID deines Tokens ein.<\/li>\n<li><strong>input_images:<\/strong> Hier f\u00fcgst du den Pfad zu deinem Dataset ein.<\/li>\n<li><strong>token_string:<\/strong> Hier f\u00fcgst du den Namen deines Tokens ein.<\/li>\n<li><strong>caption_prefix:<\/strong> Hier legst du fest, wie deine Bilder beschriftet werden. Inkorporiere den Namen deines Tokens in die Beschreibung.<\/li>\n<li><strong>use_face_detection_instead:<\/strong> Wenn du mit Fotos von Gesichtern arbeitest, \u00e4ndere diese Variable zu True.<\/li>\n<li><strong>destination:<\/strong> Hier f\u00fcgst du den Pfad (Username\/Projektname) deines Modells ein.<\/li>\n<\/ul>\n<p><strong>Im Anschluss kannst du das Scrip durch Run &gt; Run Module starten.<\/strong><\/p>\n<p>Sobald dein Script ohne Fehler ausgef\u00fchrt wurde, kannst du den Fortschritt deines Trainings \u00fcber dein Dashboard unter &#171;Trainings&#187; verfolgen.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Anwendung_des_Modells\"><\/span><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7822\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1000x240.png\" alt=\"\" width=\"1000\" height=\"240\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1000x240.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-768x184.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1536x368.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-2048x491.png 2048w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-848x203.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1140x273.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1170x280.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-1920x460.png 1920w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.18.55-600x144.png 600w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Anwendung des Modells<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Wenn das Training abgeschlossen ist (Status: Succeeded), kannst du dein Modell \u00fcber dein Dashboard unter &#171;Models&#187; aufrufen.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Prompt\"><\/span><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7821\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1000x202.png\" alt=\"\" width=\"1000\" height=\"202\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1000x202.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-768x155.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1536x310.png 1536w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-2048x413.png 2048w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-848x171.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1140x230.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1170x236.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-1920x387.png 1920w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.16.53-600x121.png 600w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Prompt<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Da wir mit einem Text-to-Language-Modell arbeiten, generieren wir unsere Bilder durch einen Prompt; ein Text, in dem wir das gew\u00fcnschte Resultat beschreiben. <strong>Wichtig ist, dass du beim prompt den vorher bestimmten Token, in unserem Fall &#171;PILATUS&#187;, einbaust.<\/strong> So wird das LoRA aktiviert. Es hilft ausserdem, wenn du deinen Prompt zudem durch Synonyme und assoziierte Stichworte in die gew\u00fcnschte Richtung &#171;lenkst&#187;. Im Falle des Pilatus-Modelles k\u00f6nnten das Inputs wie &#171;Mountain&#187; oder &#171;Landscape&#187; sein.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Weitere_Parameter\"><\/span><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7827\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-1000x413.png\" alt=\"\" width=\"1000\" height=\"413\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-1000x413.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-768x317.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-848x350.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-1140x470.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-1170x483.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17-600x248.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-14.48.17.png 1372w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Weitere Parameter<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Du kannst deinen Output noch durch die Anpassung (unter anderem) folgender Parameter verfeinern:<\/p>\n<ul>\n<li><strong>negative_prompt:<\/strong> Hier legst du fest, welche Elemente du NICHT auf dem generierten Bild w\u00fcnschst.<\/li>\n<li><strong>image:<\/strong> Hier kannst du ein Bild hochladen, welches dann als Ausgangslage f\u00fcr dein Modell genutzt wird.<\/li>\n<li><strong>width &amp; height:<\/strong> Die gew\u00fcnschte Breite und H\u00f6he des generierten Bildes, in Pixel.<\/li>\n<li><strong>num_outputs:<\/strong> Die gew\u00fcnschte Anzahl Outputs (1-4).<\/li>\n<li><strong>prompt_strength:<\/strong> Wenn du bei image ein Bild einf\u00fcgst, kannst du hier bestimmen, wie stark dein Prompt Einfluss darauf nehmen soll (0-1).<\/li>\n<li><strong>lora_scale:<\/strong> Hier legst du fest, wie stark das Finetuning durch dein eigenes Dataset Einfluss auf das generierte Bild nehmen soll (0-1).<\/li>\n<\/ul>\n<p>Danach clickst du nur noch auf <strong>&#171;Run&#187;<\/strong>!<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Die_Resultate\"><\/span><strong>Die Resultate<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Tada<\/p>\n<figure id=\"attachment_7828\" aria-describedby=\"caption-attachment-7828\" style=\"width: 1000px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7828\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-1000x535.png\" alt=\"\" width=\"1000\" height=\"535\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-1000x535.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-768x411.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-848x454.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-1140x610.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-1170x626.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50-600x321.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.04.50.png 1264w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-7828\" class=\"wp-caption-text\">The PILATUS on a snowy day.<\/figcaption><\/figure>\n<figure id=\"attachment_7830\" aria-describedby=\"caption-attachment-7830\" style=\"width: 1000px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7830\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-1000x863.png\" alt=\"\" width=\"1000\" height=\"863\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-1000x863.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-768x663.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-848x732.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-1140x983.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-1170x1009.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51-600x518.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.13.51.png 1194w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-7830\" class=\"wp-caption-text\">A photograph of mount PILATUS during a dramatic sunset.<\/figcaption><\/figure>\n<figure id=\"attachment_7831\" aria-describedby=\"caption-attachment-7831\" style=\"width: 1000px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7831\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-1000x598.png\" alt=\"\" width=\"1000\" height=\"598\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-1000x598.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-768x459.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-848x507.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-1140x682.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-1170x700.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31-600x359.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.14.31.png 1254w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-7831\" class=\"wp-caption-text\">A photograph of mount PILATUS during a dramatic sunset, again.<\/figcaption><\/figure>\n<figure id=\"attachment_7845\" aria-describedby=\"caption-attachment-7845\" style=\"width: 1000px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7845\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-1000x987.png\" alt=\"\" width=\"1000\" height=\"987\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-1000x987.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-768x758.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-848x837.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-1140x1125.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-1170x1155.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04-600x592.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.37.04.png 1252w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-7845\" class=\"wp-caption-text\">A moody picture of the PILATUS, foggy.<\/figcaption><\/figure>\n<figure id=\"attachment_7844\" aria-describedby=\"caption-attachment-7844\" style=\"width: 1000px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7844\" src=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-1000x1000.png\" alt=\"\" width=\"1000\" height=\"1000\" srcset=\"https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-1000x1000.png 1000w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-250x250.png 250w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-768x768.png 768w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-848x848.png 848w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-1140x1140.png 1140w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-1170x1170.png 1170w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07-600x600.png 600w, https:\/\/sites.hslu.ch\/werkstatt\/wp-content\/uploads\/sites\/13\/2024\/07\/Screenshot-2024-07-02-at-16.34.07.png 1230w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption id=\"caption-attachment-7844\" class=\"wp-caption-text\">A landscape photograph of the PILATUS with a dinosaur.<\/figcaption><\/figure>\n<p>[\/vc_column_text][\/vc_column][vc_column width=&#187;1\/3&#8243; el_class=&#187;dkw-col-micro&#187; offset=&#187;vc_col-lg-3&#8243;][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-dontprint&#187;][vc_row disable_element=&#187;yes&#187;][vc_column][vc_column_text]<span style=\"color: red\">\u2014 \u2014 \u2014 INFO: In beiden nachfolgenden Post Grids die passenden Recipies und die passenden Talks\u00a0 ausw\u00e4hlen \u2014 \u2014 \u2014<br \/>\n<\/span>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2>Passende Recipies<\/h2>\n<p>[\/vc_column_text][vc_basic_grid post_type=&#187;ids&#187; element_width=&#187;2&#8243; gap=&#187;10&#8243; item=&#187;517&#8243; css=&#187;&#187; grid_id=&#187;vc_gid:1726039405676-c590b570-e265-4&#8243; include=&#187;5625&#8243;][\/vc_column][\/vc_row][\/vc_section][vc_section el_class=&#187;dkw-dontprint&#187;][vc_row][vc_column][vc_column_text]<\/p>\n<h2>Passende Talks<\/h2>\n<p>[\/vc_column_text][vc_basic_grid post_type=&#187;ids&#187; element_width=&#187;2&#8243; gap=&#187;10&#8243; item=&#187;517&#8243; css=&#187;&#187; grid_id=&#187;vc_gid:1726039405676-ca768cda-4a65-0&#8243; include=&#187;2967, 5849&#8243;][\/vc_column][\/vc_row][\/vc_section]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_section el_class=&#187;dkw-section-lead&#187;][vc_row][vc_column width=&#187;2\/3&#8243; offset=&#187;vc_col-sm-offset-2&#8243;][vc_column_text css=&#187;&#187;]In diesem Recipie schauen wir uns an, wie wir ein Stable Diffusion Modell mit Replicate trainieren k\u00f6nnen, um einen bestimmten [&hellip;]<\/p>\n","protected":false},"author":50,"featured_media":7857,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15,11],"tags":[],"class_list":["post-7852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mediadock","category-recipies"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/7852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/comments?post=7852"}],"version-history":[{"count":2,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/7852\/revisions"}],"predecessor-version":[{"id":8147,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/posts\/7852\/revisions\/8147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/media\/7857"}],"wp:attachment":[{"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/media?parent=7852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/categories?post=7852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.hslu.ch\/werkstatt\/wp-json\/wp\/v2\/tags?post=7852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}