My stuff

  • My Workflows

  • Liked Workflows

  • Following Workflows

Go to OpenArt main site
Upload workflow

Free LLM api prompter , 5 loops per call + Flux and prompt enhancer

5.0

0 reviews
2
4.5K
260
1
Description

## ComfyUI Workflow: LLM-Driven Image Generation with Flux


This advanced ComfyUI workflow combines free language models, prompt enhancement, efficient image generation, and automatic uploading to create a powerful and user-friendly AI art generation pipeline.


## Prerequisites


1. **API Keys**:

Β  - OpenRouter LLM API key (free)

Β  - ImgBB API key (free)


2. **Custom Node**:

Β  - Install the custom SaveImage node for ImgBB uploading: https://github.com/revirevy/Comfyui_saveimage_imgbb


3. **ComfyUI Installation**:

Β  - Ensure you have ComfyUI installed and set up on your system


4. **Additional Custom Nodes**:

Β  - Install the following custom nodes:

Β  Β  - ComfyUI_experiments

Β  Β  - ComfyUI-ModelDownloader

Β  Β  - ComfyUI-SUPIR

Β  Β  - KJNodes for ComfyUI

Β  Β  - Klinter_nodes

Β  Β  - pythongosssss/ComfyUI-Custom-Scripts

Β  Β  - ReActor Node for ComfyUI

Β  Β  - Various ComfyUI Nodes by Type


## Required Nodes


### Primitive Nodes

1. CLIPTextEncodeFlux

2. FluxPromptEnhance

3. FluxPromptGenerator

4. ImgBBUploader

5. LLM_prompt_generator

6. OllamaTextDescriber

7. Power Lora Loader (rgthree)

8. Primitive string [Crystools]

9. Primitive string multiline [Crystools]

10. Seed (rgthree)

11. Show any [Crystools]


### Custom Nodes

1. **ComfyUI Core Nodes**:

Β  - SaveImage

Β  - CheckpointLoaderSimple

Β  - DualCLIPLoader

Β  - VAEDecode

Β  - KSampler

Β  - VAELoader

Β  - CLIPTextEncode

Β  - KSamplerAdvanced


2. **Additional Custom Nodes**:

Β  - AIO_Preprocessor (ComfyUI Nodes for Inference.Core)

Β  - ModelSamplerTonemapNoiseTest (ComfyUI_experiments)

Β  - TonemapNoiseWithRescaleCFG (ComfyUI_experiments)

Β  - ModelDownloader (ComfyUI-ModelDownloader)

Β  - SUPIR_model_loader_v2_clip (ComfyUI-SUPIR)

Β  - ColorMatch, Superprompt, JoinStringMulti, EmptyLatentImagePresets (KJNodes for ComfyUI)

Β  - concat (Klinter_nodes)

Β  - ShowText|pysssss, MathExpression|pysssss, StringFunction|pysssss (pythongosssss/ComfyUI-Custom-Scripts)

Β  - ReActorRestoreFace (ReActor Node for ComfyUI)

Β  - JWDatetimeString (Various ComfyUI Nodes by Type)


## Workflow Features


- **Prompt Generation**: Utilizes free Ollama service and OpenRouter API for LLM-based prompt generation

- **Multiple Prompt Generation**: For each LLM API call, the workflow generates 5 interesting random prompts

- **Iterative Processing**: The workflow loops through each of these prompts, processing them individually

- **Prompt Enhancement**: Improves generated prompts for better results

- **Efficient Processing**: Uses Lightning Flux for as few as 4-5 steps

- **Image Uploading**: Automatically uploads generated images to ImgBB

- **Improved CLIP_L Prompting**: Enhanced prompting for better image generation

- **Noise Correction**: Includes logging and noise correction features


## Model Details


- **Checkpoint**: fluxArtfusion4Steps_v12.safetensors


## Workflow Process


1. **Initial LLM Call**: The workflow starts by calling the LLM API (either Ollama or OpenRouter).

2. **Prompt Generation**: The LLM generates 5 interesting and random prompts based on the initial input or parameters.

3. **Looping Process**:

Β  - The workflow enters a loop, processing each of the 5 prompts individually.

Β  - For each prompt:

Β  Β  a. The prompt is enhanced using the FluxPromptEnhance node.

Β  Β  b. The enhanced prompt is fed into the image generation pipeline.

Β  Β  c. The image is generated using the Lightning Flux model (4-5 steps).

Β  Β  d. Noise correction and other post-processing steps are applied.

Β  Β  e. The resulting image is uploaded to ImgBB.

4. **Output**: After processing all 5 prompts, the workflow will have generated and uploaded 5 distinct images.


## Usage Tips


- Ensure all required custom nodes are properly installed before running the workflow.

- Double-check that your API keys for OpenRouter and ImgBB are correctly entered in the appropriate nodes.

- Experiment with different prompt inputs to see how they affect the final output.

- Use the logging feature to understand the workflow process and identify any areas for optimization.

- Consider fine-tuning the noise correction parameters if you notice any artifacts in the generated images.

- Take advantage of the multi-prompt feature by reviewing all 5 generated images from each API call to select the best results.

- Consider adjusting the number of prompts generated per API call if you want more or fewer options (note that this may require modifying the workflow).

- Pay attention to how different prompts from the same API call can lead to varied results, which can be useful for understanding the LLM's creative range.


This workflow combines cutting-edge AI technologies with user-friendly features, making it an excellent tool for both beginners and advanced users in the field of AI-assisted image generation. It leverages the power of multiple prompt generation to provide a diverse set of outputs from a single LLM API call, combining efficiency with creativity and allowing users to explore a range of possibilities from each interaction with the language model.

Discussion

(No comments yet)

Loading...

No reviews yet

  • - latest (a year ago)

Primitive Nodes (48)

CLIPTextEncodeFlux (2)

DataMonitor (2)

Display Any (rgthree) (1)

Display Int (rgthree) (4)

FallbackAnyBatch (1)

FallbackImagePreviewer (1)

FluxPromptEnhance (1)

FluxPromptGenerator (1)

GODMT_BatchGetByIndex (1)

GODMT_SplitString (1)

IfConditionSelector (2)

ImgBBUploader (1)

JWStringMultiline (1)

JWStringReplace (1)

JWStringSplit (1)

LLM_prompt_generator (2)

LoopClose (1)

LoopOpen (1)

Note (1)

OllamaTextDescriber (1)

Power Lora Loader (rgthree) (1)

Primitive string [Crystools] (2)

Primitive string multiline [Crystools] (4)

Reroute (6)

Seed (rgthree) (3)

Show any [Crystools] (1)

UnetLoaderGGUF (1)

easy ifElse (2)

easy isNone (1)

Custom Nodes (49)

ComfyUI

  • - VAEDecode (1)

  • - SaveImage (1)

  • - KSamplerAdvanced (2)

  • - CLIPTextEncode (1)

  • - VAEDecodeTiled (1)

  • - PreviewImage (1)

  • - VAELoader (1)

  • - CheckpointLoaderSimple (1)

  • - DualCLIPLoader (1)

ComfyUI Easy Use

  • - easy unSampler (1)

  • - ImpactGaussianBlurMask (1)

  • - StringListToString (1)

  • - ApplyInstantIDControlNet (1)

  • - AIO_Preprocessor (1)

  • - TonemapNoiseWithRescaleCFG (1)

  • - ModelSamplerTonemapNoiseTest (1)

  • - IPAdapterAdvanced (1)

  • - ModelDownloader (1)

  • - SUPIR_model_loader_v2_clip (2)

  • - ColorMatch (1)

  • - Superprompt (2)

  • - JoinStringMulti (3)

  • - INTConstant (1)

  • - EmptyLatentImagePresets (1)

  • - StringConstant (1)

  • - concat (2)

  • - ShowText|pysssss (7)

  • - MathExpression|pysssss (1)

  • - StringFunction|pysssss (3)

  • - ReActorRestoreFace (2)

  • - JWDatetimeString (1)

  • - Logic Boolean (1)

  • - Text Contains (1)

  • - Image Save (1)

Checkpoints (1)

fluxArtfusion4Steps_v12.safetensors

LoRAs (0)