start	end	text
0	3420	All right, so this is Stable Diffusion. This is an AI?
3420	5040	Yeah, this is Stable Diffusion.
5040	6380	This is the AI?
6380	8080	This is one of the AIs.
8100	9280	And what's this one do?
9280	12480	This is actually ControlNet bolted on top of Stable Diffusion.
12480	16320	So you have, in this case, the Nike Swish.
16480	21920	It's going to control the Stable Diffusion to generate a edge map right here.
21920	27380	So you can get... this is how you get the images with certain patterns built into them.
27380	29640	So have you seen the TikTok filters with people like...
29640	32300	Dancing like a... they look like a...
32300	34040	I totally do those videos.
34040	36460	Yeah, this is how it's built.
36460	40120	Okay, so it does the edging around it and then it can do things around it.
40480	43460	So this one does edging, but then you can do it with a normal map,
43460	47520	you can do it with a pose map. There's all sorts of different ways of doing it.
47520	50800	Do you always have to feed an image in or can you also do text in?
50800	54540	This is a text image. So this is a human baby lobster,
55120	59400	but we can do it with this image or this... various other images.
59640	64040	Okay. If you don't feed it an image, are you able to just generate something?
64040	68540	It's going to see what happens with human baby lobster without an image fed into it.
68540	72380	This one's still got the Nike Switch. I haven't swapped it over.
74500	78880	That is remarkably creepy for some of these.
78900	82840	Yeah, this one has improved drastically since we did this last year.
82840	87340	We had Latent Diffusion and if you asked it to generate an image like this,
87340	92600	it would generate like outer nightmare fuel. I think I have some nightmare fuel on this computer,
92600	96420	but it was like the most disgusting tentacle monster we've ever seen.
96420	100680	Oh my gosh. Some of these are still like, they're really good.
100680	102080	I like the ribs.
102080	104860	Kind of nuts at the same time.
105220	111350	So as a curiosity, the other item on the scav hunt list is crashing AI.
111840	112660	Yeah, we can...
112660	114400	How do you crash an AI?
114400	118420	This particular one I crash usually by going too big.
119300	125160	So this model was trained to do 512x512.
125280	129400	So you're making the image way too big for it to process and it will crash.
129400	134040	Oh, well this won't crash, but I want to turn off the control net stuff.
134100	135680	And you're expecting this one to crash?
135680	139840	No, this won't crash, but the model is going to start generating some really weird stuff.
140340	142900	But what happened is I pushed it up.
142920	148580	Now it's consuming nearly 36 gigs, 36 gigabytes of VRAM.
148760	152840	I have an A6000, so I have nearly 50 gigs of VRAM.
153640	156520	But normally this would crash just out of memory.
156560	157140	Okay.
157140	159560	And if I pushed these numbers up a little bit higher,
159560	161160	I would have crashed it without a memory.
161160	164100	But what happens now is it's going to take 10 minutes to generate.
164100	168060	But usually when you push it this high, you get a result.
168060	173500	So it doesn't crash crash, but because I've pushed the image range so high,
173500	176280	it doesn't generate a sensible image anymore.
176280	178240	So if you want a horse with eight legs,
178240	180420	and you want to guarantee a horse with eight legs,
180420	184080	you push the image resolution too high.
184260	188440	And then it will generate horses with eight legs and all sorts of fun things
188440	195340	that you don't get when you generate normal images on Hugging Face or Dali 2.
195340	198700	Because they want you to get good images that are usable,
198700	200720	and I'm trying to currently push an image that's
200720	203340	through this thing that is just going to break the system.
203340	207540	And what causes it? Okay, maybe it's not a crash, but what causes it to go goofy?
207540	210880	It's that it runs out of memory, so in an attempt to save memory,
210880	212920	it's like offloading, and what's happening?
212920	215240	The model was trained to generate 512x512.
215240	219360	So in this case, the model was trained to generate 256x256 images,
219360	221740	and then upscale that to 512x512.
221760	224280	And the upscaling is literally like CSI Enhanced.
224280	226600	That's what it is, just CSI Enhanced.
226600	231560	I feel like every time I use CSI Enhanced, I do have to, in a deep voice, go, Enhanced.
231560	237060	Yeah, this parameter right here is saying, oh, we're going to do Enhanced 30 times.
238280	239900	But it does the upscaling.
240540	243860	But what it was trained to do is have that field of view,
243860	246260	and so suddenly you have given it this field of view.
246520	252140	And so it's going to make the same, it just tiles that process over and over again.
252140	254080	So it's going to try to generate a horse here,
254080	256380	and then it's going to go over here and try to generate a horse.
256380	260840	And they overlap, so you get a horse, so the horses meld together.
260840	264540	Is this one of the reasons why some of the early things with stable diffusion
264540	267660	made people look so weird, or is that a separate problem?
267660	274100	I don't actually know myself, but one of the creators is around,
274100	279580	I don't think she's here right now, but like that particular thing, I think was a,
279580	282660	basically that story of like, I'm going to generate one set of finger,
282660	285240	it knows how to generate a finger, and then generates another finger,
285240	289200	and then it just keeps going. And it just accidentally makes six fingers,
289200	293660	because it knows how to generate small patches. But it's got the same thing.
293840	300940	I think you're right, but I'm not sure. Because I do ML security with malware models,
300940	303500	and spam, and all sorts of other weird things.
303500	309360	So let's answer the question for Scav Hunt, which is, how do you crash AI?
309960	315620	Well, in this case, if you want to crash stable diffusion, you can allocate way too much RAM.
315740	319760	Most of the time I crash AI, it's out of memory.
321300	327920	With a large language model, the number of tokens, the number of tokens,
327920	333560	the amount of memory you need scales with the square of the number of tokens, and that is bad.
333560	337520	So is that what happens when you get too many tokens, it loses the original con?
337520	341320	It does one of two things. Either A, it loses the original context,
341320	343920	and this is one of the ways a lot of jailbreaks work, right?
343920	348620	Where it fills up the context, it forgets about its original security parameters,
348620	351340	and now it's doing things it's really not supposed to do.
351360	357240	Like the invention of a lot of the jailbreaks, where you can now, all of a sudden, recipes
357240	361180	for drinking bleach and things like that, where it's saying things you're definitely
361180	366360	not supposed to do as recipes. You either have the option of losing context, or...
366360	367760	You start running out of memory.
367760	370420	You run out of memory, and it officially crashes the process.
370420	374340	Yeah, but they control the number of tokens. That's why
375180	378020	Anthropic was so excited about beginning to 10,000 tokens.
378440	383700	They came up with a new way of doing it to drastically expand the amount of tokens
383700	385540	without messing with the memory too much.
385540	391020	Okay. So with this then, first, thank you for teaching me how to crash AI.
391020	395000	I have that now, that feather in my cap. Thank you so much for your time.
395000	400060	I really, really appreciate it. Thank you for watching. And as always, hack on.
400280	406680	That is super hot right now. And if it doesn't crash, it might catch fire.
