Thumbnail for Consistent Character Images in Silly Tavern by VictoryCat

Consistent Character Images in Silly Tavern

VictoryCat

10m 1s1,869 words~10 min read
AI audio transcription
Transcript source

AI audio transcription

This transcript was generated from the video's audio because no usable YouTube caption track was available. The transcript below is server-rendered so it can be read, searched, cited, and shared without opening the original YouTube player.

Pull quotes
[0:00]In a previous video, I showed you guys how we can link up Comfy UI to Silly Tavern to generate images in our conversation like this.
[0:00]If we come to this image and then we go over to the next one and kind of look at all of them, let's see.
[0:00]But if I come over here to chat manager and look at this other chat, I now set it up and she looks very similar in each of these images.
[0:00]We're using the same chat backend, the same character prompt, but the difference is we are using a different workflow to generate our faces.
Use this transcript
Related transcript hubs

[0:00]In a previous video, I showed you guys how we can link up Comfy UI to Silly Tavern to generate images in our conversation like this. But you might have noticed something. If we come to this image and then we go over to the next one and kind of look at all of them, let's see. We can see that the face is different in each of these images. These are definitely different people. But if I come over here to chat manager and look at this other chat, I now set it up and she looks very similar in each of these images. And not only that, but she looks very similar to her portrait photo. So how can we get this set up? We're using the same chat backend, the same character prompt, but the difference is we are using a different workflow to generate our faces. So let's set that workflow up and start generating characters that are actually consistent within Silly Tavern. The secret that we're using to make our characters so consistent is going to actually happen inside Comfy UI. And we're going to be using a Comfy UI workflow that I will include in the description. And this workflow allows us to use IP adapters to create consistent characters. So basically, it's going to use this IP adapter unified loader face ID, which is a custom node. So you're going to need to come over to custom nodes manager, install missing custom nodes. And I already have it downloaded, so nothing showing up, but on your end there should be a node to install here. And these custom nodes are a little complicated because you're also going to need to do an install in the VENV. You're going to need to install insight face. I'll put the instructions in the description, but I also have another video on just getting this workflow set up, and I highly recommend that you guys follow it. Because if you get this workflow working inside of Comfy UI first, then it's going to be a lot more seamless when you actually want to transfer it into Silly Tavern. So once you have the workflow and all your custom nodes downloaded and insight face in your VENV, you're going to choose file to upload really easy to pick the image that you want. So, for example, here was the image that we used before. I'll actually use this image this time, and we're going to upload it here. And then I'm going to change this to woman with short hair, woman with short hair in an office. And I am going to run this workflow just to show you guys how it's going to grab the face. And on this node right here, we're actually going to see her face as it's going to just select the part of whatever image you put here that is the face. So that's really cool. You can use even full body images, but I highly recommend that you guys pick an image kind of similar to this that's very focused on the face. Because that's going to give you more consistent, better results. And here we have the image it generated of the character. And you can see it didn't come out quite as good as it did with the other woman that I showed you at the beginning. And that is largely due not to IP adapter itself, but due to the fact that this face is at a slight angle. In general, you're going to want to pick images where the character's looking directly at the camera. I've found that that does tend to give you slightly better results, but for this example, I'm just going to use this image because it's easy. And because the results are still very good and they will be consistent, which is the most important thing that we're looking for. But I already showed you guys on the other video how we can do that in Comfy UI. The big question is how can we take this workflow with this image and import it into Silly Tavern? And that is actually going to be really easy. The first thing we're going to want to do is come over here to where it says prompt and change the prompt to be percent prompt percent. And then in the negative prompt, we're just going to change that to percent negative underscore prompt. And we can leave everything the same. Make sure that the face is the face that you're going to want, and I'll leave this ginger gal here. And you can leave pretty much everything the same, just however it was working for your IP adapter. You're going to use that exact same workflow and then come up to here and go to file and export API. And then we can call it something like Silly Tavern IP face. I'm going to go with S T IP adapter face, and I like to put the name of the character, and I'm just going to put Kit in this case, because that is the name of the image. And then now we can come back to Silly Tavern, and we are going to want to go over here to extensions. And you're going to want to come to where it says Comfy UI workflow. And if that's going to be inside image generation, so if you don't see that, you're going to click on image generation, and you might need to change over to Comfy UI. If you don't have Comfy UI connected, I'll link a video showing how you can connect it in the description as well. But then you're going to want to click on this plus sign to create a new workflow, and we're going to call it IP Kit or whatever you want to, just that's in place adapter. And we're going to save it, but if we look here, it's actually empty right now. So you're going to want to come down to your downloads or wherever you saved the workflow that you just exported, and you're going to need to open it up. Unfortunately, you can't just put the file directly into Silly Tavern. I don't really know why that is, so copy and paste the contents of that file. Personally, I this is probably my biggest bone to pick with Silly Tavern is that you can't add the files, but I can't fault them too much cuz I am also too lazy to make a plugin that will allow you to just include the file. And you can see here the placeholders for prompt and negative prompt are checked off. And you can add all of these placeholders if you want. The main one that I would definitely recommend is changing the width. So I'm going to change that, and make sure that when you add the placeholder in, you're adding it over the number that is width, and to enclose it in quotation marks, and percent signs, and then put width, and then again quotation marks, percent signs, and height. And I also want to add a seed. So we're going to come up to where it says seed, we're going to go percent, I'm sorry, quotation marks, percent, seed, we're going to say quotation marks, percent, and then write seed in the center, and we should see the seed show up right there. And if you want to change other things too, like you could add the steps here. We can even change the model if we want, and I am going to do that. Why not? So we're going to make sure that we leave the quotation marks. I'm going to put percent sign, percent sign model right there, and making sure that we spell everything right, and we do see model right there. And then we're going to save the workflow, and now I can generate another image. But before I do that, I'm going to open up the character because I believe that, yes, we do say she has short blonde hair. I'm just going to change that to short hair. I'm not going to specify a color inside of her description, and we said military fatigues before, and I also misspelled where's let me fix that. And I'm going to change it to say that she's wearing a business suit. And let's just generate an image really quick. So I'm going to ask her to generate an image of herself, and it gives us the little prompt that it's going to use to generate the image. I'm going to continue. Of course, if you don't have it set to show the prompt, it will not. And there you go. We can see it generated an image, and it does look like the face that we put in. And she's wearing a business suit. So really quick, I'm going to generate two more images just to show you guys that it will, in fact, be consistent every time. So here we generated two more images. You can see the second one came out very similar to the first one, very visibly the same character, which is just what we want. And for the last one, I did a request for a facial focus, the um generate image of your face. And as you can see, it's a much closer close up of the face, but it's still definitely the same character. So I highly recommend if you are using a chat with a single character that you use one of these IP adapter workflows, just because your results are going to be much better. Of course, if you switch to another character, the IP adapter is going to make that character seem like this character. So when you go back, you're going to want to change this back to the default comfy workflow, which is just going to cause it to generate images as you normally would. In the future, I'll do some videos on how we can modify it so that we're always getting the correct image for the character, but even then, if you are generating images with multiple characters, IP adapters are really going to struggle with that because they tend to focus on like a single character's image being like the image for the entire generation. So like if you're using an IP adapter and you ask for two characters, they're both going to have the same face. There's definitely ways around it. It's going to be a little bit more complicated, but that's also where it gets really fun. So I'm super excited to tackle all of those things with you guys, and if you have any questions regarding this workflow, please let me know in the comments. And I will, of course, be putting the links to the other videos covering the topics of connecting Silly Tavern to Comfy UI, setting up the IP adapter workflow and all the other fun stuff we can do in the description. Thank you so much for watching and as always, I hope you guys are having a great day.

Need another transcript?

Paste any YouTube URL to get a clean transcript in seconds.

Get a Transcript