← Talk overview

DevFest Nantes 2025 ↗

Beautifying QR Codes in the Age of GenAI

Nantes, France · 2025 · French

Raphaël Semeteys

Comment Stable Diffusion et ComfyUI permettent de transformer des QR Codes fonctionnels en expériences visuelles originales tout en conservant leur lisibilité.

Description shown in the presentation language. (French)

If the player is unavailable, use the timestamp links.

Read transcript
  1. 0:05 For this short session, we get to enjoy something a little
  2. 0:07 fun and a little lighthearted.
  3. 0:09 We'll be welcoming Raphaël Semeteys, who will be presenting, among other things,
  4. 0:14 Some tips for making our QR codes look better, especially the ones where you
  5. 0:19 You can leave feedback or other comments. So it'll be fun.
  6. 0:22 Raphaël is a Developer Relations Specialist at Worldline.
  7. 0:25 He's an architect; he does all kinds of things.
  8. 0:27 He's even a yoga instructor.
  9. 0:28 So I'll let you enjoy his little rant about QR codes
  10. 0:34 and enter his world.
  11. 0:36 I'll hand it over to you, Raphaël. Thank you, thank you.
  12. 0:39 Hello, everyone. Thank you for sticking with me this long.
  13. 0:41 That's the very end of DevFest Nantes.
  14. 0:45 Right before the closing keynote, we're going to talk - thanks
  15. 0:48 Ambre for the intro -
  16. 0:49 about QR codes and what we can do to make them look better
  17. 0:54 in the age of GenAI.
  18. 0:56 You introduced me—no need to say anything else except that I'm a geek.
  19. 1:01 Yes, I co-host a podcast called "Projets libres" about open source,
  20. 1:05 in French. Go check it out—it's great.
  21. 1:09 What I suggest is that we start by just reviewing
  22. 1:12 a couple of quick basics about QR codes to help you
  23. 1:16 understand how it works.
  24. 1:17 And then we'll play around with GenAI on that.
  25. 1:20 So, QR codes were developed in 1994
  26. 1:25 It was developed in Japan by this man, Masahiro Hara, at Toyota,
  27. 1:30 and became an ISO standard in 2000
  28. 1:32 and we can see that it's still going strong, since last year,
  29. 1:34 there had still been an update to the spec.
  30. 1:38 It is said to be inspired by the game of Go.
  31. 1:40 Actually, it's a 2D version of the barcodes we were already familiar with
  32. 1:43 with black squares on a white background or vice versa—it depends
  33. 1:46 how we see things.
  34. 1:47 It allows you to store digital content, alphanumeric characters,
  35. 1:51 binary data, or kanji.
  36. 1:52 We can see the Japanese origins of this.
  37. 1:54 They come in several sizes, which are defined in the specification or "versions",
  38. 1:59 that's the official name in the spec for V1, which is 21 squares by 21,
  39. 2:04 Up to the V40, it's 177.
  40. 2:06 And in fact, each version is four times larger than the previous one.
  41. 2:11 There are also a number of things that are in the spec.
  42. 2:13 I'm not going to go into all the details.
  43. 2:15 There's one thing that's important: it's a built-in mechanism
  44. 2:17 error correction.
  45. 2:18 That's what makes it possible to scan QR codes, even when they're
  46. 2:21 partially illegible or damaged.
  47. 2:24 The Anatomy of a QR Code.
  48. 2:26 There are therefore certain requirements that are defined and
  49. 2:30 mandatory for
  50. 2:32 QR code readers can scan the code.
  51. 2:35 There are elements that make it easy to read.
  52. 2:37 So, we see this concept of a "white zone" that will
  53. 2:41 outline the QR code and the position markers—also known as the "eyes."
  54. 2:46 So, those are the three squares you'll find.
  55. 2:49 And that will allow a scanner to recognize: "This is a QR code."
  56. 2:53 So, I can definitely recognize the QR code.
  57. 2:55 There is also an alignment pattern, a
  58. 3:00 or more than one, which can be placed within the QR
  59. 3:02 code—it's the little eye, if we
  60. 3:04 means right there, in the lower right corner.
  61. 3:07 And that helps with orientation, since sometimes we're not always
  62. 3:11 directly in front of the QR code, so that's how you handle it.
  63. 3:15 Depending on the version—and there are several of them—but in this case,
  64. 3:17 I'm on version 3, 29 out of 29, so right now, I only need one.
  65. 3:20 And all of that is defined in the standard.
  66. 3:22 And so the content is stored in binary format.
  67. 3:25 A black square is worth 1, and a white square is worth 0.
  68. 3:28 The dotted lines you see here help to set
  69. 3:32 the size of a module.
  70. 3:34 A square is called a "module" in the spec.
  71. 3:37 So when the scanner looks at this, it will determine the size of the module.
  72. 3:42 And then, we have metadata.
  73. 3:44 That's what I highlighted in blue.
  74. 3:45 We'll store things in designated areas within the QR code
  75. 3:48 such as the format and, consequently, the level of error correction used.
  76. 3:52 We'll talk about that.
  77. 3:53 I'm not going to talk about the masking patterns or the version itself.
  78. 3:58 So, starting from there, beginning at the bottom, right there on the right,
  79. 4:03 By moving up in a zigzag pattern, you can start storing the contents.
  80. 4:08 So here, I've put a white square, so that's a zero.
  81. 4:10 And then there's one.
  82. 4:11 And now I'm zigzagging my way back up, one-one, one-one, one-zero.
  83. 4:15 There you go.
  84. 4:15 So, we fill in all the gray areas like this, then we go back down,
  85. 4:18 Then we're done, and we head back up. That's how a QR code works.
  86. 4:21 The error-correction mechanism—that's what interests me.
  87. 4:26 That, as I said, makes it possible to always display the QR code
  88. 4:30 usable, even when it is partially damaged.
  89. 4:32 This is done by adding additional data that will compensate for it
  90. 4:35 any missing data.
  91. 4:37 That will add rows and columns, so it will increase the size, so
  92. 4:42 the QR code version, possibly.
  93. 4:44 The implementation is the Reed-Solomon algorithm.
  94. 4:48 That's common knowledge.
  95. 4:49 I'll spare you the details of polynomial algebra
  96. 4:52 and finite bodies, but these are mechanisms that are
  97. 4:55 used for DVD storage, for one thing, or in RAID 6 configurations,
  98. 4:59 on disk security, as well as on network communications
  99. 5:02 such as DSL or certain types of satellite communications.
  100. 5:05 So, it's not something completely new.
  101. 5:07 since QR codes aren't exactly a brand-new concept either.
  102. 5:10 Basically, it works with 8-bit codewords that are either codewords of
  103. 5:14 data, or correction codewords.
  104. 5:17 And then, they will be stored using the mechanisms I described.
  105. 5:21 There are four possible levels of correction.
  106. 5:23 So, it ranges from low to high.
  107. 5:25 And depending on the level, it ranges from about 7% to 30% of the QR
  108. 5:30 code that may still be unreadable.
  109. 5:32 But with this error-correction mechanism, we'll be able to
  110. 5:35 reconstruct the data.
  111. 5:36 And that's what has historically been used to customize QR codes.
  112. 5:41 Because, actually, I put my company's logo there, so I'm working
  113. 5:45 At Worldline, yes, we know that.
  114. 5:47 It was placed there, in the middle of the QR code.
  115. 5:49 And actually, the scanners will interpret that as an error.
  116. 5:53 So, it needs to fall between 7% and 30%, depending on
  117. 5:56 of the QR code version.
  118. 5:58 That's the trick—it's a hack that lets you always scan the QR code
  119. 6:02 code by inserting an image into it. Okay?
  120. 6:05 So that's the standard way, so to speak, of generating QR codes.
  121. 6:10 So now, what could be more fun than that?
  122. 6:14 Because this time, I changed the color and then added a logo.
  123. 6:17 What could be more fun than that in the age of image generation
  124. 6:21 and therefore AI?
  125. 6:23 Part Two.
  126. 6:25 What I'm going to do is...
  127. 6:28 For those who know me, I come from the world of open source, so to speak
  128. 6:32 and I really like doing things locally.
  129. 6:35 For me, my use case was: I want to do all of this, run the models,
  130. 6:39 run everything on this PC.
  131. 6:40 That's another important thing, too.
  132. 6:42 What I did was decide to use
  133. 6:45 Stable Diffusion, which is a family of image
  134. 6:47 generation models.
  135. 6:50 I chose a version that isn't very recent because, for my
  136. 6:53 use case it's enough.
  137. 6:55 It's a smaller model than the more recent ones, such as Flux, etc.,
  138. 6:58 which can also be run locally.
  139. 7:01 How does Stable Diffusion work?
  140. 7:03 It performs progressive noise reduction on an image.
  141. 7:05 It takes a noisy image or an image that I provide as input
  142. 7:09 and by working in steps, it will progressively remove the noise.
  143. 7:13 He reduces the noise by adding elements to the image that will
  144. 7:18 follow the prompts.
  145. 7:19 This is the text where I'll describe what I want to appear in the image
  146. 7:23 and possibly an image, if I provide one as input.
  147. 7:26 This is a family of models that are referred to as "open,"
  148. 7:30 in the sense that we can retrieve the weights and thus run the model
  149. 7:34 locally, and possibly adapt it, fine-tune it, and create derivative versions of it.
  150. 7:39 There is a de facto community centered around this openness that
  151. 7:42 is quite dynamic.
  152. 7:43 There are quite a few components available, including ComfyUI, which is a front-end
  153. 7:48 or a GUI that's also installed locally, which will run right
  154. 7:51 there on my PC, and
  155. 7:53 as we can see, it allows you to create workflows.
  156. 7:56 This is the image positioned a the bottom.
  157. 7:58 So it's completely no-code.
  158. 8:00 You can't tell it's written in Python—everything's fine.
  159. 8:04 Because there's a lot going on behind those knots.
  160. 8:06 We're going to run some models, we're going to run...
  161. 8:09 You'll see some things that we're going to add to our workflows.
  162. 8:12 But it's very modular.
  163. 8:14 In this case, it really is open source—GPL v3.
  164. 8:17 That openness means there's a community that contributes
  165. 8:20 a lot of extensions.
  166. 8:22 They're called "custom nodes" in ComfyUI, and they have the advantage of
  167. 8:26 to also run on Windows, Mac, and Linux.
  168. 8:32 For ControlNets, what I need is,
  169. 8:34 I need to have a technique because what I'm going to do is,
  170. 8:37 It's just that I'm going to use a ControlNet that I've already
  171. 8:39 generated, because for generating
  172. 8:40 ControlNets, there are plenty of libraries that do that,
  173. 8:42 There are plenty of websites that do that, etc.
  174. 8:44 So I didn't include that in my workflow—I could have,
  175. 8:46 But that's not necessary.
  176. 8:48 I want to have a ControlNet as input to modify it using my workflows
  177. 8:52 to turn it into something else.
  178. 8:54 So what did I say !?
  179. 8:56 ControlNet ? I meant QR code.
  180. 8:57 And what I'm going to use for that is a technique called
  181. 9:01 ControlNet—that's why I slipped up.
  182. 9:03 So, what is ControlNet?
  183. 9:05 These are additional components that I'll be able to add to my
  184. 9:08 workflows, and these correspond to additional AI models that enable
  185. 9:13 to add an additional check to the generation process.
  186. 9:17 What I need to explain a little is this latent space that you
  187. 9:21 may have seen in a previous slide.
  188. 9:23 In fact, Stable Diffusion—and that's the original innovation
  189. 9:26 of Stable Diffusion is that it doesn't work
  190. 9:28 on the pixels and on the image itself; it works on a compressed version
  191. 9:33 and represented in a multidimensional vector space,
  192. 9:37 kind of like LLMs, in general, with the concept of embeddings and all that,
  193. 9:40 We're on the same concepts.
  194. 9:42 That's where all that denoising process I told you about will take place, and so on.
  195. 9:46 And once the image has been captured, it will then be encoded
  196. 9:49 in pixels and displayed.
  197. 9:50 And ControlNets—they allow you to influence this
  198. 9:54 the mechanism that takes place in that latent space by extracting only certain
  199. 9:59 characteristics of an image that I could provide as input.
  200. 10:01 And what I want here is a specialized ControlNet
  201. 10:04 on: I recognize that this is a QR code, and I'm going to retrieve these
  202. 10:08 features to make sure that when you create a new image,
  203. 10:11 you transfer the characteristics of the QR code.
  204. 10:14 I use a specialized ControlNet called QR Code Monster,
  205. 10:19 whose purpose is precisely to do that and ensure that it remains readable,
  206. 10:22 Of course, because otherwise, it's not very useful.
  207. 10:25 So, what I'm suggesting is that we give it a try.
  208. 10:27 What I did was record,
  209. 10:29 and I assure you that everything was done on that PC, but I recorded my
  210. 10:33 executions—because I want to show you several examples, so I sped them up
  211. 10:36 because otherwise, it just doesn't
  212. 10:38 hold together at all in 20 minutes.
  213. 10:40 Okay? From here on, I'll show you this
  214. 10:43 I don't know if you can see much, but in any case, you can see that there are some
  215. 10:46 boxes that are linked to one another.
  216. 10:48 The green box is the prompt.
  217. 10:50 Basically, what I'm saying is that I want a rural landscape with the sky
  218. 10:55 blue, flowers, etc.
  219. 10:56 The red box represents the negative prompt—what I don't want
  220. 10:59 to see in the image.
  221. 11:00 So, it allows for more precise control over things.
  222. 11:02 The blue section at the bottom contains the items that are
  223. 11:05 related to my ControlNet.
  224. 11:06 You see, I gave my QR code as an input.
  225. 11:09 And here, in the boxes below, I'll choose the version
  226. 11:12 the ControlNet I'm going to use.
  227. 11:13 This is the version for Stable Diffusion 1.5,
  228. 11:15 since that's the model I loaded.
  229. 11:18 I can configure a number of things here.
  230. 11:21 And then, when it comes to the KSampler, that's really where all the action happens
  231. 11:24 mathematics, matrix operations in latent space.
  232. 11:27 So, I'm going to do it in 50 steps.
  233. 11:29 Guidance refers to the impact of the prompt on the generation.
  234. 11:34 And at that point, I didn't speed it up.
  235. 11:36 That's so you can see what's on my PC—this PC has an NVIDIA
  236. 11:39 4070 graphics card, and it
  237. 11:41 has only 8 GB of VRAM, which is actually pretty low for this kind of thing.
  238. 11:46 So here, you can see how long it takes to generate.
  239. 11:49 See, there's the seed right there.
  240. 11:50 I don't know if you can read this, but that's the random part
  241. 11:53 which is used to create the random image
  242. 11:56 which is used at the beginning for denoising.
  243. 12:00 Okay?
  244. 12:00 As you can see, I get this kind of result.
  245. 12:03 So, what was I able to achieve?
  246. 12:06 With my workflow, I was able to...
  247. 12:07 You saw it in the previous workflow; here, I have a few boxes,
  248. 12:11 It's pretty simple in that regard, but I already have
  249. 12:14 a ControlNet at the bottom, but you see, the more boxes I add, the more I have
  250. 12:18 parameters I can adjust.
  251. 12:19 So that gives you more precise control, but at the same time, it can be a little...
  252. 12:25 It's easy to get lost with all these settings.
  253. 12:28 It takes a little fine-tuning to find the right workflow, but once you do,
  254. 12:31 Once you have the workflow, you're all set.
  255. 12:32 So, we're capable of doing that.
  256. 12:34 If I fix the seed—that is, if I say, “I don’t want
  257. 12:38 random elements in my workflow".
  258. 12:40 There's one thing you need to understand about Stable Diffusion:
  259. 12:41 the same settings on the same workflow,
  260. 12:46 with the same values, will always generate the same image—every time.
  261. 12:49 It's math—there's no magic involved, really.
  262. 12:51 It's math—it involves matrix operations performed in latent space.
  263. 12:54 So, the guys who made ComfyUI are really smart because they
  264. 12:57 said: "We're going to put all of these elements into the metadata."
  265. 12:59 Image EXIF data.
  266. 13:01 That means an image that was generated using ComfyUI,
  267. 13:03 I just drag and drop on the ComfyUI interface, and boom—I've got my workflow
  268. 13:06 that made it possible to generate it. Awesome.
  269. 13:08 Okay.
  270. 13:09 So, if I set the seed, I can, for example, change the prompt.
  271. 13:13 Here, I used the same image and the same settings, and here I say:
  272. 13:17 I can play around with the style.
  273. 13:18 So, I'm going to say: I want it to be a bit like a futuristic building.
  274. 13:23 That's what you get.
  275. 13:24 On the other hand, it's clear that I'm having a little
  276. 13:28 more trouble with the image's content,
  277. 13:30 My tango dancers—they're a little stuck in the QR code.
  278. 13:35 They're a little weird. We'll deal with this later.
  279. 13:37 Let's focus on the style first, and then we'll see what we can do
  280. 13:40 on the content and see if we can do things a little better.
  281. 13:45 Okay?
  282. 13:45 So, when it comes to style, what I can do is have
  283. 13:48 some slightly more advanced prompts.
  284. 13:49 Same thing here—it's still the same workflow; I just changed the prompt.
  285. 13:52 So I went to an LLM and asked it: "Give me a prompt."
  286. 13:57 A nice way to depict something a little elven,
  287. 14:00 which is kind of, I don't know, I'm getting into the DevFest Nantes spirit.
  288. 14:03 No? Well, then, it could take more or less time.
  289. 14:05 Because, in fact, in Stable Diffusion,
  290. 14:08 there are also models that are capable of understanding text and therefore
  291. 14:12 to transform the idea or intention behind the image
  292. 14:15 in this latent space.
  293. 14:17 We can do that, and we can go even further by
  294. 14:20 adding a custom node called
  295. 14:23 What's that guy's name?
  296. 14:24 ITools Prompt Styler Extra.
  297. 14:26 I have to lean over, too.
  298. 14:27 If Thierry were here, he'd say, "We're old."
  299. 14:30 That's the green box.
  300. 14:32 What's interesting here is that it makes it easy to inject
  301. 14:35 in the predefined styles prompt.
  302. 14:36 You see, these are text files behind the scenes with things that have
  303. 14:41 have been predefined and are organized by category.
  304. 14:44 We have lots of categories: 3D, crafts, design, drawing, painting, etc.
  305. 14:49 And it's very easy to inject a style
  306. 14:53 like this in the command prompt.
  307. 14:54 So, let's modify the workflow from earlier.
  308. 14:56 I just added this box; everything else is already in place.
  309. 14:59 Okay?
  310. 15:00 So, as I said, there are lots of possible categories here.
  311. 15:02 Now, I'm going to choose "Crafts."
  312. 15:04 And when it comes to crafts, well, you see, there's a whole list.
  313. 15:08 I don't know how many there are anymore.
  314. 15:10 That makes 400 different styles.
  315. 15:12 And on top of that, the best part is that you can stack them.
  316. 15:13 So in this case, I stuck with one style because otherwise, you get stuck.
  317. 15:16 There, I set the seed because it wasn't yet, just
  318. 15:18 so that we can see the impact.
  319. 15:20 And at this point, I start to speed things up because otherwise,
  320. 15:23 we're going to wait a little too long. And then, bam!
  321. 15:25 In that case, I chose Metal Work.
  322. 15:26 This has a bit of a metal vibe.
  323. 15:29 There, you can try scanning—it should work.
  324. 15:31 I've tested it thoroughly and everything's fine.
  325. 15:34 I'm changing my style, so everything else is already set.
  326. 15:37 In this case, I chose Crochet.
  327. 15:40 Come to think of it, maybe it was my grandmother who had...
  328. 15:43 We can do some cool stuff—like wool polo shirts with QR codes. Why not?
  329. 15:48 Still in the Craft category, by changing just one setting in my
  330. 15:55 workflow—that's what interests me.
  331. 15:57 To pay homage to its Japanese origins, I say "origami" because it
  332. 16:01 It intrigues me.
  333. 16:01 Origami, QR codes—I don't know how that'll turn out.
  334. 16:05 So that's how it turns out.
  335. 16:06 It feels a bit like paper, but with origami, you're not supposed to cut it.
  336. 16:09 So, origami—I don't know.
  337. 16:11 And a last one to wrap things up, because I thought this
  338. 16:13 one was pretty cool.
  339. 16:14 And besides, it'll give me a clue as to the true origin of QR codes.
  340. 16:18 Actually, maybe it was the Romans who invented QR codes—maybe.
  341. 16:20 Come on, it's okay.
  342. 16:22 Here, you can see that we're actually capable of doing some pretty funny things
  343. 16:24 and it's relatively easy once you've tweaked your workflow.
  344. 16:29 Here, I've added some more, and you can even mix them together.
  345. 16:32 Next, you need to have things that are compatible with one another,
  346. 16:35 otherwise, the styles are starting to get a little weird.
  347. 16:37 Okay?
  348. 16:38 That's where you can experiment with different styles—it's cool.
  349. 16:40 Now, I'm going to get back to my issue with the tango dancers.
  350. 16:43 And besides, as Ambre said, I'm actually a yoga teacher.
  351. 16:47 In my case, I needed QR codes for things that had
  352. 16:49 connections to yoga.
  353. 16:50 What I want to do now is, in the QR code,
  354. 16:53 inject a yoga pose.
  355. 16:55 Just the posture, by the way.
  356. 16:57 I want it to look like a real human and all that, but I want
  357. 16:59 that specific posture. To do that, what do I do?
  358. 17:02 I also use ControlNets, but this time,
  359. 17:04 they will extract other types of information from the image.
  360. 17:06 In this case, it's going to be the depth and the edges.
  361. 17:10 Why am I doing this?
  362. 17:11 Because I only want to focus on posture.
  363. 17:12 Then, following the prompt, I'll say: "The guy is dressed like that," etc.
  364. 17:16 Okay? So, what's going to happen now?
  365. 17:18 It'll just take that and then do it again, with my previous ControlNet
  366. 17:24 for the QR code.
  367. 17:25 Here, I have three ControlNets; send all of that to the latent space.
  368. 17:27 There's a ControlNet called OpenPose that seemed promising,
  369. 17:32 but that's not specific enough for a yoga teacher like me, so it won't work.
  370. 17:35 After trying them out over and over again, I use these two because
  371. 17:39 they can be stacked.
  372. 17:40 Here, as you can see, I'm adding the box at the very bottom.
  373. 17:42 Here are the nodes I had—the prompts.
  374. 17:45 Here is the ControlNet for the QR code.
  375. 17:47 And here, at the very bottom, are two columns for extracting the posture.
  376. 17:52 Here, I have the first one, where you can actually see the image I use as input
  377. 17:57 the second input of my workflow.
  378. 17:59 And then I choose the type of ControlNet I want, the type of preprocessor,
  379. 18:03 because it involves image processing.
  380. 18:04 It will extract that from the image and send it to the ControlNet above.
  381. 18:09 On this ControlNet, I can set the force.
  382. 18:12 Here, we can tweak things a bit. When does it start?
  383. 18:14 When does it end in the generation process?
  384. 18:16 And then, I stack them—I put two on top of each other.
  385. 18:18 Here, as you can see, the data has been preprocessed and extracted.
  386. 18:23 There you go. There's the depth, there are the contours.
  387. 18:26 And all of that is fed into the generation process, which I'm speeding up.
  388. 18:30 And you end up with something like this.
  389. 18:33 What's interesting is that here, it blended the two together a bit.
  390. 18:36 You see, it's no longer just an image that's superimposed on top,
  391. 18:38 because there's also
  392. 18:39 the other ControlNet, which insists it has to be a QR code.
  393. 18:41 So, it lets you do some pretty cool things.
  394. 18:43 Actually, I think his hair is a little too white.
  395. 18:45 I didn't write "don't include gray hair" in the negative prompt.
  396. 18:50 That's where it generates that.
  397. 18:51 He doesn't have white hair, but he has a few gray hairs at his temples.
  398. 18:55 I don't know what I'm trying to do.
  399. 18:57 Maybe you've been trying to guess—I'm trying to do
  400. 18:59 something that looks just like me.
  401. 19:00 Other than that, I really did lie in the prompt, because I turned 40 a long time ago
  402. 19:05 but a man who's somewhat mixed-race, etc., wearing glasses, etc.
  403. 19:10 It turns out that, after all, I am able to replicate the posture.
  404. 19:15 It's still scannable, and it works, but it doesn't really feel like me.
  405. 19:19 What can I do to make it really reflect who I am?
  406. 19:22 Because I'm a psychopath.
  407. 19:25 Okay, I'm going to transfer the face now.
  408. 19:27 How do I do that?
  409. 19:28 Here, I'm using another technique called Image Prompt Adapter,
  410. 19:32 IP Adapter, which allows you to use an image as part of the prompt.
  411. 19:38 With models
  412. 19:39 All of that comes with pre-trained models, etc.
  413. 19:41 There is a type of IP adapter called FaceID, which is specialized
  414. 19:44 in facial recognition.
  415. 19:45 So, he's going to extract the facial features and incorporate
  416. 19:48 them into the new generation.
  417. 19:50 Also, by the way, I use a second type of model as well
  418. 19:53 called FaceDetailer, which is a post-generation tool and which is
  419. 19:58 trained to enhance any face, whatever it may be,
  420. 20:02 on the nose, lips, mouth, facial expressions, etc.
  421. 20:05 I'm going to combine all of this into my final workflow.
  422. 20:09 Those are the parts in yellow that I added there.
  423. 20:11 As you can see, we still have the elements from our previous workflow.
  424. 20:16 Right here at the top, I have the section on Face ID and the IP Adapter.
  425. 20:19 That will be sent, and it will generate an initial image.
  426. 20:21 And then the result of this first generation will be sent down,
  427. 20:24 in FaceDetailer to generate a second, even better image.
  428. 20:28 Okay, so let's get things started.
  429. 20:30 And while it's rolling, I zoom in on that part,
  430. 20:33 Face ID, just so you can see.
  431. 20:35 In this case, it comes with a lot of settings.
  432. 20:37 That's what's a little crazy—we actually have a lot of control.
  433. 20:40 Here's the image I'm using as the starter.
  434. 20:43 In this case, I'll choose one, because there are several
  435. 20:46 versions of Face ID, etc.
  436. 20:47 So, I'm choosing V2—what's the strength, and then,
  437. 20:50 There are also quite a few settings you can tweak here.
  438. 20:53 There you go—that starts the generation; the rest is just like before.
  439. 20:56 Here, we have the first image that's been generated—it looks just
  440. 20:58 like me, in every way
  441. 20:59 a little more than a moment ago.
  442. 21:01 And here, as you can see, it's been processed through FaceDetailer.
  443. 21:03 We're in the second half.
  444. 21:05 You see, FaceDetailer is linked to Face ID.
  445. 21:07 So, it's going to get better.
  446. 21:09 Here, I have a node that comes before and after FaceDetailer.
  447. 21:11 If I zoom in, maybe you'll be able to see it.
  448. 21:13 That's better. I'm younger.
  449. 21:16 AI always makes us look even better.
  450. 21:17 I don't know if you've noticed. Anyway, we're capable of doing that.
  451. 21:21 That's nice. What did I do?
  452. 21:23 There, I managed to transfer the QR code using an initial ControlNet,
  453. 21:27 the installation, along with two other ControlNets,
  454. 21:31 And then the face—so there, with IP Adapter. That's cool.
  455. 21:35 Of course, you can mix all of that together.
  456. 21:38 I can come back to the styles.
  457. 21:39 Now, if I put the
  458. 21:40 I won't go through the demo with you anymore—we won't have time for it anyway,
  459. 21:42 But if I put the green box back in, we'll be able to mix
  460. 21:46 and therefore to change the styles.
  461. 21:48 This is starting to get really fun.
  462. 21:50 And then, just to top it off, since I'm even more of a psychopath
  463. 21:53 Believe it or not, I said, “I’d like to bring the QR code to life.”
  464. 21:56 I want to create animated QR codes.
  465. 21:57 Personally, I'd like the face in the QR code to move.
  466. 22:00 For that, I use Advanced Live Portrait, which is a specialized model
  467. 22:05 in facial expressions.
  468. 22:06 He draws them out, knows how to bring them to life, and then chain them together.
  469. 22:10 It works something like this.
  470. 22:11 That means we have an editor, and it's preconfigured.
  471. 22:14 You can make it turn its head, raise its eyebrows—that sort of thing.
  472. 22:19 Here, I'll show you another workflow I created.
  473. 22:23 I could have chained him to the other one, but I preferred to keep them apart.
  474. 22:26 I have an image that I had already generated using my first workflow.
  475. 22:30 Here's my expression editor.
  476. 22:33 So I tell him which step I want him to take.
  477. 22:35 The third node—there's a bit of formalism here—
  478. 22:37 I won't go into detail, but it explains how to get there,
  479. 22:40 How many installments, how long does it take, etc.
  480. 22:43 And then the last node will combine all of that to create
  481. 22:46 a video, because a video is a sequence of images.
  482. 22:48 So, the frame rate is important—it's the number of frames
  483. 22:51 per second that it will use.
  484. 22:54 And besides, all of that generates something.
  485. 22:56 I'm going to skip that part because we don't have much time left, but at the
  486. 22:58 In the end, it looks something like this.
  487. 23:01 As you can see, I could tweak it a bit.
  488. 23:03 Guys who are good at observing, who have an eagle's eye,
  489. 23:05 will see that part of the QR code near the forehead moves.
  490. 23:08 I'll have to tweak things a little bit.
  491. 23:10 This works; it scans.
  492. 23:12 With the iPhone, you can scan.
  493. 23:15 But the iPhone sometimes tries to be really clever when it
  494. 23:17 He takes photos, and he also shoots videos, etc.
  495. 23:19 So it depends on when.
  496. 23:20 But if you install an iPhone app, it usually works, too.
  497. 23:24 There you go.
  498. 23:24 So we're able to do that kind of thing relatively easily
  499. 23:28 locally, using open-source tools.
  500. 23:30 I think it's fun.
  501. 23:31 So I wanted to share this with you.
  502. 23:33 Thank you very much.
  503. 23:34 That QR code right there wasn't generated using my workflow.
  504. 23:37 I could have, but I decided to stick with the one from OpenFeedback.
  505. 23:41 So if you haven't scanned any QR codes yet, scan this one.
  506. 23:44 The others worked, I swear, but this one did, too.
  507. 23:45 That's so you can give feedback. Okay?
  508. 23:47 Thank you in advance, and thank you all.
Watch on the original platform ↗
Slide 1 of —

Loading slides…