Pular para o conteúdo

Testando o Qwen-Image-2.1 localmente em uma GPU de 8 GB

Ver no idioma original →

Autoria: Prompt Engineer 48 · Assistir no YouTube

Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.

Idioma original: inglês

Vídeo original: Insane Local Testing Qwen-Images-2.1 on my 8GB GPU · Canal: Prompt Engineer 48 · 16:38 · Assistir no YouTube

Tópicos: Ferramentas de desenvolvimento com IA, Geração de conteúdo com IA, Modelos locais e open source

O vídeo demonstra como instalar e testar o Qwen Image 2.1 localmente em um sistema com uma GPU RTX 4060 de 8 GB, usando ComfyUI Desktop e uma versão quantizada GGUF de 4 bits. O apresentador configura os modelos e workflows de geração e edição de imagens, e explica como automatizar gerações em lote pela API do ComfyUI. Nos testes, o modelo cria imagens com texto, infográficos e objetos com fundo transparente, além de editar uma imagem para trocar a roupa de uma pessoa. A edição de imagem leva cerca de 126 segundos, quase o dobro do tempo de uma geração de texto para imagem.

  • O teste é feito localmente com uma RTX 4060 de 8 GB e uma versão GGUF quantizada de 4 bits do Qwen Image 2.1.
  • A configuração usa ComfyUI Desktop, com modelos de difusão, text encoders e VAE.
  • O vídeo apresenta workflows separados para geração de texto para imagem e edição de imagem.
  • O Qwen Image 2.1 oferece geração e edição unificadas, suporte nativo a transparência e uso de múltiplas imagens de referência.
  • Os testes incluem pôsteres com texto, infográficos, imagens de produtos, ilustrações e objetos com fundo transparente.
  • É possível exportar um workflow como API do ComfyUI para automatizar gerações em lote.
  • A edição de uma imagem para trocar o vestido de uma pessoa usa cerca de 95% da GPU e leva aproximadamente 126 segundos.
Início Capítulo Resumo
00:00 Apresentação do Qwen Image 2.1 O apresentador introduz as capacidades do modelo e explica que fará testes locais com uma RTX 4060 de 8 GB.
01:02 Escolha do modelo e configuração do ComfyUI O vídeo seleciona uma versão GGUF quantizada e inicia a configuração do ComfyUI Desktop e dos workflows.
04:08 Preparação de prompts e instalação dos arquivos O apresentador obtém prompts de teste, baixa os modelos necessários e explica a estrutura do workflow de texto para imagem.
10:24 Geração de imagens e uso da API São executados testes de geração de imagens e demonstrada a exportação do workflow como API para processamento em lote.
13:00 Edição de imagem e resultado final O apresentador configura um workflow de edição com imagens de referência, troca o vestido de uma pessoa e compara o tempo de execução.

Tudo aqui está sendo executado no meu sistema local, com uma GPU RTX 4060. — 00:00

Ao unificar geração e edição, o Qwen Image 2.1 também permite editar imagens transparentes diretamente. — 04:40

Se você estiver tentando fazer geração em lote, este é o caminho. — 12:30

Isso levou cerca de 126 segundos, quase o dobro do tempo de uma geração de texto para imagem. — 16:07

  • Qwen Image 2.1 (modelo): Modelo de geração e edição de imagens da família Qwen, testado localmente no vídeo.
  • ComfyUI (ferramenta): Interface usada para configurar e executar os workflows de geração e edição de imagens.
  • ComfyUI Desktop (ferramenta): Versão para desktop do ComfyUI usada para instalar e executar os workflows.
  • GGUF (conceito): Formato usado no vídeo para disponibilizar uma versão quantizada do modelo.
  • RTX 4060 (ferramenta): GPU local de 8 GB usada para executar os testes.
  • API do ComfyUI (ferramenta): Interface exportada a partir de um workflow para enviar prompts e automatizar gerações em lote.
  • ChatGPT (modelo): Serviço usado para criar prompts de teste para o modelo de imagens.

00:00 Certo, neste vídeo, vamos conhecer o Qwen-Image 2.1, e vocês podem ver que ele consegue mudar a roupa aqui. Também vamos fazer outros experimentos. Vocês podem ver as imagens que geramos. Vale lembrar que tudo aqui está rodando no meu sistema local, que tem uma GPU RTX 4060. Vamos testar. Eles lançaram o Qwen-Image 2.1, um modelo de imagem da família Qwen que equilibra qualidade de geração, eficiência de inference e custo. Ele tem 7 bilhões

00:31 de parâmetros apenas no componente de geração visual, e há quatro melhorias principais: compacto e eficiente, transparência nativa, criação e edição unificadas, edição versátil, texturas realistas e estética refinada. Muito bom. Vocês podem ver que ele está na sétima posição aqui, e eu gostei bastante. Esta é uma arquitetura leve. O componente de geração visual tem 32 camadas de diffusion transformer de fluxo único e 7 bilhões de parâmetros. É realmente incrível. Então, vamos ver estes exemplos,

01:02 mas, além dos exemplos, vou testá-lo no meu próprio sistema. Para testar os modelos, fui até a seção de modelos e encontrei o Qwen-Image 2.1, com 48,4 mil downloads. Mas o que realmente me interessou foi este, que é um modelo sem censura, está no formato GGUF e também tem um bom número de downloads. Então, se vocês acessarem esse arquivo de Evan Zerbs, verão que é um modelo sem censura e que há algumas versões quantizadas em GGUF

01:32 que serão muito úteis para este laptop com GPU de 8 GB que tenho aqui. Para executá-lo, vamos usar o ComfyUI. Para configurar o ComfyUI, vocês podem seguir o método habitual em um sistema Linux, mas agora o ComfyUI também tem uma versão para desktop. Então, podem acessar o ComfyUI Desktop, baixar essa versão e executá-la no próprio sistema. Essa é uma maneira muito fácil de usar estes modelos de visão e linguagem. Então, vamos baixar a versão para desktop. Então,

02:04 depois de baixá-la, vocês terão algo parecido com este ComfyUI Desktop. Vou abri-lo no meu sistema. Se houver alguma atualização, vocês precisarão atualizar. Vocês podem se cadastrar. Já me cadastrei com meu e-mail. Não importa se vocês estão cadastrados ou não. O que podem fazer agora é criar uma nova instância aqui. Vamos dar um nome a ela, por exemplo, YouTube um. Em builds públicas, acessem a opção de builds públicas. Vocês podem ver que estamos usando este modelo inicial recomendado pela Nvidia. Tudo bem. Vocês

02:34 podem simplesmente clicar. Vocês podem ver que a GPU Nvidia foi detectada aqui. A memória necessária é de 33 GB. O requisito é de 4,96 GB. E temos 33 restantes, o que vai funcionar muito bem. Então, posso ignorar tudo isso. Vocês podem ver que a instalação está sendo descompactada aqui. O sistema está preparando toda a configuração. Enquanto isso, posso pegar o arquivo JSON. Se vocês acessarem o GGUF sem censura, encontrarão esta estrutura. Estes são os arquivos necessários para os modelos. Em

03:05 modelos de difusão, precisamos do Qwen-Image 2.1 AUC quantizado em 4KM. Esta opção foi escolhida como quantização GGUF, e deve ser uma boa opção para o meu laptop. Para os codificadores de texto, vamos usar os codificadores de texto SafeTensors BFloat16 ou Int8. Depois, para o VAE, precisamos do Qwen-Image 2.1 VAE BF16 SafeTensors. Vejo que está quase pronto. Agora, vocês podem pegar estes dois workflows. O primeiro é de texto para imagem. E também

03:36 temos a edição de imagem. Vou abri-lo em uma nova aba. Este é o de texto para imagem. Posso baixá-lo. Vou colocá-lo em uma nova pasta. Então, vamos baixá-lo. Também vou baixar o de edição de imagem. Cliquem com o botão direito e abram em uma nova aba. Depois, também podemos baixar o JSON de edição de imagem. Vamos até a pasta. Vocês podem ver que temos dois arquivos JSON que ajudam a carregar os modelos. Basicamente, vocês podem criar os próprios, mas é muito bom ter estes prontos, e eles podem

04:08 acelerar bastante o workflow e permitir que vocês testem tudo o quanto antes. Enquanto isso carrega, vou ao ChatGPT para pegar alguns prompts. Esta é a página. Vou enviar a página ao ChatGPT e perguntar: você pode me dar 20 prompts para testar isso? Ele vai processar o pedido, e tudo ficará pronto em apenas alguns minutos. Isso leva um tempo. Se precisarem de outra GPU, podem sempre usar uma GPU na nuvem, mas, neste sistema local, eu realmente gostaria

04:40 de testar este modelo quantizado em 4 bits. Vamos ver alguns exemplos. Ele tem transparência nativa, criação e edição unificadas, e aqui estão os exemplos de imagens com transferência. O resultado parece bem nítido. Pode ser usado em muitos projetos. Vocês podem ver que, ao unificar geração e edição, o Qwen-Image 2.1 também permite editar imagens transparentes diretamente. Ele consegue mudar a expressão do sujeito e manter o corpo transparente. Aqui, por exemplo, a expressão passa de entediada a animada. E vocês podem ver que, na própria camada transparente, é possível mudar o texto de azul para Qwen-Image. É uma capacidade muito boa

05:11 para testar. Essa capacidade também se estende a fotografias reais. Dada uma imagem RGB, o modelo pode extrair o sujeito desejado como uma camada RGB com transparência, facilitando sua reutilização em projetos posteriores. Ele conseguiu extrair esta folha, e agora vocês podem usar essa folha em outro lugar. Também temos edição versátil. É possível usar até 10 imagens de referência. Vocês podem ver esta pessoa aqui, a pessoa de camisa vermelha, esta pessoa, esta mulher e esta pessoa de casaco aqui,

05:43 e todas estas pessoas no mesmo quadro, o que é muito bom. Uma foto de grupo gerada a partir de seis retratos. É mais uma coisa que vocês podem testar. Então, acho que terminou. Nosso sistema está pronto aqui. Agora, vou pegar aquele arquivo JSON que tínhamos. Vou simplesmente colá-lo ou arrastá-lo para cá. Depois, vocês verão estes itens aqui e poderão ver que precisamos colocar os modelos nestes locais. Se clicarem neste local, verão que está faltando este modelo. Então, posso simplesmente baixá-lo aqui, e isso

06:14 vai baixar os modelos. Depois que o download terminar, basta atualizar a página e vocês terão todos os modelos aqui. À esquerda, vocês podem ver as proporções: quadrado, foto 3:2, 3:4, 4:3, depois 9:16, 16:9 e ultrawide. Vou escolher quadrado por enquanto. Também é possível mudar os megapixels, mas isso certamente vai levar algum tempo. CFG está em um, o número de steps é 25, o sampler é Euler, o scheduler é simples, e estas são as configurações

06:45 de que precisamos aqui. Enquanto o download acontece, vocês podem ver que o arquivo de cerca de 8 GB está sendo baixado. Com certeza vai levar algum tempo. Mas, se voltarem ao workflow, vou mostrar aqui os arquivos necessários. Em modelos de difusão, se vocês procurarem os modelos no sistema, obviamente vão precisar do caminho. Acessem as configurações do desktop e depois a seção de armazenamento. Vocês podem ver o caminho aqui. Vou abrir o caminho e copiá-lo. Vamos

07:17 Feche tudo o mais e depois abra Meu Computador ou o Explorador de Arquivos. Em seguida, vá até esta pasta de modelos. Esta é a pasta onde tudo está disponível. Dentro de models, precisamos de diffusion models; e, dentro de diffusion models, precisamos manter o Q8. Então, dentro de diffusion models, precisamos manter este modelo UCQ4KM. Certo? Para obter este modelo, vá até o topo aqui e baixe-o. Você está vendo um Q4KM. Este é um modelo. Então, basta

07:49 clicar com o botão direito ou abri-lo em uma nova guia e baixar o modelo. Para baixá-lo, basta clicar neste botão de download. Ele será baixado para o seu sistema local. Você pode indicar a pasta exata que quer usar aqui, artificial models, e baixá-lo nela. O mesmo vale para os outros itens: os text encoders, que você pode obter aqui, e também o VAE, que pode obter aqui. Mas, se não quiser fazer isso, basta

08:20 haverá erros aqui. Você pode ir até os erros e clicar em baixar o modelo ausente. Isso vai baixar para você o modelo ausente — todos os modelos, especificamente. Depois, basta clicar com o botão direito aqui, clicar com o botão esquerdo e selecionar os modelos para iniciar a geração. Certo? Enquanto isso está sendo gerado, vou voltar e ver se meus prompts estão prontos. Vou ao ChatGPT, e você pode ver que temos estas opções diferentes para testar. Então, vamos testá-las

08:50 daqui a pouco. Mas, se você voltar, verá este bloco: é o text-to-image do Qwen-Image 2.1. Se clicar aqui, vai abrir a visualização mais detalhada que temos. Temos o modelo de difusão aqui. Estamos carregando o CLIP, carregando o VAE e, em seguida, temos a geração do espaço latente vazio. A largura e a altura vêm das entradas aqui. Depois temos a codificação do texto, a etapa de amostragem, a decodificação e, por fim, a imagem. No topo, você pode ver o aprimorador de prompt

09:22 aqui também, que é o prompt exato que está aprimorando o prompt aqui. Depois, estamos gerando o texto — basicamente, aprimorando o prompt — e enviando esse prompt de volta para a codificação de texto do Qwen-Image. Então, o K sampler usa tudo isso: o modelo, os prompts positivos e negativos e a imagem latente cujos ruídos vamos remover. Basicamente, a imagem latente é uma tela em branco e, como vimos, o tamanho da tela é alimentado diretamente

09:53 pelos valores de largura e altura que vimos na página inicial. Se eu voltar, você pode ver a proporção aqui. 1:1 significa que a largura e a altura são iguais, e esse valor é usado aqui. Quando estiver pronto, podemos atualizar a página e ver que ainda faltam alguns segundos. No topo, você pode ver que está quase em 98%. Faltam só 5 ou 6 segundos para terminar. E terminou. Agora posso atualizar a página, e parece que está tudo

10:24 certo. Vamos inserir nosso primeiro prompt. Vamos ao ChatGPT e pegar o primeiro: texto exato de pôster. Copie-o, coloque-o no prompt aqui e clique em executar. Se você entrar, poderá ver em que etapa está. Agora está na etapa de condicionamento; quando chegar ao K sampler, começará a geração e, depois, a decodificação do VAE converterá o resultado de volta em imagem. Vamos voltar. Posso ver o número de

10:55 tarefas em execução aqui; você pode conferir. Esta tarefa está em 24%; no total, só 7% foi concluído. Vamos ver quanto tempo essa geração leva. Enquanto isso, posso pegar o segundo prompt, copiá-lo, colocá-lo aqui e executá-lo também. Ele será adicionado como a segunda tarefa. Vou criar mais algumas. Vou inserir também a terceira tarefa e clicar em executar; depois, a quarta tarefa. Basta colocá-la aqui e executar. Então,

11:27 a primeira terminou. Para vê-la, você também pode acessar Assets, à esquerda. Esta é “Midnight Signal”. O prompt era este: “Crie um pôster cinematográfico de show, ‘Midnight Signal and Life in the City’”. Ficou muito bom. Vou clicar duas vezes aqui para abrir. Isso é incrível. Está sendo gerado no meu sistema local. É realmente incrível. Certo, a próxima: como um urso se reproduz no inverno. Este é um pequeno infográfico organizado, e você pode ver que, aos poucos, a frequência cardíaca diminui e a energia é conservada quando as condições

11:59 melhoram. É muito bom para um modelo quantizado em execução no nosso próprio sistema. A próxima era uma mulher mais velha de SMS; se você abrir aqui, ficou ótimo, realmente incrível. Depois temos uma fotografia de estúdio de um produto, preservando exatamente o texto “Northfield”. Certo, vamos ver. Temos esta garrafa de água chamada Northfield. Muito bom. Vamos testar as coisas de transparência. Copie o prompt, coloque-o aqui e execute. Vou pegar também os outros prompts. Se esse processo manual parece tedioso para você,

12:30 você sempre pode usar as APIs do ComfyUI. Para isso, basta ir até aqui, clicar com o botão direito e exportar como API. Ao exportar como API, você terá este arquivo JSON que está vendo aqui. Esta API. Se abrir o arquivo, verá que temos este JSON, e todas as opções e seleções que fizemos estão disponíveis nele. Basta inserir os prompts e usar isso como

13:00 uma API. Então, se você está tentando fazer geração em lote, este é o caminho. Vou inserir mais prompts. O próximo é “referências múltiplas”, usando a imagem de referência de retrato fornecida. Referências múltiplas, deixa eu ver. Certo, vou importar também o outro arquivo JSON que baixei, o de edição de imagem. Vou abrir uma nova guia e importar aqui esse arquivo de edição de imagem. Certo, esta é uma arquitetura diferente, que precisa de imagens aqui, e então você poderá

13:31 editar essas imagens. Vou verificar se há algum erro. Como você pode ver, temos estes erros: são os modelos ausentes. Posso baixar todos os modelos ausentes aqui. Primeiro, está faltando o modelo, então os modelos estão sendo baixados; também está faltando a saída. Certo, vamos voltar às gerações que estávamos fazendo. Esta foi uma geração de imagem. O prompt era algo como: “Panda-vermelho generativo em 3D, corpo inteiro,”

14:01 com estilo de desenho animado. Este é o resultado. Incrível. Depois temos: “Crie uma folha de recursos com fundo transparente e exatamente quatro objetos separados”. A bússola de latão aqui, ótimo. O mapa de papel dobrado, ótimo. Depois há uma pequena mochila vermelha e uma lanterna de acampamento prateada, que ficaram muito boas. Em seguida, temos letras transparentes com as palavras exatas “Make It Real”. Ótimo. Pronto. Vamos para a edição de imagem. Na edição de imagem, precisamos inserir imagens de referência. Podemos adicionar imagens de referência. Eles usam

14:32 como exemplo, só duas imagens aqui, mas tenho certeza de que você pode colocar 10 imagens aqui, como dá para ver. Então, para a imagem de referência, o que posso fazer é colocar… vamos ver, onde isso leva? Certo. Certo, isso é para comparação de imagens. Então, o que você pode fazer é colocar a pessoa aqui e, na imagem dois, podemos colocar um objeto. Para colocar a pessoa, posso simplesmente escolher e procurar uma pessoa. Então, vamos colocar essa pessoa aqui e talvez possamos trocar a roupa. Para isso, vamos pegar uma

15:03 foto de uma peça de roupa. Sim, eu queria um vestido, então posso pegar este. Então, aqui está o vestido que selecionei; posso voltar e fazer o upload dele. Escolha o arquivo aqui e selecione este vestido vermelho, certo? Depois que o modelo terminar de baixar, podemos atualizar a página e, em seguida, alterar isso e gerar uma nova imagem, certo? Então, está pronto. Vejo você daqui a… vejo você daqui a pouquinho. Certo, acho que terminou. Agora, posso atualizar a página. Legal. A atualização foi concluída.

15:36 Então, você pode ver que alterei este prompt para substituir o vestido branco da mulher pelo vestido vermelho fornecido, e dá para ver o uso da GPU à esquerda. Cerca de 95% da GPU está sendo usada, e alterei a opção de prompt refinado para false. Também dá para ver que o KSampler está funcionando aqui. Se você clicar duas vezes aqui, ou simplesmente clicar uma vez, verá que o KSampler está em andamento. Você pode voltar e esperar o resultado. Isso levou cerca de 126 segundos, quase o dobro do tempo que leva para gerar uma imagem a partir de texto ou gerar uma imagem de texto. E agora, podemos ir até os recursos aqui e ver o resultado. Então, você… Dá para ver que, comparando o original à direita com a versão editada à esquerda, o vestido da mulher foi trocado. Neste vídeo, vimos como usar o Qwen Image 2.1 localmente. Se tiver interesse, você pode conferir e testar no seu próprio sistema também. Depois, me conte como foi. O modelo que usei foi o Qwen Image 2.1 uncensored GGUF do Eben Zerps, e usei a versão quantizada

16:07 4-KM aqui. Então, vejo você em outro vídeo. Confira o próximo vídeo.

16:38 A versão de 4 km está aqui. Então, vejo vocês em outro vídeo. Confira o próximo vídeo.

Transcrição original

[00:00] All right, in this video, we will see Kwen Images 2.1 and you can see that it is able to change the dressing here. There are other experiments that we’ll do here as well. You can see the images generation that we have done. Now, mind you that everything here is running on my local system, which is an RTX 4060 GPU and let’s go ahead and test this out. They have opened Weight Image Kwen Image 2.1. It’s an image model in the Kwen family that balances generation quality, inference efficiency, and cost. It has 7 billion

[00:31] parameters only in the visual component generation component and there are four key improvements: compact and efficient, native transparency, unified creation and editing, versatile editing, and had realistic textures and refined aesthetics. Really good and you can see that it stands at number seven here and I really like it. This is a lightweight architecture. It’s visual generation component contains 32 single stream diffusion transformers layers and 7 billion parameters and it’s really amazing. So, let’s see these examples,

[01:02] but more than the examples, I’m going to go ahead and check it out on my own system. Now, for trying out the models, I went through the model section here and I was able to see Kwen Image 2.1 here, which is a 48.4K downloads, but the one that really interested me was this one, which is an uncensored model and it’s a GGUF file and it has again a good number of downloads here. So, if you go to that file by Evan Zerbs, it’s an uncensored model and there are some GGUF quantized

[01:32] versions here as well that will be very beneficial for this 8GB GPU laptop that I have here. Now, for running this, we will use ComfyUI. Now, for setting up ComfyUI, you can go ahead and go through the usual style of doing this on a Linux system, but now ComfyUI have the desktop feature as well, so you can go ComfyUI desktop and you can download this desktop and run it on your own system. That’s a and very easy way to use this vision language models. So, let’s go ahead and download this on desktop. So,

[02:04] once you download this, you will have something like this comfy desktop. And let me open that up on my system. So, if there are any updates you need to update, you can sign it up. I’m already signed up uh with my mail. Doesn’t matter if you’re signed up or not. But, what you can do is now go ahead and create a new instance here. And let’s go ahead and name it, for example, let’s say YouTube one. And public builds, go to a public builds here. And you can see that we’re using this Nvidia recommended here starter template. It’s okay. You

[02:34] can just go ahead and click on. You can see detected GPU Nvidia here. And then the required memory is 33 GB. The required is 4.96 GB. And we have 33 remaining, which will work really fine. So, I can skip all these. And you can see that it’s unpacking the installation here. So, it’s getting the entire setup ready. And in the meantime, what you can do is I can go ahead and go ahead and get that JSON file. So, if you go here to the uncensored GG UF, you will have this structure. So, these are the files which are required for the models. Under

[03:05] the diffusion models, we need the Kuan image 2.1 a UC quantized 4KM. This is chosen as a GG of quantization. And depending on my laptop, this would be the good option. Text encoders, we’re going to use the text encoders the safe double Bfloat 16 or the int 8 as well. Then the VAE, we would need the Kuan image 2.1 VAE BF16 safe tensors. So, I can see this is almost getting ready. And now what you can do is you can get these two workflows. The first is the text to image here. And then we

[03:36] have the image edit as well. So, I’m going to go ahead and open it up on a new tab. This is the text to image. I can go ahead and download this. So, I’m going to put it on a new folder here. So, let’s download this. I’m going to download the image edit as well. So, right click open on a new tab here. and then we can download the image edit JSON as well. So, let’s go there to the folder here. So, you can see that we have two JSON files that will help you load the models here. Essentially, you can create your own, but these are really good to have, and you can

[04:08] specially speed up your workflow and test it out as soon as possible. So, while this is loading in the meantime, what you can do is I’m going to go to chat GPT and get some prompts here. So, this is the page. I’m going to give the page to chat GPT, and can you give me 20 prompts to test out this, okay? So, it’s going to walk through this, and this will be ready in just a few minutes. It does need time. If you need another GPU, you can go ahead and always go ahead and get cloud GPU, but for this local system, I really would

[04:40] like to test this 4-bit quantized model here. So, look at the few examples. So, it has a native transparency, unified creation and editing, and here the examples of a transfer images. It looks really crisp. It can be used for a lot of projects, and you can see by unifying generation and editing, when image 2.1 also supports editing transparent images directly. It can change the subject’s expression when retaining the transparent body. So, it’s from like boring to like excited here. And you can see that in the transparent layer itself, you can change the text from blue to when image. That’s really great

[05:11] capability to test. This is another uh the capability extends to real photograph as well. Given an RGB image, the model can extract the desired subject as an RGB layer with transparency, easier to make it reusable in subsequent designs. So, it was able to extract this leaf here, and now you can use this leaf uh somewhere else. We have versatile editing as well. Up to 10 reference images can be put. So, you can see that this person here, this red uh shirt person, and this person uh this lady, and this person in a coat here,

[05:43] and this person all on the same frame, which is really good. A group photograph generated from six portrait images. This is another thing that you can go ahead and test it out. So, I guess this is done. We have our system ready here. Now, what I’m going to do is I’m going to take that JSON file that we had. I’m going to just paste it or pull it here. Then, you’ll see that we have these here and we can see that we need to put these models here. Now, if you click on this location, you can see that this is missing this model. So, what I can do is I can just download it here and this

[06:14] will download the models here. So, once it is downloaded, what you can do we can just refresh it and you will have all the models here. But, on the left you can see we have this aspect ratio of square square photo 3:2, 3:4, 4:3, then we have 9:16, 16:9, and ultra wide. I’m going to go with square for now and you can change the megapixel as well, but it will need definitely some time. CFG is one and the steps is 25, sampler Euler, scheduler simple, and this is the things

[06:45] that we need here. So, while this is downloading, you can see that it’s downloading here about 8GB file. It will definitely take some time. But, if you go back to the workflow here and let me show you here, these are the files that you need. So, under models diffusion models, so if you go and look inside your system for the models, you need the path obviously. So, you go to desktop settings here and then go to storage here and you can see that this is the path here. So, I’m going to open the path and copy the path here. Let’s

[07:17] close everything else and then go to my computer or file explorer and then go ahead and go to this models here. So, this is the folder where everything is available. So, inside the models we need diffusion models and inside the diffusion models we need to keep the Q8. So, inside the diffusion models we need to keep this model of UCQ4KM. All right? So, to get this model you can go ahead, go to the top here, and then you can get this model. So, you see a Q4KM. This one is a model. So, just

[07:49] right click, or you can just open it on the new tab, and then just go ahead and download this model. Now, for downloading this, you can just click on this download button. This is going to download on your local system. You can just point it to the exact folder that you want here, artificial models, and then you can just download it here. Now, same goes for the other things as well. So, the other things being the text encoders, and you can get it from here, and then the VAE as well. You can get it from here. But, if you don’t want to do this, you can just go ahead and

[08:20] there will be errors here. You can go ahead to the errors and just click on download the missing model. It’s going to download the missing model for you, all the models specifically, and then you can just right click here, and then you can just left click, and you can just select the models for getting the generation started. Okay? So, while this is generating, I’m going to go back and see if my prompts are ready. So, I go to ChatGPT, and you can see that we have these different things that we can go ahead and test out. So, we will test it out in

[08:50] just a moment. But, if you go back, and you can see this block, this is a text to image quant image 2.1, and if you just click here, you’ll be brought to the more exploded things exploded view that we have here. So, we have the diffusion model here. We are loading the clip, loading the VAE, and then we have the empty latent space generation here. So, the width and height are taken from the inputs here, and then we have the text encode here, and then we have the sampling part here, the decode part, and we get the image here. On the top, you can see that we have the prompt enhancer

[09:22] part here as well, which is the the exact prompt we’re enhancing the prompt here, and then we’re generating the text, we’re enhancing the prompt basically, and then we are feeding that prompt back to the actual text encode quant image here, and then the K sampler takes everything here. It takes the model, it takes the positive and negative prompts, it takes the latent image whose noises we’re going to remove. Basically, the latent image is a blank canvas, and the size of the canvas, as we have seen, is directly fed

[09:53] from the width and height values on the front page that we’ve seen. So, if I go back, uh you can see that we have the aspect ratio here. 1:1 means the width and height is the same, and it’s fed here. So, once this is ready, uh we can just refresh this and see we still have a few seconds remaining. So, you can see on the top, uh it’s almost 98% here. Just 6 5 to 6 seconds and this will be done. And that’s done. Now, I can do refresh here, and everything seems to be

[10:24] fine here. So, let’s go ahead and put in our first prompt. So, let’s go to ChatGPT. Go ahead to the first one, uh exact poster text. So, copy this and just put in the prompt here, and just click on run. So, you can see if you go inside, you can see which step it is in. It is uh inside the conditioning step now, and once it goes to the K sampler, it will start the generation here, and then the VAE decode will translate this back to the image here. So, let’s go back, and I can see that the number of

[10:55] jobs which are running here you can just view here, and then you can see this is the job uh 24% total is just 7% is done, and we’ll see how much time does it take for this generation. But, in the meantime, what I can do is I can go to the second prompt here. Go ahead, copy this, and put it here, and just run that as well. So, this will get attached as a second job. I’m going to create some more. I’m going to put in the third job here, as well, and I’m going to say run here, and the fourth job here, as well. Just put it here, and just run this. So,

[11:27] the first is done. Now, in order to view this, you can go to assets here, as well, on the left. So, this is midnight signal. The prompt was this one. Uh create a cinematic concert poster midnight signal and life in the city. So, this is really good. So, I just double click here and this will open up here. And that’s really amazing. This is generating on my local system. It’s really amazing. All right, the next one how a bear breeds in winter breeds in winter. This is small organized foot infographics and you can see that slowly heart rate conserve energy weak when conditions

[11:59] improve. That’s a really good for quantized model running on our own system. The next was an older SMS woman and if you go here, really great really amazing. Then we have photo studio photograph of a preserve the exact text Northfield. Okay, let’s see. So, we have this water bottle called Northfield. Really great. Let’s go ahead and test the transparency things here. So, let’s copy the prompt and put it here and then run this. Let me take the other prompts as well. Now, if this manual things feel bored to you,

[12:30] what you can do is you can always use the APIs of ComfyUI here. So, for using that what you can do is I can just go here. So, right click here and then export as an API here. Now, if you export that as an API, what you will have is this JSON file that you see here. This API and if you open this up, you’ll be able to see that we have this JSON file and and all the things all the selections that we have done is available here and you just need to put the prompts and just use this as

[13:00] an API. So, if you’re trying to do batch generation, this is the way out. So, I’m going to put in more prompts here. The next is multiple reference. So, using the supplied portrait reference. So, multiple reference, let me see. Okay, so I’m going to import the other one as well the other JSON file that I downloaded which is the image edit. So, I go to new tab here and then import this image edit here. Okay, so this is a different architecture here, which would need images here, and then you’ll be

[13:31] able to edit those images. So, I’m going to see if there is any errors here. So, you can see we have these errors. These are the missing models. So, what I can do is I can download all the missing models here. So, the first thing is that we are missing the model, so it’s downloading the models here, and then we are missing the output as well. All right, let’s go back to our generations that we were having. So, this was the generation. This is the generation of an image. The prompt was something like this, generative full body 3D cartoon

[14:01] red panda. This is the one. Amazing. And then we have the create a transparent background asset sheet with exactly four separate objects. The brass compass here, good. Folded paper map, good. Then you have a small red backpack and a silver camping lantern, which is really great. Then we have transparent lettering, exact words make it real, good. So, this is done. Let’s go to the image editing one. Now, in the image editing one, what we need to do is we need to put in reference images. So, we can put in reference images. They use

[14:32] as an example of just two images here, but I’m sure you can put in 10 images here that you can see here. So, for the reference image, what I can do is I can put in, let’s see, where does it lead? Okay. Okay, that is for image comparison. So, what you can do is you can put the person here and that image two, we can put in an object here. So, for putting the person, I can just choose and then let’s find person. So, let’s put this person here, and then maybe we can change the clothing here. So, for that, let’s go ahead and get a

[15:03] photo of a clothing here. Yep, I just wanted a dress, so I can take this dress. So, so here’s a dress that I’ve selected, so I can go back and just upload that dress. So, choose the file here, go ahead and choose this red dress here, okay? Now, while after the model is completed downloading, then we can just refresh this, and then go ahead and change this and generate a new image here. Okay? So, this is ready. I’ll see in I’ll see you in just a minute. Okay, I guess this is done. Now, I can just do refresh. Cool. Refresh is done.

[15:36] So, you can see that I’ve changed this prompt to replace the lady’s white dress with the red dress given, and you can see the utilization on the left. About 95% of the GPU is used, and I’ve changed this to false, the refined prompt. And I can see that K sampler is working here. So, if you double-click here or just single-click, you can see that the K sampler is in process as of now. You can go back and just wait for the output. So, this took about 126 seconds, which is almost double the time and that it takes for a

[16:07] text to image or text image generation. And now, we can go ahead to the assets here, and then I can see the output here. So, if you So, you see from the original on the right to the edited on the left, the lady, we see that the dress has been changed. So, in this video, we have seen how we can use Kwench Image 2.1 locally. So, if you’re interested, you can go ahead and check this out and try this out on your own system as well, and let me know how it goes. But, the model that I’ve used is Kwench Image 2.1 uncensored GGGUF from Eben Zerps, and I’ve used the quantized

[16:38] 4-km version here. So, I’ll see you in another one. Check out the next video.