Génerer des portrait avec chatGPT et Stable Diffusion

Découvrez comment utiliser l’IA d’OpenAI pour rapidement générez des protraits intéressants avec Stable Diffusion.

Génerer des portrait avec chatGPT et Stable Diffusion
Do not index
Do not index
Publish
Publish
ChatGPT peut-il générer des prompts de qualité pour créer des portrait avec Stable Diffusion ?
Je crois que la réponse est oui (Et je l’ai en fait utilisé pour toutes les images qui illustrent cette page) - Mais il faut un peu de méthode et de techniques spéciales pour obtenir ces prompts. Et une fois que vous saurez comment faire, les résultats vous surprendront.
Dans cet article, je vais vous montrer comment faire étape par étape.

Qu'est-ce que ChatGPT ?

ChatGPT est un chatbot lancé par Open AI en novembre 2022. Il est construit sur la base du large modèle de language GPT, qui a été entraîné avec des textes contenant des centaines de milliards de mots sur internet.
Si vous vous demandez quelle est la taille d'un livre avec des centaines de milliards de mots, sachez qu’il faudrait plus de cinq mille ans à une personne normale pour le lire.
Ce qui revient à dire que ChatGPT contient une énorme quantité de connaissances humaines. Et grâce à ca, Il peut générer des essais, des poèmes, des fictions et même des codes informatiques.

Comment a été entraîné ChatGPT ?

ChatGPT a été entraîné sur la base de GPT-3.5.
GPT-3 est lui-même un puissant modèle de language. Il fonctionne comme une saisie semi-automatique : Vous tapez quelques mots ou quelques phrases, le modèle prédit alors les mots les plus probables suivants.
En raison de la grande quantité de données sur lesquelles il a été entraîné, la saisie semi-automatique de GPT-3 est suralimentée. Il peut produire un essai de contenu cohérent et (parfois) précis.
Les formateurs humains ont joué un rôle important dans l'ajustement des réponses de ChatGPT. Le modèle a été entraîné à fournir des réponses que les formateurs humains donneraient. Les formateurs humains ont également classé les réponses de ChatGPT pendant la phase d'entraînement afin qu'il favorise les réponses que les humains préfèrent.

ChatGPT Connait-il Stable Diffusion ?

Malheureusement, la réponse est non.
Vous pouvez facilement le vérifier en demandant à ChatGPT la question "Qu'est-ce que Stable Diffusion ?". Sa réponse est
La Stable Diffusion est un concept utilisé en physique statistique pour décrire la diffusion d'une particule dans un milieu aléatoire ou chaotique. Il s'agit d'une forme de diffusion où la distance parcourue par la particule augmente de manière proportionnelle au temps écoulé, indépendamment de la nature des obstacles rencontrés […]
Ok, ce n’est peut-être pas du pur délire et il ne raconte pas forcément de foutaise… mais nous sommes de toutes façons d’accord pour dire qu’il ne parle pas de Stable Diffusion. Et c’est normal : les données d'entraînement utilisées pour ce modèle datent d'avant la sortie de la Stable Diffusion.
Heureusement, ChatGPT sait ce qu'est un modèle d’IA de texte-vers-image et connait même DALL·E (vous pouvez vérifier par vous-même).
Nous pouvons donc en profiter pour améliorer notre processus de génération de prompts.

Demander des prompts à chatGPT

Je vais tester ChatGPT en lui demandant de générer des prompts pour des portraits d'illustrations, l'un des domaines les plus difficiles à maîtriser. Voyons voir ce qu'il est capable de faire.

Portraits en gros plan

Il existe quatres techniques importantes pour obtenir des prompts de qualité pour Stable Diffusion avec ChatGPT :
  • Spécifier le style d'image. Vous devez demander un type d'image spécifique. Dans mon exemple, je demanderai une "portrait photoréaliste en gros plan".
  • Fixer le sujet. Je vais fixer le sujet comme l'actrice "Gwendoline Christie". Je ne suis pas (trop) fan de Gwendoline mais c’est une actrice que connait suffisament Stable Duffision et qui est suffisament reconnaissable. Non seulement cela changera le visage, mais cela influencera également fortement le style. Si le sujet n'est pas fixé, ChatGPT ridque d’utiliser une actrice différente dans chaque suggestion. Le style et la composition peuvent être modifiés simplement à cause du changement d’actrice - il vaut odnc mieux rester sur une seule actrice.
  • Fournir des exemples. En donnant deux exemples de suggestions, chatGPT comprendra facilement le type de résultat que je veux obtenir.
  • Traduire en anglais. Si chatGPT parle très bien le français, nous avons déjà constaté que Stabke Diffusion comprenait beaucoup mieux l’anglais.
Avec tout ca, nous allons donc commencer avec le prompt suivant :
Voici deux examples de prompts pour générer de superbes portrait photoréaliste en gros plan de Gwendoline Christie à l’aide d’un modèle d’inteligence artificielle text-to-image comme DALL-E : - portrait of beautiful happy Gwendoline Christie, ethereal, realistic anime, trending on pixiv, detailed, clean lines, sharp lines, crisp lines, award winning illustration, masterpiece, 4k, eugene de blaas and ross tran, vibrant color scheme, intricately detailed - alberto seveso and geo2099 style, A highly detailed and hyper realistic portrait of a gorgeous Gwendoline Christie, lisa frank, trending on artstation, butterflies, floral, sharp focus, studio photo, intricate details, highly detailed, by Tvera and wlop and artgerm Donne-moi d'autres exemples.
Et la réponse de chat GPT est
- A stunning, highly detailed and photorealistic portrait of Gwendoline Christie, with a dramatic and intense expression, inspired by the works of Alex Ross and J. Scott Campbell, featuring bold colors and sharp lines. - A dreamy and ethereal portrait of Gwendoline Christie, with a soft and angelic appearance, inspired by the works of Dave Rapoza and J.A.W. Cooper, featuring a pastel color palette and delicate details. - A bold and striking portrait of Gwendoline Christie, with a fierce and powerful expression, inspired by the works of Frank Frazetta and Simon Bisley, featuring strong contrasts and dramatic lighting.
Mettons ces prompts dans Stbale Diffusion. Je vais utiliser le 1.5, avec 25 steps sur l'échantillonneur DPM++ 2M Karras, échelle CFG 7 et une taille d'image de 512x704. Je vais aussi utiliser le prompt négatif universel suivant :
blur, ugly, tiling, bad art, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature, cut off, low contrast, underexposed, overexposed, beginner, amateur, distorted face
A stunning, highly detailed and photorealistic portrait of Gwendoline Christie, with a dramatic and intense expression, inspired by the works of Alex Ross and J. Scott Campbell, featuring bold colors and sharp lines
A stunning, highly detailed and photorealistic portrait of Gwendoline Christie, with a dramatic and intense expression, inspired by the works of Alex Ross and J. Scott Campbell, featuring bold colors and sharp lines
A dreamy and ethereal portrait of Gwendoline Christie, with a soft and angelic appearance, inspired by the works of Dave Rapoza and J.A.W. Cooper, featuring a pastel color palette and delicate details
A dreamy and ethereal portrait of Gwendoline Christie, with a soft and angelic appearance, inspired by the works of Dave Rapoza and J.A.W. Cooper, featuring a pastel color palette and delicate details
A bold and striking portrait of Gwendoline Christie, with a fierce and powerful expression, inspired by the works of Frank Frazetta and Simon Bisley, featuring strong contrasts and dramatic lighting.
A bold and striking portrait of Gwendoline Christie, with a fierce and powerful expression, inspired by the works of Frank Frazetta and Simon Bisley, featuring strong contrasts and dramatic lighting.
C’est pas mal du tout !
En fait, je suis agréablement surpris par la créativité des prompts et la diversité des styles qu'ils offrent. J'ai même appris de nouveaux mots-clés que je vais ajouter à mes prompts..

Portaits en plein-pied

Maintenant, essayons d’obtenir des des prompts pour une illustration en plein pied en affinant notre demande à ChatGPT.
En fait, il suffit d'ajouter “Plein pied” / “Full body” dans notre question et nos exemples de prompts :
Exemples de prompts de haute qualité pour une illustration photoréaliste en plein corps époustouflante d'Ana de Armas pour les modèles de text-to-image (Stable Diffusion, Midjourney ou Dalle2) :
Voici deux examples de prompts pour générer de superbes portrait photoréaliste en plein pied de Gwendoline Christie à l’aide d’un modèle d’inteligence artificielle text-to-image comme DALL-E : - full body portrait of beautiful happy Gwendoline Christie, ethereal, realistic anime, trending on pixiv, detailed, clean lines, sharp lines, crisp lines, award winning illustration, masterpiece, 4k, eugene de blaas and ross tran, vibrant color scheme, intricately detailed - alberto seveso and geo2099 style, A highly detailed and hyper realistic full body portrait of a gorgeous Gwendoline Christie, lisa frank, trending on artstation, butterflies, floral, sharp focus, studio photo, intricate details, highly detailed, by Tvera and wlop and artgerm Donne-moi d'autres exemples.
Cette fois, chatGPT m’a retourné 4 promps :
- A photorealistic full body portrait of Gwendoline Christie in a fierce and powerful pose, inspired by the work of Alex Ross and David Finch, with bold lines and sharp details, in a dark and moody setting. - A hyperrealistic full body portrait of Gwendoline Christie in a regal and elegant pose, inspired by the work of Yoshitaka Amano and Hidetaka Miyazaki, with intricate and detailed armor, in a fantasy and medieval theme. - A realistic full body portrait of Gwendoline Christie with a soft and serene expression, in a natural and idyllic setting, inspired by the work of Bob Ross and Thomas Kinkade, with a harmonious color scheme and delicate brushstrokes. - A full body portrait of Gwendoline Christie with a mysterious and enigmatic expression, in a cyberpunk and futuristic setting, inspired by the work of Syd Mead and Masamune Shirow, with a neon and metallic color scheme and advanced technology.
Et voici les résultats en images :
A photorealistic full body portrait of Gwendoline Christie in a fierce and powerful pose, inspired by the work of Alex Ross and David Finch, with bold lines and sharp details, in a dark and moody setting.
A photorealistic full body portrait of Gwendoline Christie in a fierce and powerful pose, inspired by the work of Alex Ross and David Finch, with bold lines and sharp details, in a dark and moody setting.
A hyperrealistic full body portrait of Gwendoline Christie in a regal and elegant pose, inspired by the work of Yoshitaka Amano and Hidetaka Miyazaki, with intricate and detailed armor, in a fantasy and medieval theme.
A hyperrealistic full body portrait of Gwendoline Christie in a regal and elegant pose, inspired by the work of Yoshitaka Amano and Hidetaka Miyazaki, with intricate and detailed armor, in a fantasy and medieval theme.
A realistic full body portrait of Gwendoline Christie with a soft and serene expression, in a natural and idyllic setting, inspired by the work of Bob Ross and Thomas Kinkade, with a harmonious color scheme and delicate brushstrokes.
A realistic full body portrait of Gwendoline Christie with a soft and serene expression, in a natural and idyllic setting, inspired by the work of Bob Ross and Thomas Kinkade, with a harmonious color scheme and delicate brushstrokes.
A full body portrait of Gwendoline Christie with a mysterious and enigmatic expression, in a cyberpunk and futuristic setting, inspired by the work of Syd Mead and Masamune Shirow, with a neon and metallic color scheme and advanced technology.
A full body portrait of Gwendoline Christie with a mysterious and enigmatic expression, in a cyberpunk and futuristic setting, inspired by the work of Syd Mead and Masamune Shirow, with a neon and metallic color scheme and advanced technology.
Ce sont encore des résultats intéressants et plutôt réussis !

Demandez en plus !

Si vous aimez un prompt particulier que ChatGPT a proposé, vous pouvez demander quelque chose comme
J'aime beaucoup la première. Donne moi plus d'exemples comme celui-là
ChatGPT vous donnera plus de variantes du même style.
A full body portrait of Gwendoline Christie in a dramatic and intense pose, inspired by the work of John Singer Sargent and John Singer Sargent, with rich colors and dynamic lighting, in a historical and romantic setting
A full body portrait of Gwendoline Christie in a dramatic and intense pose, inspired by the work of John Singer Sargent and John Singer Sargent, with rich colors and dynamic lighting, in a historical and romantic setting
A full body portrait of Gwendoline Christie in a heroic and fearless pose, inspired by the work of Alex Ross and Alex Ross, with realistic details and a cinematic composition, in a superhero and action setting
A full body portrait of Gwendoline Christie in a heroic and fearless pose, inspired by the work of Alex Ross and Alex Ross, with realistic details and a cinematic composition, in a superhero and action setting
A full body portrait of Gwendoline Christie in a heroic and fearless pose, inspired by the work of Alex Ross and Alex Ross, with realistic details and a cinematic composition, in a superhero and action setting
A full body portrait of Gwendoline Christie in a heroic and fearless pose, inspired by the work of Alex Ross and Alex Ross, with realistic details and a cinematic composition, in a superhero and action setting

Conclusion

ChatGPT peut-il générer des prompts de haute qualité pour des portraits avec Stable Diffusion ? La réponse est clairement OUI. Mais vous devez suivre ces trois directives: (1) spécifier le style d'image, (2) fixer le sujet et (3) fournir des exemples de départ.
ChatGPT est encore et toujours gratuit à l'heure où j’écris ces ligne. Allez-donc y générer quelques prompts avant qu'ils ne commencent à facturer ;-)
 

Payer une seule fois pour un accès à vie à la génération d’image avec Stable Diffusion et Diffus

🔥 Lifetime Deal à -60% 🔥

Profiter de l'offre

Ecrit par