Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8365e23
French: image_prompting/fix_deformed_generations
hchiam May 4, 2025
3a04e21
remove fr fix_deformed_generations from missing.json
hchiam May 4, 2025
1180e34
French: image_prompting/intro
hchiam May 5, 2025
28b081a
remove fr image_prompting/intro from missing.json
hchiam May 5, 2025
5e5c423
French: image_prompting/midjourney
hchiam May 15, 2025
4f2a989
remove fr image_prompting/midjourney from missing.json
hchiam May 15, 2025
35e437f
French: image_prompting/quality_boosters
hchiam May 15, 2025
85796f3
French: image_prompting/repetition
hchiam May 15, 2025
f8a14d2
French: image_prompting/resources
hchiam May 15, 2025
8698ef1
French: image_prompting/shot_type
hchiam May 16, 2025
bb63f7c
French: image_prompting/style_modifiers
hchiam May 16, 2025
767be7b
French: image_prompting/weighted_terms
hchiam May 16, 2025
3c4c04f
French: intermediate/chain_of_thought
hchiam May 16, 2025
4830a25
French: intermediate/generated_knowledge
hchiam May 16, 2025
9157920
French: intermediate/least_to_most
hchiam May 16, 2025
00a5b22
French: intermediate/long_form_content
hchiam May 16, 2025
a86271c
French: intermediate/revisiting_roles
hchiam May 16, 2025
33b9fa6
French: intermediate/self_consistency
hchiam May 16, 2025
e143a79
French: intermediate/whats_in_a_prompt
hchiam May 16, 2025
1ddd3b9
French: intermediate/zero_shot_cot
hchiam May 16, 2025
e11ac9c
French: products
hchiam May 16, 2025
ca756c7
French: prompt_hacking/defensive_measures/filtering
hchiam May 16, 2025
3a3593e
French: prompt_hacking/defensive_measures/instruction
hchiam May 16, 2025
69ace20
French: prompt_hacking/defensive_measures/llm_eval
hchiam May 16, 2025
09b92a0
French: prompt_hacking/defensive_measures/other
hchiam May 16, 2025
9d10f9b
French: prompt_hacking/defensive_measures/post_prompting
hchiam May 16, 2025
262d361
French: prompt_hacking/defensive_measures/random_sequence
hchiam May 16, 2025
0375b46
French: prompt_hacking/defensive_measures/sandwich_defense
hchiam May 16, 2025
fb08f38
French: prompt_hacking/defensive_measures/xml_tagging
hchiam May 16, 2025
df844ff
French: prompt_hacking/injection
hchiam May 16, 2025
b5a1e0a
French: prompt_hacking/jailbreaking
hchiam May 16, 2025
1a0aae9
French: prompt_hacking/leaking
hchiam May 16, 2025
35e8ffd
French: prompt_hacking/offensive_measures/defined_dictionary
hchiam May 16, 2025
bddb605
French: prompt_hacking/offensive_measures/code_injection
hchiam May 16, 2025
1571afc
French: prompt_hacking/offensive_measures/obfuscation
hchiam May 16, 2025
77824c5
French: prompt_hacking/offensive_measures/payload_splitting
hchiam May 16, 2025
3b62254
French: prompt_hacking/offensive_measures/recursive_attack
hchiam May 16, 2025
cb6d1ee
French: reliability/math
hchiam May 16, 2025
d138264
French: prompt_hacking/offensive_measures/overview
hchiam May 16, 2025
0ed829f
French: trainable/discretized and trainable/soft_prompting
hchiam May 16, 2025
601b7d6
French: prompt_hacking/offensive_measures/indirect_injection and prom…
hchiam May 16, 2025
9e09f45
French: tooling/tools
hchiam May 16, 2025
2a51642
French: remove tooling/tools from missing.json
hchiam May 16, 2025
3481e0a
French: reliability/calibration
hchiam May 16, 2025
5b277a0
French: reliability/debiasing
hchiam May 16, 2025
ff0ffc6
French: reliability/ensembling
hchiam May 16, 2025
0955816
French: reliability/lm_self_eval
hchiam May 16, 2025
834871c
French: fix untranslated text in reliability/math
hchiam May 16, 2025
49998ef
French: tooling/IDEs
hchiam May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions (docs)/fr/docs/image_prompting/fix_deformed_generations/page.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
export const metadata = {
sidebar_position: 90,
title: "🟢 Fix Deformed Generations",
title: "🟢 Corriger les générations déformées",
};

# 🟢 Fix Deformed Generations
# 🟢 Corriger les générations déformées

Deformed generations, particularly on human body parts (e.g. hands, feet), are a common issue with many models. This can be dealt with to some extent with good negative prompts(@blake2022with). The following example is adapted from [this Reddit post](https://www.reddit.com/r/StableDiffusion/comments/z7salo/with_the_right_prompt_stable_diffusion_20_can_do/).
Les générations déformées, particulièrement sur les parties du corps humain (par exemple, les mains, les pieds), sont un problème courant avec de nombreux modèles. Cela peut être traité dans une certaine mesure avec de bons prompts négatifs(@blake2022with). L'exemple suivant est adapté de [ce post Reddit](https://www.reddit.com/r/StableDiffusion/comments/z7salo/with_the_right_prompt_stable_diffusion_20_can_do/).

## Example
## Exemple

Using Stable Diffusion v1.5 and the following prompt, we generate a nice image of Brad Pitt, except for his hands of course!
En utilisant Stable Diffusion v1.5 et le prompt suivant, nous générons une belle image de Brad Pitt, sauf pour ses mains bien sûr !

<AIInput>
studio medium portrait of Brad Pitt waving his hands, detailed, film, studio
lighting, 90mm lens, by Martin Schoeller:6
portrait studio moyen de Brad Pitt agitant ses mains, détaillé, film,
éclairage de studio, objectif 90mm, par Martin Schoeller:6
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -26,14 +26,15 @@ Using Stable Diffusion v1.5 and the following prompt, we generate a nice image o
/>
</div>

Using a robust negative prompt, we can generate much more convincing hands.
En utilisant un prompt négatif robuste, nous pouvons générer des mains beaucoup plus convaincantes.

<AIInput>
studio medium portrait of Brad Pitt waving his hands, detailed, film, studio
lighting, 90mm lens, by Martin Schoeller:6 | disfigured, deformed hands,
blurry, grainy, broken, cross-eyed, undead, photoshopped, overexposed,
underexposed, lowres, bad anatomy, bad hands, extra digits, fewer digits, bad
digit, bad ears, bad eyes, bad face, cropped: -5
portrait studio moyen de Brad Pitt agitant ses mains, détaillé, film,
éclairage de studio, objectif 90mm, par Martin Schoeller:6 | défiguré, mains
déformées, flou, granuleux, cassé, louchant, mort-vivant, photoshoppé,
surexposé, sous-exposé, basse résolution, mauvaise anatomie, mauvaises mains,
doigts supplémentaires, moins de doigts, mauvais doigt, mauvaises oreilles,
mauvais yeux, mauvais visage, recadré: -5
</AIInput>
<div style={{ textAlign: "center" }}>
<Image
Expand All @@ -44,11 +45,11 @@ Using a robust negative prompt, we can generate much more convincing hands.
/>
</div>

Using a similar negative prompt can help with other body parts as well. Unfortunately, this technique is not consistent, so you may need to attempt multiple generations
before getting a good result.
In the future, this type of prompting should be unnecessary since models will improve.
However, currently it is a very useful technique.
L'utilisation d'un prompt négatif similaire peut également aider pour d'autres parties du corps. Malheureusement, cette technique n'est pas constante, vous devrez peut-être faire plusieurs tentatives de génération
avant d'obtenir un bon résultat.
À l'avenir, ce type de prompting ne devrait plus être nécessaire car les modèles s'amélioreront.
Cependant, actuellement, c'est une technique très utile.

# Notes

Improved models such as [Protogen](https://civitai.com/models/3666/protogen-x34-official-release) are often better with hands, feet, etc.
Des modèles améliorés comme [Protogen](https://civitai.com/models/3666/protogen-x34-official-release) sont souvent meilleurs avec les mains, les pieds, etc.
132 changes: 66 additions & 66 deletions (docs)/fr/docs/image_prompting/intro/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@ export const metadata = { sidebar_position: 1, title: "🟢 Introduction" };

# 🟢 Introduction

Figuring out the best prompt to create a perfect image is a particular challenge.
Research into methods to do so is not quite as developed as text prompting. This
may be due to inherent challenges in creating objects which are fundamentally subjective
and often lack good accuracy metrics. However, fear not, as the image prompting
community(@parsons2022dalleprompt) has made great discoveries about how to prompt various image models(@rombach2021highresolution)(@ramesh2022hierarchical).
Trouver le meilleur prompt pour créer une image parfaite représente un défi particulier.
La recherche sur les méthodes pour y parvenir n'est pas aussi développée que pour le prompting textuel. Cela
peut être dû aux défis inhérents à la création d'objets qui sont fondamentalement subjectifs
et manquent souvent de bonnes métriques de précision. Cependant, ne vous inquiétez pas, car la communauté du prompting d'images(@parsons2022dalleprompt) a fait de grandes découvertes sur la façon de prompting divers modèles d'images(@rombach2021highresolution)(@ramesh2022hierarchical).

This guide covers basic image prompting techniques, and we highly encourage
that you look at the great resources at the end of the chapter.
Additionally, we provide an example of the end-to-end image prompting process below.
Ce guide couvre les techniques de base du prompting d'images, et nous vous encourageons vivement
à consulter les excellentes ressources à la fin du chapitre.
De plus, nous fournissons ci-dessous un exemple du processus complet de prompting d'images.

## Example
## Exemple

Here I will go through an example of how I created the images for the front page of this course.
I had been experimenting with low poly style for a deep reinforcement learning
neural radiance field project. I liked the low poly style, and wanted to use it
for this course's images.
Je vais vous présenter un exemple de la façon dont j'ai créé les images pour la page d'accueil de ce cours.
J'avais expérimenté le style low poly pour un projet de deep reinforcement learning
avec neural radiance field. J'ai aimé le style low poly et j'ai voulu l'utiliser
pour les images de ce cours.

I wanted an astronaut, a rocket, and a computer for the images on the front page.
Je voulais un astronaute, une fusée et un ordinateur pour les images de la page d'accueil.

I did a bunch of research into how to create low poly images, on [r/StableDiffusion](https://www.reddit.com/r/StableDiffusion/)
and other sites, but couldn't find anything super helpful.
J'ai fait beaucoup de recherches sur la façon de créer des images low poly, sur [r/StableDiffusion](https://www.reddit.com/r/StableDiffusion/)
et d'autres sites, mais je n'ai pas trouvé d'informations particulièrement utiles.

I decided to just start with DALLE and the following prompt, and see what happened.
J'ai décidé de commencer simplement avec DALLE et le prompt suivant, pour voir ce qui se passerait.

<AIInput>
Low poly white and blue rocket shooting to the moon in front of a sparse green
meadow
Fusée low poly blanche et bleue s'envolant vers la lune devant une prairie
verte clairsemée
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -51,13 +50,13 @@ I decided to just start with DALLE and the following prompt, and see what happen
/>
</div>

I thought these results were pretty decent for a first try; I particularly liked
the bottom left rocket.
J'ai trouvé que ces résultats étaient plutôt corrects pour un premier essai ; j'ai particulièrement aimé
la fusée en bas à gauche.

Next, I wanted a computer in the same style:
Ensuite, je voulais un ordinateur dans le même style :

<AIInput>
Low poly white and blue computer sitting in a sparse green meadow
Ordinateur low poly blanc et bleu posé dans une prairie verte clairsemée
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -70,11 +69,11 @@ Next, I wanted a computer in the same style:
/>
</div>

Finally, I needed an astronaut! This prompt seemed to do the trick:
Enfin, j'avais besoin d'un astronaute ! Ce prompt a semblé faire l'affaire :

<AIInput>
Low poly white and blue astronaut sitting in a sparse green meadow with low
poly mountains in the background
Astronaute low poly blanc et bleu assis dans une prairie verte clairsemée avec
des montagnes low poly en arrière-plan
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -87,20 +86,20 @@ Finally, I needed an astronaut! This prompt seemed to do the trick:
/>
</div>

I thought the second one was decent.
J'ai trouvé que le deuxième était correct.

Now I had an astronaut, a rocket, and a computer. I was happy with them,
so I put them on the front page. After a few days and input from my friends I
realized the style just wasn't consistent 😔.
Maintenant j'avais un astronaute, une fusée et un ordinateur. J'en étais content,
alors je les ai mis sur la page d'accueil. Après quelques jours et les commentaires de mes amis,
j'ai réalisé que le style n'était tout simplement pas cohérent 😔.

I did some more research on [r/StableDiffusion](https://www.reddit.com/r/StableDiffusion/) and found people using the word isometric. I decided to try that out, using Stable Diffusion instead of DALLE.
I also realized that I needed to add more modifiers to my prompt
to constrain the style. I tried this prompt:
J'ai fait plus de recherches sur [r/StableDiffusion](https://www.reddit.com/r/StableDiffusion/) et j'ai découvert que les gens utilisaient le mot isométrique. J'ai décidé d'essayer cela, en utilisant Stable Diffusion au lieu de DALLE.
J'ai également réalisé que je devais ajouter plus de modificateurs à mon prompt
pour contraindre le style. J'ai essayé ce prompt :

<AIInput>
A low poly world, with an astronaut in white suit and blue visor sitting in a
sparse green meadow with low poly mountains in the background. Highly
detailed, isometric, 4K
Un monde low poly, avec un astronaute en combinaison blanche et visière bleue
assis dans une prairie verte clairsemée avec des montagnes low poly en
arrière-plan. Très détaillé, isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -113,12 +112,12 @@ to constrain the style. I tried this prompt:
/>
</div>

These weren't great, so I decided to start on the rocket instead
Ce n'était pas génial, alors j'ai décidé de commencer par la fusée à la place

<AIInput>
A low poly world, with a white and blue rocket blasting off from a sparse
green meadow with low poly mountains in the background. Highly detailed,
isometric, 4K
Un monde low poly, avec une fusée blanche et bleue décollant d'une prairie
verte clairsemée avec des montagnes low poly en arrière-plan. Très détaillé,
isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -131,7 +130,7 @@ These weren't great, so I decided to start on the rocket instead
/>
</div>

These are not particularly good, but after a bit of iterating around here, I ended up with
Ce n'est pas particulièrement bon, mais après quelques itérations, j'ai fini par obtenir

<div style={{ textAlign: "center" }}>
<Image
Expand All @@ -143,12 +142,12 @@ These are not particularly good, but after a bit of iterating around here, I end
/>
</div>

Now I needed a better laptop:
Maintenant j'avais besoin d'un meilleur ordinateur portable :

<AIInput>
A low poly world, with a white and blue laptop sitting in sparse green meadow
with low poly mountains in the background. The screen is completely blue.
Highly detailed, isometric, 4K
Un monde low poly, avec un ordinateur portable blanc et bleu posé dans une
prairie verte clairsemée avec des montagnes low poly en arrière-plan. L'écran
est complètement bleu. Très détaillé, isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -161,12 +160,12 @@ Now I needed a better laptop:
/>
</div>

I got some inconsistent results; I like the bottom right one, but I decided to go in a different direction.
J'ai obtenu des résultats incohérents ; j'aime celui en bas à droite, mais j'ai décidé d'aller dans une direction différente.

<AIInput>
A low poly world, with a glowing white and blue gemstone sitting in a sparse
green meadow with low poly mountains in the background. Highly detailed,
isometric, 4K
Un monde low poly, avec une pierre précieuse blanche et bleue brillante posée
dans une prairie verte clairsemée avec des montagnes low poly en arrière-plan.
Très détaillé, isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -179,12 +178,13 @@ I got some inconsistent results; I like the bottom right one, but I decided to g
/>
</div>

This wasn't quite right. Let's try something magical and glowing.
Ce n'était pas tout à fait correct. Essayons quelque chose de magique et brillant.

<AIInput>
A low poly world, with a glowing white and blue gemstone magically floating in
the middle of the screen above a sparse green meadow with low poly mountains
in the background. Highly detailed, isometric, 4K
Un monde low poly, avec une pierre précieuse blanche et bleue brillante
flottant magiquement au milieu de l'écran au-dessus d'une prairie verte
clairsemée avec des montagnes low poly en arrière-plan. Très détaillé,
isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -197,12 +197,12 @@ This wasn't quite right. Let's try something magical and glowing.
/>
</div>

I liked these, but wanted the stone in the middle of the screen.
J'ai aimé celles-ci, mais je voulais la pierre au milieu de l'écran.

<AIInput>
A low poly world, with a glowing blue gemstone magically floating in the
middle of the screen above a sparse green meadow with low poly mountains in
the background. Highly detailed, isometric, 4K
Un monde low poly, avec une pierre précieuse bleue brillante flottant
magiquement au milieu de l'écran au-dessus d'une prairie verte clairsemée avec
des montagnes low poly en arrière-plan. Très détaillé, isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -215,8 +215,8 @@ I liked these, but wanted the stone in the middle of the screen.
/>
</div>

Somewhere around here, I used SD's ability to have a previous image provide some influence for future images.
And thus I arrived at:
Quelque part par ici, j'ai utilisé la capacité de SD à faire en sorte qu'une image précédente influence les futures images.
Et ainsi je suis arrivé à :

<div style={{ textAlign: "center" }}>
<Image
Expand All @@ -228,12 +228,12 @@ And thus I arrived at:
/>
</div>

Finally, I was on to the astronaut.
Enfin, j'en étais à l'astronaute.

<AIInput>
A low poly world, with an astronaut in white suite and blue visor is sitting
in a sparse green meadow with low poly mountains in the background. Highly
detailed, isometric, 4K
Un monde low poly, avec un astronaute en combinaison blanche et visière bleue
assis dans une prairie verte clairsemée avec des montagnes low poly en
arrière-plan. Très détaillé, isométrique, 4K
</AIInput>

<div style={{ textAlign: "center" }}>
Expand All @@ -246,6 +246,6 @@ Finally, I was on to the astronaut.
/>
</div>

At this point, I was sufficiently happy with the style consistency between my three images to use them
on the website. The main takeaways for me were that this was a very iterative, research heavy process,
and I had to modify my expectations and ideas as I experimented with different prompts and models.
À ce stade, j'étais suffisamment satisfait de la cohérence de style entre mes trois images pour les utiliser
sur le site web. Les principales leçons que j'ai tirées étaient que c'était un processus très itératif, nécessitant beaucoup de recherche,
et que j'ai dû modifier mes attentes et mes idées au fur et à mesure que j'expérimentais avec différents prompts et modèles.
Loading
Loading