--- name: sogni-gen version: "1.5.4" description: Generate images **and videos** using Sogni AI's decentralized network. Ask the agent to "draw", "generate", "create an image", or "make a video/animate" from a prompt or reference image. homepage: https://sogni.ai metadata: clawdbot: emoji: "🎨" os: ["darwin", "linux", "win32"] requires: bins: ["node"] install: - id: npm kind: exec command: "cd {{skillDir}} && npm i" label: "Install dependencies" --- # Sogni Image & Video Generation Generate **images and videos** using Sogni AI's decentralized GPU network. ## Setup 1. **Get Sogni credentials** at https://sogni.ai 2. **Create credentials file:** ```bash mkdir -p ~/.config/sogni cat > ~/.config/sogni/credentials << 'EOF' SOGNI_USERNAME=your_username SOGNI_PASSWORD=your_password EOF chmod 600 ~/.config/sogni/credentials ``` 3. **Install dependencies (if cloned):** ```bash cd /path/to/sogni-gen npm i ``` 4. **Or install from npm (no git clone):** ```bash mkdir -p ~/.clawdbot/skills cd ~/.clawdbot/skills npm i sogni-gen ln -sfn node_modules/sogni-gen sogni-gen ``` ## Filesystem Paths and Overrides Default file paths used by this skill: - Credentials file (read): `~/.config/sogni/credentials` - Last render metadata (read/write): `~/.config/sogni/last-render.json` - OpenClaw config (read): `~/.openclaw/openclaw.json` - Media listing for `--list-media` (read): `~/.clawdbot/media/inbound` - MCP local result copies (write): `~/Downloads/sogni` Path override environment variables: - `SOGNI_CREDENTIALS_PATH` - `SOGNI_LAST_RENDER_PATH` - `SOGNI_MEDIA_INBOUND_DIR` - `OPENCLAW_CONFIG_PATH` - `SOGNI_DOWNLOADS_DIR` (MCP) - `SOGNI_MCP_SAVE_DOWNLOADS=0` to disable MCP local file writes ## Usage (Images & Video) ```bash # Generate and get URL node sogni-gen.mjs "a cat wearing a hat" # Save to file node sogni-gen.mjs -o /tmp/cat.png "a cat wearing a hat" # JSON output (for scripting) node sogni-gen.mjs --json "a cat wearing a hat" # Check token balances (no prompt required) node sogni-gen.mjs --balance # Check token balances in JSON node sogni-gen.mjs --json --balance # Quiet mode (suppress progress) node sogni-gen.mjs -q -o /tmp/cat.png "a cat wearing a hat" ``` ## Options | Flag | Description | Default | |------|-------------|---------| | `-o, --output ` | Save to file | prints URL | | `-m, --model ` | Model ID | z_image_turbo_bf16 | | `-w, --width ` | Width | 512 | | `-h, --height ` | Height | 512 | | `-n, --count ` | Number of images | 1 | | `-t, --timeout ` | Timeout seconds | 30 (300 for video) | | `-s, --seed ` | Specific seed | random | | `--last-seed` | Reuse seed from last render | - | | `--seed-strategy ` | Seed strategy: random\|prompt-hash | prompt-hash | | `--multi-angle` | Multiple angles LoRA mode (Qwen Image Edit) | - | | `--angles-360` | Generate 8 azimuths (front -> front-left) | - | | `--angles-360-video` | Assemble looping 360 mp4 using i2v between angles (requires ffmpeg) | - | | `--azimuth ` | front\|front-right\|right\|back-right\|back\|back-left\|left\|front-left | front | | `--elevation ` | low-angle\|eye-level\|elevated\|high-angle | eye-level | | `--distance ` | close-up\|medium\|wide | medium | | `--angle-strength ` | LoRA strength for multiple_angles | 0.9 | | `--angle-description ` | Optional subject description | - | | `--steps ` | Override steps (model-dependent) | - | | `--guidance ` | Override guidance (model-dependent) | - | | `--output-format ` | Image output format: png\|jpg | png | | `--sampler ` | Sampler (model-dependent) | - | | `--scheduler ` | Scheduler (model-dependent) | - | | `--lora ` | LoRA id (repeatable, edit only) | - | | `--loras ` | Comma-separated LoRA ids | - | | `--lora-strength ` | LoRA strength (repeatable) | - | | `--lora-strengths ` | Comma-separated LoRA strengths | - | | `--token-type ` | Token type: spark\|sogni | spark | | `--balance, --balances` | Show SPARK/SOGNI balances and exit | - | | `-c, --context ` | Context image for editing | - | | `--last-image` | Use last generated image as context/ref | - | | `--video, -v` | Generate video instead of image | - | | `--workflow ` | Video workflow (t2v\|i2v\|s2v\|v2v\|animate-move\|animate-replace) | inferred | | `--fps ` | Frames per second (video) | 16 | | `--duration ` | Duration in seconds (video) | 5 | | `--frames ` | Override total frames (video) | - | | `--auto-resize-assets` | Auto-resize video assets | true | | `--no-auto-resize-assets` | Disable auto-resize | - | | `--estimate-video-cost` | Estimate video cost and exit (requires --steps) | - | | `--photobooth` | Face transfer mode (InstantID + SDXL Turbo) | - | | `--cn-strength ` | ControlNet strength (photobooth) | 0.8 | | `--cn-guidance-end ` | ControlNet guidance end point (photobooth) | 0.3 | | `--ref ` | Reference image for video or photobooth face | required for video/photobooth | | `--ref-end ` | End frame for i2v interpolation | - | | `--ref-audio ` | Reference audio for s2v | - | | `--ref-video ` | Reference video for animate/v2v workflows | - | | `--controlnet-name ` | ControlNet type for v2v: canny\|pose\|depth\|detailer | - | | `--controlnet-strength ` | ControlNet strength for v2v (0.0-1.0) | 0.8 | | `--sam2-coordinates ` | SAM2 click coords for animate-replace (x,y or x1,y1;x2,y2) | - | | `--trim-end-frame` | Trim last frame for seamless video stitching | - | | `--first-frame-strength ` | Keyframe strength for start frame (0.0-1.0) | - | | `--last-frame-strength ` | Keyframe strength for end frame (0.0-1.0) | - | | `--last` | Show last render info | - | | `--json` | JSON output | false | | `--strict-size` | Do not auto-adjust i2v video size for reference resizing constraints | false | | `-q, --quiet` | No progress output | false | | `--extract-last-frame