openclawv1.0.0

ImageGen

@Mindloom-Labs0 stars· last commit 5mo ago· 0 open issues

Generate images locally on your system using NVIDIA GPU with FLUX.2-klein-4B model via Diffusers. Zero external API calls.

0.0/10
Verified
Apr 29, 2026

// RATINGS

GitHub Stars

New / niche

🟢ProSkills ScoreAI Verified
📍

Not yet listed on ClawHub or SkillsMP

// README

# imagegen `imagegen` is a local image-generation skill that leverages an NVIDIA GPU in your system for OpenClaw. It uses: - an NVIDIA GPU with CUDA available through PyTorch - a local Python runtime - Hugging Face `diffusers` - the `black-forest-labs/FLUX.2-klein-4B` model The generated image must be written under: ```bash $HOME/.openclaw/media/outbound/ ``` for the Agent to be able to handle the images and embed them elsewhere. ## Files - `SKILL.md`: skill instructions and usage rules - `run_image_model.sh`: shell wrapper used by the skill - `run_image_model.py`: Python entrypoint that loads the model and saves the image ## Requirements Before using this skill, make sure the host has: - Python 3.10+ - `bash` - an NVIDIA GPU - working CUDA support in PyTorch - internet access on first run to download model weights from Hugging Face Python packages required by this skill: - `torch` - `diffusers` - `transformers` - `accelerate` - `safetensors` - `huggingface_hub` - `sentencepiece` - `Pillow` ## Preferred Install: `.venv` This is the recommended setup. It matches the current wrapper, which expects a Python runtime in: ```bash $HOME/.venv/bin/python ``` ### 1. Create the virtual environment ```bash python3 -m venv "$HOME/.venv" ``` ### 2. Activate it ```bash source "$HOME/.venv/bin/activate" ``` ### 3. Upgrade packaging tools ```bash python -m pip install --upgrade pip setuptools wheel ``` ### 4. Install PyTorch with CUDA support Install the CUDA-enabled PyTorch build appropriate for the machine. Example: ```bash pip install torch --index-url https://download.pytorch.org/whl/cu124 ``` If the host uses a different CUDA build, use the matching PyTorch install command instead. ### 5. Install the remaining dependencies ```bash pip install diffusers transformers accelerate safetensors huggingface_hub sentencepiece Pillow ``` ### 6. Verify the environment ```bash "$HOME/.venv/bin/python" -c "import torch; import diffusers; print(torch.cuda.is_available())" ``` If this prints `True`, the runtime is ready. ## Alternative Install: local Python, no virtual environment This option installs packages into the local Python environment instead of a dedicated `.venv`. ### Important note The current `run_image_model.sh` script is configured to use: ```bash $HOME/.venv/bin/python ``` If you install dependencies without a virtual environment, you must also update `run_image_model.sh` so `VENV_PYTHON` points to your local Python, for example: ```bash VENV_PYTHON="/usr/bin/python3" ``` ### 1. Upgrade packaging tools ```bash python3 -m pip install --upgrade pip setuptools wheel ``` ### 2. Install PyTorch with CUDA support Example: ```bash python3 -m pip install torch --index-url https://download.pytorch.org/whl/cu124 ``` Use the correct CUDA build for the host if it differs. ### 3. Install the remaining dependencies ```bash python3 -m pip install diffusers transformers accelerate safetensors huggingface_hub sentencepiece Pillow ``` ### 4. Verify the environment ```bash python3 -c "import torch; import diffusers; print(torch.cuda.is_available())" ``` ## Example usage ```bash $HOME/.openclaw/workspace-pixy/skills/imagegen/run_image_model.sh \ flux2-klein-4b \ "A sunset over the ocean" \ $HOME/.openclaw/media/outbound/flux2-sunset.png \ 1024 \ 768 \ 4 \ 42 ``` ## Notes - The first generation may take longer because model weights may need to be downloaded. - The wrapper creates and uses cache directories under `$HOME/.cache/`. - The skill currently supports one model only: `flux2-klein-4b` but it can easily modify to leverage other models. Just ask your Agent.

// HOW IT'S BUILT

KEY FILES

README.mdSKILL.md

// REPO STATS

0 stars
0 open issues
Last commit: 5mo ago

// ACTIONS

Rate this skill

login to rate

// SCORE

Pending review

// DETAILS

Categorydesign
AuthorMindloom-Labs
Versionv1.0.0
PriceFree