title: GenSearcher + FireRed
emoji: π
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
suggested_hardware: a100-large
GenSearcher + FireRed-Image-Edit-1.1
This Space runs the official Gen-Searcher image workflow (GenImageDeepResearchWorkflow + create_gen_image_tools) against an OpenAI-compatible GenSearcher-8B server, then calls FireRed-Image-Edit-1.1 through the same HTTP /generate contract as the upstream Qwen image API.
Architecture
- Agent β vendored
vision_deepresearch_async_workflowfrom Gen-Searcher (unchangedcreate_gen_image_tools). - LLM β
OPENAI_BASE_URL+GEN_EVAL_MODEL(defaultGen-Searcher-8B). - Browse summaries β
BROWSE_SUMMARY_BASE_URL+BROWSE_SUMMARY_MODELwithBROWSE_GENERATE_ENGINE=vllm(see.env.gen_image). - Image generation β local FastAPI adapter at
QWEN_EDIT_APP_URL(defaulthttp://127.0.0.1:8765), compatible withcall_qwen_edit_to_generate_imagein upstreamgen_image_deepresearch_reward.py.
Space secrets / environment
Configure in the Space Settings β Variables and secrets (or a mounted .env.gen_image):
| Variable | Purpose |
|---|---|
SERPER_KEY_ID |
Optional. Serper API key for Google web + image search. If unset, text and image search use DuckDuckGo (no key; quality and availability vary, and some datacenter IPs may be rate-limited). |
JINA_API_KEYS |
Optional. Jina reader for r.jina.ai. If unset, the visit tool uses a direct HTTP GET and strips HTML to text (many sites block bots or return paywalls). |
WEB_TEXT_SEARCH_PROVIDER |
Override text search: duckduckgo or serper (default is auto: Serper when SERPER_KEY_ID is set, else DuckDuckGo). |
WEB_IMAGE_SEARCH_PROVIDER |
Override image search: duckduckgo or serper (same auto rule using SERPER_KEY_ID). |
BROWSE_READ_ENGINE |
Override page fetch: direct or jina (default is auto: Jina when JINA_API_KEYS is set, else direct). |
OPENAI_BASE_URL |
OpenAI-compatible base URL for GenSearcher-8B (e.g. https://.../v1) |
OPENAI_API_KEY |
API key for that endpoint (use EMPTY if unused) |
GEN_EVAL_MODEL |
Served model name (default Gen-Searcher-8B) |
BROWSE_SUMMARY_BASE_URL |
OpenAI-compatible base for Qwen3-VL browse summarizer |
BROWSE_SUMMARY_MODEL |
Model id (e.g. Qwen3-VL-30B-A3B-Instruct) |
BROWSE_SUMMARY_API_KEY |
Key for browse server (EMPTY if none) |
BROWSE_GENERATE_ENGINE |
Set to vllm for OpenAI-compatible servers |
If the FireRed adapter runs inside this container (default), you usually do not need to set QWEN_EDIT_APP_URL (the entrypoint sets it to http://127.0.0.1:8765).
See dotenv.example for a full template.
Hardware
- Minimum practical: 1Γ GPU for FireRed + Gradio, with external vLLM endpoints for GenSearcher and browse (set
START_VLLM_GENSEARCHER=0,START_VLLM_BROWSE=0β defaults). - Full local (as in upstream scripts): multiple GPUs β enable
START_VLLM_GENSEARCHER=1,START_VLLM_BROWSE=1, and setGENSEARCHER_CUDA_VISIBLE_DEVICES,BROWSE_CUDA_VISIBLE_DEVICES,FIRERED_CUDA_VISIBLE_DEVICESto disjoint GPU indices.
Troubleshooting: Connection error / model call failed
The agent talks to your LLM over HTTP (OpenAI-compatible). A connection error almost always means nothing is listening at OPENAI_BASE_URL, or the URL is wrong for where the Space runs.
Default
http://127.0.0.1:8002/v1only works if vLLM for GenSearcher-8B is started inside the same container (START_VLLM_GENSEARCHER=1and enough GPU). On a typical 1ΓGPU Space with only FireRed running, 127.0.0.1:8002 is empty β connection error.Fix: Set Space secret
OPENAI_BASE_URLto a reachable HTTPS (or HTTP) base URL that ends with/v1, where you host GenSearcher/Gen-Searcher-8B behind vLLM, Text Generation Inference, or any OpenAI-compatible stack. The UI shows an endpoint check on load; use Re-check endpoints after you change secrets.Browse tool: If
BROWSE_GENERATE_ENGINE=vllm, setBROWSE_SUMMARY_BASE_URLthe same way (not localhost unless you run that vLLM in-container withSTART_VLLM_BROWSE=1).
Local build
cd hf-space
docker build -t gensearcher-firered .
docker run --gpus all -p 7860:7860 --env-file .env.gen_image gensearcher-firered
Deploy to your Hugging Face account
hf auth login
hf repos create JSCPPProgrammer/gensearcher-firered --type space --sdk docker --private
# from hf-space/
hf upload JSCPPProgrammer/gensearcher-firered . .
Then set Space GPU and secrets in the Hub UI.