File size: 3,341 Bytes
54766e4
 
6059178
 
 
 
54766e4
 
 
 
d254368
54766e4
d254368
54766e4
d254368
54766e4
 
 
 
 
 
 
 
12776ff
 
54766e4
 
ba441d6
 
 
 
 
 
 
 
 
 
 
 
54766e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1841bf1
54766e4
 
3ea208a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54766e4
 
 
 
6059178
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
license: apache-2.0
tags:
- img2img
- ComfyUI
- Controlnet
---

# Img2Img-Controlnet-ComfyUI

![Workflow](Images/ex4.png)

This repository contains the Img2Img project using Controlnet on ComfyUI. It focuses on two styles GTA and Anime.

![Example1](Images/ex3.png) ![Example](Images/ex1.png)

## Workflow

1. **Input Image**: The process starts by passing the input image to the LineArt and OpenPose preprocessors.
2. **ControlNet**: The preprocessed images are fed into ControlNet.
3. **Efficient Loader**: ControlNet outputs are then passed to the Efficient Loader, which loads the weights.
4. **KSampler**: Finally, the loaded data is processed through KSampler to generate the output image.

## Also deployed on - [OpenArt AI](https://openart.ai/workflows/bongo_lame_87/img2img-comfyui-controlnet/7HBWH8HXMhzIfOx9w1LM)

## Load the model in ComfyUI - [Workflow-Model](https://huggingface.co/Paresh1879/Img2Img-Controlnet-ComfyUI/blob/main/comfyui_workflow.json)

## Prompts Used:

### GTA

 1. **Positive Prompt** : In the style of Grand Theft Auto, loading screens, (palm trees), GTA style artwork, highly detailed, urban scene with numerous palm trees, neon lights, and graffiti, trending on ArtStation, preserving the individual's race, color and hair.
 2. **Negative Prompt** : (worst quality, low quality = 1.3), drastic change in facial features

### Anime

 1. **Positive Prompt** : In the style of classic anime, vibrant colors, large expressive eyes, highly detailed backgrounds, intricate character designs, dynamic poses, soft shading, fantasy or urban settings with cherry blossoms, traditional Japanese architecture, and bustling cityscapes, preserving the indvidual's race, color and hair.
 2. **Negative Prompt** : (worst quality, low quality = 1.3), drastic change in facial features
    
## Installation

1. **Clone the Repository**:
   ```bash
   git clone https://github.com/comfyanonymous/ComfyUI
   cd ComfyUI
   ```

2. **Install Dependencies**:

3. **Install Nodes and Models**:
   Copy the custom nodes and models listed to the respective directories in your ComfyUI installation.

## Custom Nodes

### Comfyroll Studio
- CR Aspect Ratio
- CR Multi-ControlNet Stack

### ComfyUI
- PreviewImage
- SaveImage
- LoadImage

### ComfyUI Nodes for Inference.Core
- CannyEdgePreprocessor
- OpenposePreprocessor
- LineArtPreprocessor

### Efficiency Nodes for ComfyUI Version 2.0+
- Efficient Loader
- XY Input: CFG Scale
- XY Plot
- KSampler (Efficient)

## Models - Checkpoint and VAE

- Checkpoint: [Dreamshaper](https://huggingface.co/Lykon/DreamShaper/blob/main/DreamShaper_8_pruned.safetensors) & [Realistic Vision](https://huggingface.co/numeraz/realisticvisionv60B1/blob/main/realisticVisionV60B1_v51VAE.safetensors)
- VAE: [SD VAE](https://huggingface.co/stabilityai/sd-vae-ft-mse-original/blob/main/vae-ft-mse-840000-ema-pruned.ckpt)

## KSampler Settings

The following settings were used in the KSampler (Efficient) node for ComfyUI:

- **Seed**: 4091745839
- **Steps**: 20
- **CFG**: 4.0
- **Sampler Name**: dpmpp_3m_sde_gpu
- **Scheduler**: karras
- **Denoise**: 1.00
- **Preview Method**: auto
- **VAE Decode**: true

These settings help in achieving efficient sampling while maintaining quality output in the ComfyUI framework.

## Docker

A Docker file is included for easy setup and deployment.

---