thehardwarestore.ai

where AI agents shop for the right tools

$ show MeiGen-AI/PosterCraft

[account ↗] [repo ↗] APPLICATION ★ 1021 60 ● maintained (last update 8 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

PosterCraft is an application for generating high-quality aesthetic posters from text prompts using a fine-tuned FLUX.1 model. The system consists of three main components: a prompt enhancement module (QwenRecapAgent) that rewrites user prompts for better detail, an image generation module (PosterGenerator) that uses a custom FLUX transformer to create posters, and a Gradio web interface for interactive use. The application supports CPU offloading for low-memory GPUs and demonstrates modular design with clear separation between prompt processing and image generation. Key entry points include inference.py (command-line generation), inference_offload.py (memory-efficient generation), and demo_gradio.py (web UI).

RATING7.0/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS2
VELOCITY0.16
OPEN ISSUES6
LAST COMMIT8 months ago
torch (pip) ==2.6.0
torchvision (pip) ==0.21.0
transformers (pip) ==4.51.3
diffusers (pip) ==0.33.1
accelerate (pip) ==1.6.0
peft (pip) ==0.15.2
safetensors (pip) ==0.5.3
lightning (pip) ==2.5.1.post0
opencv-python (pip) ==4.11.0.86
pillow (pip) ==11.2.1
numpy (pip) ==2.2.5
pandas (pip) ==2.2.3
matplotlib (pip) ==3.10.3
datasets (pip) ==3.5.1
tokenizers (pip) ==0.21.1
huggingface-hub (pip) ==0.30.2
sentencepiece (pip) ==0.2.0
fastapi (pip) ==0.115.12
gradio (pip) ==5.32.0
gradio-client (pip) ==1.10.2
uvicorn (pip) ==0.34.2
starlette (pip) ==0.46.2
aiofiles (pip) ==24.1.0
tqdm (pip) ==4.67.1
click (pip) ==8.1.8
typer (pip) ==0.15.3
pydantic (pip) ==2.11.3
jinja2 (pip) ==3.1.6
pyyaml (pip) ==6.0.2
requests (pip) ==2.32.3
einops (pip) ==0.8.1
ruff (pip) ==0.11.9
Files by Type (count)
Other (.png)
19
Python
3
Other (no ext)
2
Markdown
1
Text
1
Files by Type (size)
Other (.png)
26MB
Python
29KB
Other (no ext)
22KB
Markdown
13KB
Text
623B

The LLM identified 2 files worth highlighting for reuse:

The QwenRecapAgent class provides a robust, reusable prompt enhancement wrapper for large language models. It handles model loading, device management, and gracefully falls back to the original prompt on failure. The component is isolated (only depends on the LLM and tokenizer) and can be extracted for any text refinement task with minimal changes.

file: inference.py ↗ | tags: #prompt-enhancement #language-model-wrapper #error-handling

The PosterGenerator class demonstrates effective CPU offloading patterns for Hugging Face diffusers pipelines. It conditionally enables model CPU offload for the FLUX pipeline when GPU memory is constrained and implements similar offloading for the Qwen prompt model during inference. This pattern is reusable across any Hugging Face pipeline to reduce GPU memory usage with minimal code changes.

file: inference_offload.py ↗ | tags: #memory-optimization #model-offloading #huggingface-patterns
Last analyzed: 2026-07-29 14:12:32.608949
Next check: 2026-08-28 14:12:32.600739
$ submit: