創(chuàng)建令人驚嘆的 AI 圖像,使用 SDXL 1.0 和 ComfyUI:一步一步詳細(xì)指導(dǎo)
Create STUNNING ?? AI Images with SDXL 1.0 & ComfyUI: Step-by-Step Guide
視頻網(wǎng)址:
https://www.youtube.com/watch?v=aoD5WnEldJ8
LINKS:
(02:50) 好的,我會(huì)盡可能簡(jiǎn)單地完成這些步驟。不要不知所措。我保證這非常非常簡(jiǎn)單,任何人都可以做到。有幾種不同的方法,所以如果你甚至沒有GPU,你可以用CPU來(lái)完成,當(dāng)然會(huì)慢得多,但你仍然可以完成。 (02:50) Okay, so I'm going to make these steps as simple as possible. Do not get overwhelmed. I promise this is very, very easy, and anybody can do it. There's a couple of different methods, so if you don't have even a GPU, you can do this with even a CPU. It's of course going to be a lot slower, but you can still get it done.
(03:05) 無(wú)論如何,我會(huì)在描述中提供所有鏈接,這樣你就可以跟著我操作,非常簡(jiǎn)單地完成一切。 好的,我們將直接進(jìn)入主場(chǎng)景。 首先,我們將進(jìn)入ComfyUI的GitHub。 如果在過(guò)去你試圖安裝像A1111這樣的東西來(lái)使用穩(wěn)定擴(kuò)散,那需要更多的技術(shù)性工作。 (03:05) Anyway, I'm going to have all the links in the description so you can follow along with me and do everything very, very simply. All right, so right here, we're going to jump into the main scene.

First we're going to go into the GitHub of ComfyUI. If in the past, you've tried to install things like A1111 to use stable diffusion, that's a lot more technicality.
(03:26) 這將非常非常簡(jiǎn)單,因此一旦您到達(dá)ComfyUI GitHub頁(yè)面,我們將向下滾動(dòng)直到看到一個(gè)小鏈接,其中說(shuō)直接鏈接下載,并說(shuō)簡(jiǎn)單下載,使用7-zip提取,然后運(yùn)行。您實(shí)際上不需要7-zip。你可以使用WinRAR等提取程序,或者如果你有其他一些提取程序,它可能也可以工作。 (03:26) This is going to be very, very simple, so once you get to the ComfyUI GitHub page, we're going to scroll down until we see a little link here that says direct link to download,

and it says simply download, extract with 7-zip, and run. You don't actually have to have 7-zip. You can use things like WinRAR, or if you have some other kind of extraction program, it'll probably work.
(03:45) 如果不行,7-zip是免費(fèi)的,可以使用。所以首先,點(diǎn)擊直接鏈接下載按鈕,它實(shí)際上會(huì)下載到你的電腦上,你可以看到它說(shuō)1.4GB,對(duì)我來(lái)說(shuō)需要4分鐘。 好的,一旦下載完成,你將把它提取出來(lái),最好是放在主驅(qū)動(dòng)器的某個(gè)地方。 (03:45) If it doesn't, 7-zip is free and it does work. So first, you click the direct link to download button, and it's going to actually go down here on your computer, you can see it says 1.4 gigabytes, four minutes for me. Okay, so once that's done downloading, you're going to extract it, preferably somewhere on your main drive.
(04:02) 對(duì)我來(lái)說(shuō),我有一個(gè)叫AI Master的文件夾,我在里面提取了它,在這里,我們有所有內(nèi)部?jī)?nèi)容,從這里,如果你看,我點(diǎn)擊ComfyUI,我們有一個(gè)叫Models的文件夾,那就是你要放入所有要下載的模型的地方。 (04:02) For me, I've got a folder called AI Master, and inside that folder, I've extracted it, and right here, we have all of the inside contents, and from here, if you see, I click into ComfyUI, we have a folder called Models, and that's where you're going to put all of the models that you're going to be downloading.
(04:18) 然后我們有一個(gè)輸出文件夾,當(dāng)然,那是你提示的所有圖片在渲染完成后輸出的地方。 所以我現(xiàn)在要點(diǎn)擊Models,在里面,我們有Loras,那是放Loras的地方,然后在這里你有一個(gè)小地方叫檢查點(diǎn),那就是實(shí)際放入模型的地方。 (04:18) And then we have an output folder, and that's, of course, where all the pictures that you prompt are going to be output as soon as they actually get finished rendering. So I'm going to go ahead and click on Models right here, and inside here, we have the Loras, which is where you'll put your Loras, and then up here, you have a little spot called Checkpoints, and that is where you're going to actually put inside the models.
(04:36) 這就是我們現(xiàn)在需要的。我們需要模型。所以讓我們繼續(xù)點(diǎn)擊我下面也列出的其他鏈接。就在這里是穩(wěn)定擴(kuò)散XL基礎(chǔ)1.0和穩(wěn)定擴(kuò)散XL精煉器1.0。所以對(duì)于每個(gè)頁(yè)面,都非常簡(jiǎn)單。你可以直接進(jìn)入這里并下載SDXL精煉器1.0

安全張量,只需點(diǎn)擊此按鈕。
(04:36) And that's what we need now. We need the models. So let's go ahead and click on the other links that I have also listed below. Right there is Stable Diffusion XL Base 1.0 and Stable Diffusion XL Refiner 1.0. So for each of these pages, they're very simple. You can just go right in here and download the SDXL Refiner 1.0 Safe Tensors by just clicking on this button right here.
(04:56) 一旦點(diǎn)擊,你會(huì)看到它開始在左下角下載,同樣這里也是,你要點(diǎn)擊這個(gè)6.94 XL 1.0,這些可能會(huì)改變大小,但你會(huì)想繼續(xù)獲取最新的一個(gè),并確保它們都匹配。 (04:56) Once you click on that, you're going to see it start downloading there in the bottom left, and then same thing over here, you're going to want to click on this 6.94 XL 1.0, and these can be updated. They might change their size, but you're going to want to go ahead and get the most recent one and make sure that they both match.
(05:13) 這里還有一個(gè)Laura,如果你想嘗試并使用那個(gè)Laura,你也可以下載Laura。 所以一旦你下載了每個(gè),你會(huì)進(jìn)入下載文件夾,讓我們進(jìn)入這里。 你要把這些東西移動(dòng)到這些區(qū)域。(05:13) And then there is a Laura in here, so if you want to go ahead and experiment and play with that Laura, you can also download the Laura as well. So once you download each of these, you're going to go into your Download Folder, and let's go ahead and go in here. You're going to want to move those things into these areas.

(05:27) 所以如果我進(jìn)入檢查點(diǎn)這里,你可以看到我實(shí)際上有.9和1.0。 .9不再需要因?yàn)橐呀?jīng)有1.0了,所以我要?jiǎng)h除它們因?yàn)槲也恍枰鼈儭?在這里,在Laura里,你可以看到我有那個(gè)實(shí)驗(yàn)Laura。 (05:27) So if I go into Checkpoints here, you can see that I actually have the .9 and the 1.0. The .9 are no longer needed because the 1.0 exists now, so actually I'm going to go ahead and delete those because I don't need them. And then over here, inside the Laura, as you can see, I have that experimental Laura.
(05:44) 我還沒有實(shí)際玩過(guò)它,但為什么不呢?讓我們把它放進(jìn)去。 好的,所以一旦你在檢查點(diǎn)里有了模型,它們都在那里,每個(gè)大約6GB,5GB,將有11GB,或者大約12GB只是模型。 (05:44) I haven't actually played with it yet, but why not? Let's get it in there. Okay, so once you have your models inside the checkpoint, and they are both there, which it looks like each one, six gigabytes, five, it's going to be, you know, 11 gigabytes right there, or about 12 gigabytes just for the models.
(06:00) 然后一旦完成,我們將回到Comfy UI的主文件夾。 如果你有GPU,點(diǎn)擊這個(gè)。如果你有CPU,你將點(diǎn)擊這個(gè)。以防萬(wàn)一,它說(shuō)非常重要,非常重要,讀我。讓我們確保閱讀它,對(duì)吧? 正如它在這里所說(shuō),如果你有GPU,請(qǐng)使用GPU運(yùn)行它。

(06:00) And then once that's done, we're going to go back here to the main folder for your Comfy UI. If you have a GPU, you click on this one. If you have a CPU, you're going to click on this one. And just in case, it says, very important, very important, read me. Let's go ahead and read it, right? As it says here, if you have a GPU, run it with the GPU.
(06:17) 好的,在那里你去。然后如果你遇到一些錯(cuò)誤,它會(huì)告訴你為什么你可能會(huì)遇到這些錯(cuò)誤。 但是你這里要的最后一部分是我要包括這個(gè)工作流JSON文件。這只是給你一些在網(wǎng)上流傳的基本設(shè)置。 (06:17) Okay, there you go. And then of course, if you have some errors, it's going to tell you why you might have such errors. But the last part that you're going to want here is I'm going to include this workflow JSON file. What this is, is this is just going to give you the basic setup that was kind of floating around on the internet.
(06:34) 當(dāng)然,它在這里和那里被一些不同的人調(diào)整過(guò)。我不確定這個(gè)來(lái)自哪里,但它不是我的。無(wú)論如何,我要雙擊運(yùn)行Nvidia GPU。 (06:34) And of course, it's been tweaked here and there by a few different people, but I think there's going to be a new workflow or this workflow needs to be updated. So I'm not exactly sure where this one originated from, but it was not for me. Anyway, I'm going to go ahead and double click run Nvidia GPU.
(06:49) 在我這樣做之前,我需要關(guān)閉我的舊的。 好的,現(xiàn)在我要雙擊運(yùn)行Nvidia GPU.bat。它將啟動(dòng)。第一次可能需要一段時(shí)間來(lái)下載一些不同的東西,特別是如果這是你第一次運(yùn)行它。 (06:49) And before I do that, I need to close my old one. Okay, so now I'm going to go ahead and double click run Nvidia GPU dot bat. And it's going to go ahead and start up. And this might take a little while to download a few different things for you, especially
(07:04) 但一旦它完成下載所有內(nèi)容,它會(huì)打開一個(gè)瀏覽器,那里就是實(shí)際的UI呈現(xiàn)的地方。從那里您可以輸入提示和否定提示,然后進(jìn)行所有設(shè)置。所以砰,它就在我們面前設(shè)置好了。 (07:04) But once it finishes downloading everything, it's going to open up a browser and inside that browser is where the actual UI is going to be represented. And from there you can put your prompts in your negative prompts and then do all your settings. So boom, there it goes. It sets up right in front of us.
(07:19) 是的,這里你去。你的可能什么也沒有。當(dāng)你回到文件時(shí),讓我來(lái),我們將詳細(xì)了解我在描述中提供的那個(gè)工作流JSON文件,并將其拖放到那里。

(07:19) And yeah, here you go. If we go ahead and click clear, which is what yours is going to look like, you'll probably have nothing here. And when you go back to the file, let me we're going to go over to that workflow JSON that I've got in the description, and we're going to drag and drop that right there.
(07:36) 一旦我們這樣做,它會(huì)在這里給你一個(gè)精煉器的位置,一個(gè)基礎(chǔ)的位置。然后它會(huì)給你圖像結(jié)果的空間。所以我現(xiàn)在要做的是,我要做一個(gè)快速的測(cè)試圖像,以確保一切正常工作。 (07:36) And once we do, it's going to give you right here, which is your refiner spot and a spot for your base. And then it's going to give you spaces for your image results. So what I'm going to do right now is I'm going to go ahead and do a quick test image to make sure that everything's working.

(07:51) 為此,我們首先要確保檢查點(diǎn)已正確加載。我們正確進(jìn)入這里,如果我們?cè)谶@里說(shuō)精煉器,它說(shuō)Excel精煉器1.0,沒錯(cuò)。 然后在這里,它說(shuō)加載檢查點(diǎn)基礎(chǔ)。所以就在這里,我們點(diǎn)擊基礎(chǔ)1.0,很好。并從那個(gè)檢查點(diǎn)文件夾中檢查它們。 (07:51) And in order for us to do that, we're going to first make sure our checkpoints are properly loaded. And we go right in here, if we say refiner here, it says Excel refiner at 1.0, right? So simple. And then down here, it says loaded checkpoint base. So right in here, we click base 1.0, great. And it checks those from that checkpoint folder.
(08:12) 現(xiàn)在在否定提示中,你不需要任何內(nèi)容。否定提示中的任何內(nèi)容,如果你不熟悉,都是你不想在照片中看到的東西。 有時(shí)你通過(guò)看到事物才認(rèn)識(shí)到應(yīng)該在里面的東西。所以如果你試圖在海灘上拍攝某人,突然出現(xiàn)了一個(gè)沙灘球,但你不想要沙灘球,你可以在否定提示中字面輸入沙灘球,然后你仍然會(huì)得到?jīng)]有沙灘球的海灘,對(duì)吧? (08:12) Now in the negative prompt, you don't have to have anything in here. Anything in the negative prompt, if you're not familiar, these are things that you don't want in your photo. And sometimes you recognize what should be in there by seeing the things. So if you are trying to get a photo of somebody on the beach and all of a sudden a beach ball keeps popping up, but you don't want the beach ball, you can literally type beach ball in the negative prompt and then you'll still get the beach without the beach balls, right?
(08:34) 然后在積極的提示中,你要寫下你想要的。 對(duì)于這個(gè)測(cè)試,我將寫下獲獎(jiǎng)?wù)掌?我會(huì)放大一點(diǎn),這樣你們就可以看得更清楚。美國(guó)白頭海雕的獲獎(jiǎng)?wù)掌?。?我們要改一下。 (08:34) And then in the positive prompt, you're going to go ahead and write what you do want. And for this test, I'm going to go ahead and write award-winning photo, and I'll zoom in just so you guys can see it a little bit. Award-winning photo of an American bald eagle. No, we're going to switch that.
(08:46) 一張艾維斯的獲獎(jiǎng)?wù)掌?艾維斯。 然后寫20兆像素,32K定義,時(shí)尚攝影,超詳細(xì),非常漂亮,優(yōu)雅。我們將保留所有這些,因?yàn)樗鼈兪且话阈缘摹?然后在這里否定,我們基本上排除了任何有點(diǎn)CGI的東西,半真實(shí)的東西。 (08:46) That's what I did already. So an award-winning photo of, let's say, Elvis, Elvis. And then it says 20 megapixels, 32K definition, fashion photography, ultra detailed, very beautiful, elegant. And we'll go ahead and keep all that stuff, just because it's kind of generic. And then down here in the negative, we're basically keeping out anything that's kind of CGI, the semi-realistic stuff.
(09:06) 我們正試圖創(chuàng)建逼真的圖片,用這個(gè)否定提示排除任何這些其他東西。 美妙之處在于這個(gè)新的SDXL實(shí)際上在處理手和文字方面具有非常非常好的能力,臉部效果也很驚人。 所以繼續(xù)嘗試它。 (09:06) We're trying to create realistic pictures with this negative prompt down here. The beautiful thing about this new SDXL is that it actually has very, very good ability to do hands and text even, and faces are phenomenal so far. So just keep experimenting with it.
(09:26) 如果我們向下看,我們可以看到我們的種子數(shù)字,我們的CFG,當(dāng)然,數(shù)字越高,它會(huì)更多地堅(jiān)持您的提示,數(shù)字越低,它會(huì)有更多的藝術(shù)自由度。 所以去玩這些不同的東西。 (09:26) And if we go down here, we can see we have our seed numbers, we have our CFG, which of course, the higher number, it's going to be the more, it's going to stick more to your prompt and the lower the number, it's going to have more artistic freedom. And so go ahead and play around those different things.
(09:41) 當(dāng)然,在這里你的CFG和采樣器的步驟也一樣。所以現(xiàn)在我們有了精煉器,我們可以玩的東西多了,因?yàn)樗紫葧?huì)創(chuàng)建你的圖像并在沒有精煉器的情況下放入。 然后它會(huì)取出它創(chuàng)建的圖像,并通過(guò)精煉器進(jìn)行精煉,然后輸出一個(gè)更好的版本。 (09:41) And of course, down here, same thing at your CFG and your steps for your sampler. So there's a whole bunch of different things that we can play with now that we have the refiner, because what it first does is it's going to create your image and put it without the refiner. Then it's going to put that image that it created and put it through a refinement, which is the other model, and then spit out a better version.
(10:01) 這有點(diǎn)像之前的圖像生成器做的兩項(xiàng)工作。所以當(dāng)我準(zhǔn)備好時(shí),我有我的積極提示在這里,我的否定提示在里面。 由于這一點(diǎn),我可以點(diǎn)擊Q提示按鈕。 (10:01) This is kind of double doing what those previous image generators were doing before. So when I'm ready, I've got my positive prompt over here, my negative prompt in there. Because of it, I can go ahead and click the Q prompt button.
(10:21) 現(xiàn)在請(qǐng)記住,當(dāng)你第一次點(diǎn)擊Q提示按鈕時(shí),它需要幾分鐘時(shí)間加載一切。 第一次圖像生成后,事情往往會(huì)快一些。 但即使如此,我們已經(jīng)起步了,一切似乎都在正常工作。 如果你看這里的命令,我們可以看里面,我們實(shí)際上可以看到它已經(jīng)開始經(jīng)歷一切,并準(zhǔn)備好了。 (10:21) Now keep in mind, when you first hit that Q prompt button, it's going to take a few minutes to load everything. After the first image generation, things tend to be a little bit quicker. But even so, we're off to the races right now, everything seems to be working. If you can look over here at the command, we can look in here, we can actually see that it has started going through everything and it is getting prepared.
(10:42) 如果我實(shí)際上把它帶進(jìn)來(lái),讓我把我的NZT或NZXT cam帶進(jìn)來(lái)。 從這里我可以跟蹤我的CPU和GPU以及它們的運(yùn)行情況,以及我的前端流程以及它們使用的RAM量。 現(xiàn)在你可以看到Python正在使用10.5GB,它在上升。 (10:42) And if I actually bring in over here, let me, let me bring in my, I use this thing called NZT or NZXT cam. And from here I can keep track of my CPU and my GPU and how they're running, as well as my top processes and how much RAM they're using. And right now you can see the Python is using 10 and a half gigabytes and it is climbing.
(11:01) 無(wú)論如何,我們現(xiàn)在要加速,直到圖像出現(xiàn)在里面。我馬上回來(lái)。 (11:01) Anyway, we're going to go ahead and speed up right now until we get the image in there. And I'll see you right in a second.
(11:17) 不錯(cuò)。我們有一張艾維斯的獲獎(jiǎng)?wù)掌驮谶@里。我不得不寫艾維斯之王,因?yàn)楫?dāng)我沒有這樣做時(shí),它實(shí)際上制作了一張汽車的照片,就像這樣。你可以看到就在那里,有一個(gè)有趣的小漂浮玻璃門就在那里。 (11:17) Not bad. We've got an award-winning photo of Elvis right there. And I had to put Elvis the king because it actually made a photo of a car when I didn't do that. As you can see right there. There's an interesting little glass floating door over there.
(11:32) 也許這是我不明白的東西。 但不,房子的其余部分看起來(lái)很酷,有點(diǎn)像加州的房子。 好的。如你所見,進(jìn)入comfy UI并開始生成你自己的照片非常簡(jiǎn)單,只需在里面輸入你能想到的任何提示。 (11:32) Maybe it's just something I don't, I don't understand. But no, the rest of the house looks pretty cool here. Something like a California house. Okay. So as you can see, it's very easy to jump into come to UI and to start generating your own photos simply by just putting whatever prompt you can possibly think of right in there.
(11:55) 當(dāng)然,否定提示由你決定放什么進(jìn)去。如果有的話,你實(shí)際上不需要否定提示就可以創(chuàng)建圖像。 但你確實(shí)需要一個(gè)積極的提示來(lái)開始某些東西。顯然,如果你沒有放任何東西,讓我們把什么都不放。 我要向你展示如果你沒有放任何東西并點(diǎn)擊Q提示按鈕會(huì)發(fā)生什么,看這個(gè)。 (11:55) And of course, the negative prompts, you decide what goes in there. If anything, you don't actually have to have a negative prompt to create an image. But you do need a positive prompt to start something. Obviously, if you just put nothing in, let's go ahead and just put nothing. I'm going to go ahead and show you what if you put nothing in and you go ahead and hit the Q prompt button, watch this.
(12:11) 所以當(dāng)你輸入無(wú)提示時(shí),你最終會(huì)得到的是告訴你所有UFO基地位置的秘密地圖。 當(dāng)你沒有輸入任何提示時(shí),這就是你最終得到的。 所以隨意玩它。我要把它放在那里,以防任何頂級(jí)秘密黑衣人想要的那一個(gè)。 (12:11) So that's just it. You get a secret map that tells you the location of all the UFO bases. That's what you end up getting when you type in no prompt. So feel free to play around with that. I'm going to go ahead and put that just over there in case any of the top secret black suit people want to show up for that one.
(12:27) 不管怎樣,我們得到的是非常非常有趣、簡(jiǎn)單易用的程序。 這是開源的。 任何人都可以免費(fèi)使用。 任何人現(xiàn)在都可以馬上開始使用它。 在我們做房子之前,我們做了埃爾維斯。 我們做了很酷的埃爾維斯汽車,你們可以看到。 (12:27) Anyway, we've got going right here is a very, very fun, simple, easy to use program. It's open source. It's free to use. Anybody can jump on and start playing with this right away. But before we did the house, we did Elvis. We did the cool Elvis car that you guys can quite see.
(12:43) 小事情看起來(lái)很偉大。這里有一個(gè)奇怪的細(xì)節(jié),顯然不太正確。 但你知道,對(duì)于汽車的其余部分,它看起來(lái)非常令人驚嘆。 當(dāng)我們經(jīng)歷ufo,然后當(dāng)然還有這個(gè)我很喜歡的。 我真的很喜歡這個(gè)。四周的玻璃窗看起來(lái)超級(jí)時(shí)尚。 (12:43) And little things look great. There is this weird detail right there that's obviously not quite correct. But you know, for the rest of the car, it looks freaking amazing. And as we go through the UFOs, and then of course there's this very interesting, I like this one a lot. This one's really cool. The glass windows all the way around it looks super stylization.
(13:06) 然后當(dāng)然,我們跳過(guò)那一個(gè),我們有一些奧本海默。 沒錯(cuò)。非常主題化。什么東西現(xiàn)在很流行?芭比和肯。所以我只是在測(cè)試它會(huì)如何建模它。我的意思是,這個(gè)模型真的很驚人。它真的做到了,我的意思是,他有那里的小關(guān)節(jié),甚至芭比都有。 (13:06) And then of course, we skip through that one, we've got some Oppenheimer. That's right. Very topical. And what else is popular right now? Barbie and Ken. So I was just testing out to see how this modeled it. I mean, this model is amazing. It really did the, I mean, he's got the little joints right there, even on the Barbies.
(13:23) 你可以看到它看起來(lái)就像芭比的頭發(fā)。所以它知道這么多不同的風(fēng)格。我對(duì)它非常驚訝。然后當(dāng)然,我輸入海綿寶寶就是為了看它會(huì)怎么做。是的,這是它的作品。但所以其中一個(gè)我想向你們展示的其他有趣的東西是只是為了吸引你。 (13:23) It's got the Barbie hair. You can see it looks just like Barbie hair. So it knows so many different styles so well. I'm very surprised with it. And then of course, I typed in SpongeBob just to see how it would do with that. And yeah, here we go. But so one of these other things I wanted to show you guys is just to tease you.
(13:33) 有這么多有趣的東西你可以用這些照片做。例如,你知道,我拿了這些我認(rèn)為看起來(lái)很棒的白頭海雕照片,并對(duì)其進(jìn)行了上采樣。 當(dāng)你對(duì)這些照片進(jìn)行上采樣時(shí),它變成了這樣的東西,對(duì)吧?我使用了Topaz Gigapixel。 (13:33) There are so many fun things you can do with these photos. For example, you know, I took these bald eagle photos, which I thought looked phenomenal, and I sat there and upscaled them. And when you upscale these photos, it turns into something like this, right? I used Topaz Gigapixel.