File size: 1,719 Bytes
a9d4dc6
206741c
 
a9d4dc6
 
 
206741c
a9d4dc6
206741c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: comfyui-deploy-gradio
app_file: main.py
sdk: gradio
sdk_version: 4.41.0
---
# ComfyDeploy Gradio Interface

This project provides a Gradio interface for interacting with ComfyDeploy, allowing users to dynamically generate UI components based on deployment input definitions and submit jobs to ComfyDeploy.

![ComfyDeploy Gradio Interface](assets/cover.png)

## Features

- Dynamic UI generation based on ComfyDeploy input definitions
- Support for various input types (text, image, number, checkbox, etc.)
- Asynchronous job submission to ComfyDeploy
- Real-time progress tracking
- Display of output images and text

## Installation

1. Clone this repository
2. Install the required dependencies:

```bash
pip install comfydeploy gradio pillow requests python-dotenv
```

3. Create a `.env` file in the project root with the following content:

```
API_KEY=your_comfydeploy_api_key
DEPLOYMENT_ID=your_deployment_id
```

## Usage

Run the main script:

```bash
python main.py
```

This will launch a Gradio interface in your default web browser. The interface will dynamically generate input components based on your ComfyDeploy deployment configuration. You can then input values and submit jobs to ComfyDeploy.

## How it works

1. The script fetches input definitions from ComfyDeploy.
2. It dynamically generates Gradio components based on these definitions.
3. When the user submits inputs, it sends a job to ComfyDeploy.
4. The script then polls for job completion and displays the results (images and text).

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)