topguy commited on
Commit
0eb4e19
·
1 Parent(s): 439c579

docs: Update design and readme to reflect ComfyUI integration and .env config

Browse files
Files changed (2) hide show
  1. README.md +10 -2
  2. design.md +9 -3
README.md CHANGED
@@ -5,7 +5,8 @@ RPGPortrait is a Gradio-based web application that helps users build highly deta
5
  ## Features
6
  - **25+ Character Parameters**: Deep customization including Identity, Appearance, Equipment, Environment, VFX, and Technical settings.
7
  - **🧠 Gemini Refinement**: Use Gemini 3 Pro to intelligently refine your technical prompts into vivid, artistic descriptions.
8
- - **🖼️ Gemini Image Generation**: Generate stunning portraits directly in the app using Imagen 4.0.
 
9
  - **💾 Save & Load**: Export your character configurations as JSON files and import them back to restore your exact selections.
10
  - **⚔️ Exotic Arsenal**: Expanded collection of exotic weapons, armor, and accessories (Katanas, Bone Armor, Arcane Plate, etc.).
11
  - **🎒 Dual Accessories**: Select up to two different accessories for your character.
@@ -29,7 +30,14 @@ RPGPortrait is a Gradio-based web application that helps users build highly deta
29
  ```
30
  5. **Set up Gemini API**:
31
  - Create a `.env` file in the root directory.
32
- - Add your API key: `GEMINI_API_KEY=your_api_key_here`
 
 
 
 
 
 
 
33
 
34
  ## Usage
35
 
 
5
  ## Features
6
  - **25+ Character Parameters**: Deep customization including Identity, Appearance, Equipment, Environment, VFX, and Technical settings.
7
  - **🧠 Gemini Refinement**: Use Gemini 3 Pro to intelligently refine your technical prompts into vivid, artistic descriptions.
8
+ - **🖼️ Multi-Backend Image Gen**: Toggle between **Gemini (Cloud)** and **ComfyUI (Local)** for image synthesis.
9
+ - **Workflow Injection**: Automated prompt, resolution, and seed injection into custom ComfyUI workflows.
10
  - **💾 Save & Load**: Export your character configurations as JSON files and import them back to restore your exact selections.
11
  - **⚔️ Exotic Arsenal**: Expanded collection of exotic weapons, armor, and accessories (Katanas, Bone Armor, Arcane Plate, etc.).
12
  - **🎒 Dual Accessories**: Select up to two different accessories for your character.
 
30
  ```
31
  5. **Set up Gemini API**:
32
  - Create a `.env` file in the root directory.
33
+ - Add your keys and connection info:
34
+ ```env
35
+ GEMINI_API_KEY=your_api_key_here
36
+ COMFY_HOST=127.0.0.1
37
+ COMFY_PORT=8188
38
+ OLLAMA_HOST=127.0.0.1
39
+ OLLAMA_PORT=11434
40
+ ```
41
 
42
  ## Usage
43
 
design.md CHANGED
@@ -17,7 +17,9 @@ The UI is built using `gradio.Blocks` to allow for a structured, multi-column la
17
  - **Generation Suite**:
18
  - Large technical prompt textbox (read-only).
19
  - **🧠 Refine with Gemini**: Calls Gemini 3 Pro to create a vivid prompt.
20
- - **🖼️ Generate Image**: Calls Imagen 4.0 for portrait generation.
 
 
21
  - **Output Area**:
22
  - Image display for the portrait.
23
  - 📥 Download button (PNG) for the generated image.
@@ -26,7 +28,9 @@ The UI is built using `gradio.Blocks` to allow for a structured, multi-column la
26
  The app uses a 3-stage prompt pipeline:
27
  1. **Technical Segmenting**: Combines dropdown values and extra info text into a base technical prompt using a YAML-based template.
28
  2. **AI Refinement (Gemini)**: The technical prompt is sent to `gemini-3-pro-preview` with specialized system instructions to "art-ify" the description.
29
- 3. **Image Synthesis (Imagen)**: The refined (or technical) prompt is sent to `imagen-4.0-generate-001` to synthesize the final image.
 
 
30
 
31
  ## Data & Persistence
32
  - **YAML Configuration**: `features.yaml` stores all possible dropdown values, their descriptive labels, and the final prompt template.
@@ -38,4 +42,6 @@ The app uses a 3-stage prompt pipeline:
38
  - **UI Framework**: Gradio
39
  - **AI Models**:
40
  - **Text**: `gemini-3-pro-preview`
41
- - **Image**: `imagen-4.0-generate-001`
 
 
 
17
  - **Generation Suite**:
18
  - Large technical prompt textbox (read-only).
19
  - **🧠 Refine with Gemini**: Calls Gemini 3 Pro to create a vivid prompt.
20
+ - **🖼️ Generate Image**: Routes to selected backend (Gemini or ComfyUI).
21
+ - **Backend Selector**:
22
+ - Radio buttons to toggle between **Gemini (Cloud)** and **ComfyUI (Local)**.
23
  - **Output Area**:
24
  - Image display for the portrait.
25
  - 📥 Download button (PNG) for the generated image.
 
28
  The app uses a 3-stage prompt pipeline:
29
  1. **Technical Segmenting**: Combines dropdown values and extra info text into a base technical prompt using a YAML-based template.
30
  2. **AI Refinement (Gemini)**: The technical prompt is sent to `gemini-3-pro-preview` with specialized system instructions to "art-ify" the description.
31
+ 3. **Image Synthesis**:
32
+ - **Cloud**: Sent to `imagen-4.0-generate-001`.
33
+ - **Local**: Sent to a ComfyUI endpoint via `POST /prompt`, utilizing a custom workflow (`comfy_rpg_char_gen.json`).
34
 
35
  ## Data & Persistence
36
  - **YAML Configuration**: `features.yaml` stores all possible dropdown values, their descriptive labels, and the final prompt template.
 
42
  - **UI Framework**: Gradio
43
  - **AI Models**:
44
  - **Text**: `gemini-3-pro-preview`
45
+ - **Image Cloud**: `imagen-4.0-generate-001`
46
+ - **Image Local**: ComfyUI (Local Server)
47
+ - **Configuration**: `.env` for API keys and connection hosts/ports (ComfyUI, Ollama).