ComfyUI Extension: comfyui_qwen_runninghub
Custom ComfyUI nodes for integrating RunningHub's AI image and video generation services into workflows. (Description by CC)
Custom Nodes (0)
README
** This is untested as I have no access to runninghub. It might work, It might not.
ComfyUI RunningHub Integration
Custom ComfyUI nodes for integrating RunningHub's AI image and video generation services into your workflows.
This package is a conversion of the freeqwenimage web application into ComfyUI custom nodes, allowing you to use RunningHub's AI capabilities directly in ComfyUI.
Features
- Text to Image Generation - Generate images from text prompts
- Image to Image Transformation - Transform images using text prompts
- Image Enhancement - Enhance image quality and resolution
- Image to Video Conversion - Convert static images into videos
- URL Image Loading - Load images from URLs into workflows
Installation
1. Install to ComfyUI Custom Nodes
cd ComfyUI/custom_nodes/
git clone https://github.com/marduk191/comfyui_qwen_runninghub.git
cd comfyui_qwen_runninghub
pip install -r requirements.txt
2. Configure RunningHub API Credentials
You need to obtain API credentials from RunningHub:
- Sign up for a RunningHub account
- Get your
WEBAPP_IDandAPI_KEYfrom the dashboard
Set them as environment variables:
export RUNNINGHUB_WEBAPP_ID="your_webapp_id_here"
export RUNNINGHUB_API_KEY="your_api_key_here"
Or on Windows:
set RUNNINGHUB_WEBAPP_ID=your_webapp_id_here
set RUNNINGHUB_API_KEY=your_api_key_here
Alternatively, you can enter them directly in the node parameters in ComfyUI.
3. Restart ComfyUI
Restart ComfyUI to load the new nodes. You should see them under the "RunningHub" category.
Available Nodes
RunningHub Text to Image
Generate images from text prompts.
Inputs:
prompt(string, required) - Text description of the image to generatenegative_prompt(string, optional) - Things to avoid in the imagewebapp_id(string, required) - Your RunningHub webapp IDapi_key(string, required) - Your RunningHub API keytimeout(int, optional) - Maximum wait time in seconds (default: 600)
Outputs:
IMAGE- Generated image
RunningHub Image to Image
Transform an existing image using a text prompt.
Inputs:
image(IMAGE, required) - Source image to transformprompt(string, required) - Description of how to transform the imagewebapp_id(string, required) - Your RunningHub webapp IDapi_key(string, required) - Your RunningHub API keytimeout(int, optional) - Maximum wait time in seconds (default: 600)
Outputs:
IMAGE- Transformed image
RunningHub Image Enhancer
Enhance the quality and resolution of an image.
Inputs:
image(IMAGE, required) - Image to enhancewebapp_id(string, required) - Your RunningHub webapp IDapi_key(string, required) - Your RunningHub API keytimeout(int, optional) - Maximum wait time in seconds (default: 600)
Outputs:
IMAGE- Enhanced image
RunningHub Image to Video
Convert a static image into a video.
Inputs:
image(IMAGE, required) - Source imageprompt(string, optional) - Description for video generationwebapp_id(string, required) - Your RunningHub webapp IDapi_key(string, required) - Your RunningHub API keytimeout(int, optional) - Maximum wait time in seconds (default: 600)
Outputs:
video_url(STRING) - URL of the generated video
RunningHub Load Image
Load an image from a URL.
Inputs:
url(string, required) - URL of the image to load
Outputs:
IMAGE- Loaded image
Example Workflows
Basic Text to Image
- Add a "RunningHub Text to Image" node
- Enter your prompt: "A beautiful sunset over mountains"
- Enter your API credentials
- Connect to a "Save Image" node
- Queue the workflow
Image Enhancement Pipeline
- Add a "Load Image" node with your source image
- Connect to "RunningHub Image Enhancer" node
- Enter your API credentials
- Connect to "Save Image" node
- Queue the workflow
Image to Video
- Add a "Load Image" node with your source image
- Connect to "RunningHub Image to Video" node
- Optionally add a prompt for video generation
- The output will be a video URL that you can download
API Information
This integration uses the RunningHub API which provides:
- Base URL:
https://www.runninghub.cn - Async Processing: Tasks are submitted and polled for completion
- Typical Processing Time: 30 seconds to 5 minutes depending on the operation
- Default Timeout: 10 minutes (600 seconds)
Node IDs
The RunningHub API uses different node IDs for different operations:
- Text to Image: Node ID 1
- Image Enhancer: Node ID 2
- Image to Image: Node ID 3
- Image to Video: Node ID 4
Troubleshooting
"RunningHub credentials are required" Error
Make sure you've set the environment variables or entered the credentials in the node parameters:
export RUNNINGHUB_WEBAPP_ID="your_webapp_id"
export RUNNINGHUB_API_KEY="your_api_key"
Timeout Errors
If tasks are timing out, try increasing the timeout parameter to 900 or 1200 seconds (15-20 minutes).
Task Failed Errors
Check the console output for detailed error messages from the RunningHub API. Common issues:
- Invalid API credentials
- Insufficient credits in your RunningHub account
- Invalid image URLs or formats
Import Errors
Make sure all dependencies are installed:
pip install -r requirements.txt
Source Project
This ComfyUI integration is based on the freeqwenimage web application, which provides a Next.js-based interface to RunningHub's AI services.
License
MIT License
Credits
- Original web app: freeqwenimage
- API Provider: RunningHub
- ComfyUI: ComfyUI
Support
For issues or questions:
- Open an issue on GitHub
- Check RunningHub documentation at https://www.runninghub.cn
- Refer to the original freeqwenimage project for API usage examples