Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_meta_box_present is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_send_notification is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_modify_title_and_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_heading is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_wordproof_timestamp is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$response_body is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Mettete il turbo a Stable Diffusion: creare e modificare immagini alla velocità della luce | IlSoftware.it

Mettete il turbo a Stable Diffusion: creare e modificare immagini alla velocità della luce

Velocizzare la generazione di immagini in locale senza appoggiarsi al cloud: come mettere il turbo a Stable Diffusion grazie al progetto WebUI Forge.

Uno dei modelli di intelligenza artificiale generativa più apprezzati e utilizzati, in grado di produrre immagini fotorealistiche, è Stable Diffusion. Si differenzia da altri modelli di generazione di immagini perché riduce significativamente i requisiti di elaborazione: può funzionare su desktop con una GPU NVidia basata su 8 GB di memoria RAM (VRAM).

Per utilizzare Stable Diffusion, è necessario fornire un prompt ovvero la descrizione dell’immagine, della scena o dell’oggetto che si desiderano ottenere. La qualità dell’immagine generata dipende, a sua volta, dalla qualità del prompt specificato come input.

Il codice sorgente e i pesi del modello sono stati rilasciati pubblicamente; inoltre, la licenza Creative ML OpenRAIL-M consente di utilizzare, modificare e ridistribuire il software modificato. Lo sviluppatore che realizzasse software derivato a partire da Stable Diffusion deve condividerlo con la stessa licenza e includere una copia della licenza originale di Stable Diffusion.

Durante la fase di addestramento di Stable Diffusion è stato utilizzato un enorme insieme di immagini di riferimento. Con l’aggiunta di rumore in una serie di passaggi successivi, si può fare in modo che il modello utilizzi un processo di diffusione inversa per ricreare l’immagine.

Nei modelli generativi, lo “spazio latente” è un’astrazione di dimensioni inferiori rispetto allo spazio delle caratteristiche dell’immagine reale. È un modo di rappresentare concetti astratti o caratteristiche rilevanti in un formato più compatto. Ecco perché, grazie all’uso di uno spazio latente ridotto, Stable Diffusion sa coniugare risultati eccellenti con un impatto tutto sommato modesto sull’hardware.

Stable Diffusion WebUI Forge: come mettere il turbo a Stable Diffusion

Oggi si contano un gran numero di interfacce per Stable Diffusion elaborate da sviluppatori indipendenti, in tutto il mondo. Tra le più promettenti, che vi invitiamo a provare, c’è sicuramente Stable Diffusion <i>WebUI Forge.

Si tratta di un’interfaccia innovativa creata dallo stesso autore di ControlNet che permette di creare immagini ed elaborarle molto più velocemente rispetto agli approcci più tradizionali, facendo però leva sempre sul modello Stable Diffusion.

Per gli utenti Windows con un sistema basato su GPU NVidia con almeno 8 GB di RAM, il consiglio è quello di visitare questa pagina su GitHub quindi fare clic sul link “Click Here to Download One-Click Package“.

Stable Diffusion Web UI Forge

Al termine del download, che può richiedere del tempo (l’archivio compresso pesa circa 1,7 GB), si ottiene un file in formato .7z da aprire con l’utilità 7-Zip. Il suo contenuto deve essere estratto in una cartella locale, ad esempio c:\sd. Per l’operazione, suggeriamo di ricorrere comunque al programma 7-Zip perché al momento della stesura di quest’articolo, le prestazioni assicurate da Windows 11 per la gestione dei file .7z sono sicuramente inferiori.

Il passaggio seguente consiste nel fare doppio clic sul file update.bat per aggiornare Stable Diffusion WebUI Forge all’ultima versione in maniera del tutto automatica.

Avviare l’interfaccia e usarla da browser Web

In qualunque momento, per iniziare a utilizzare Stable Diffusion WebUI Forge, è necessario fare doppio clic sul file c:\sd\run.bat. Soltanto la prima volta, viene eseguito un passaggio in più che consiste nel download e nell’installazione di alcuni componenti software aggiuntivi.

Il pacchetto Stable Diffusion WebUI Forge di fatto installa un server Web locale che risponde all’indirizzo localhost, sulla porta indicata. La pagina che compare nel browser Web configurato come predefinito sul sistema in uso consente di configurare nel dettaglio il tipo di immagine che si desidera ottenere.

Per svolgere un primo test, basta cliccare sulla scheda txt2img (che sta per “da testo a immagine”), inserire una descrizione nel riquadro Prompt cercando di essere il più possibile chiari e precisi nel descrivere ciò che si desidera generare. Il pulsante Generate consente di richiedere la generazione dell’immagine a partire dall’input fornito.

Confrontando i risultati velocistici di Stable Diffusion WebUI Forge rispetto all’implementazione originale, si possono ottenere immagini riducendo i tempi di generazione fino al 75%, a seconda della configurazione in uso.

Stable Diffusion, generare immagini con il turbo

Aggiungere altri modelli è molto semplice

Utilizzare altri modelli in combinazione con Stable Diffusion può rivelarsi molto utile. Stable Diffusion da solo potrebbe non essere sufficiente per determinati compiti o per ottenere immagini complesse.

Un progetto come Stable Diffusion WebUI Forge permette di estendere le abilità di generazione di immagini e consentire una maggiore flessibilità in output. Ad esempio, l’utilizzo di modelli testo-immagine specializzati, in combinazione con Stable Diffusion, consente di generare immagini fotorealistiche a partire da descrizioni testuali, ampliando enormemente le possibilità creative.

SDXL, pubblicato sempre da Stability AI, può essere ad esempio scaricato da questa pagina quindi salvato nella cartella c:\sd\webui\models\Stable-diffusion. Proprio dove c’è un file di testo dal nome Put Stable Diffusion checkpoints here.txt.

Riavviando Stable Diffusion WebUI Forge, con un clic sul menu a tendina Stable Diffusion checkpoint, si può scegliere il modello aggiuntivo (in questo caso SDXL 1.0) per poi fare clic sul pulsante a destra che consente di richiederne il caricamento vero e proprio.

Aggiunta nuovi modelli Stable Diffusion

Cosa impossibile con l’implementazione originale, con Stable Diffusion WebUI Forge diventa possibile usare in aggiunta anche ControlNet, una struttura di rete neurale progettata per controllare i modelli di diffusione aggiungendo condizioni extra.

ControlNet si collega con Stable Diffusion fornendo un meccanismo per influenzare e controllare il processo di generazione delle immagini. Integrando ControlNet con Stable Diffusion, gli utenti possono introdurre condizioni aggiuntive o specifiche per guidare la generazione delle immagini in modo più preciso e personalizzato. Date un’occhiata agli esempi pratici disponibili in questi paragrafi.

Credit immagine in apertura: iStock.com – BlackJack3D

Ti consigliamo anche

Link copiato negli appunti