genai-vision
Integrating Stable Diffusion for vision generation and Whisper for audio/multimodal tasks.
Skill by j4flmao
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/j4flmao-genai-vision
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/genai-vision
What's inside
- Skill name
genai-vision- Description
- Integrating Stable Diffusion for vision generation and Whisper for audio/multimodal tasks.
- License
- MIT
- Instructions
- 32 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# GenAI Vision & Audio
## Purpose
Ship image generation and speech transcription with open models: pick a model whose license fits the use case, load it in half precision with sensible memory settings, make outputs reproducible, and wrap it in a service that handles queuing and safety. The diffusers library provides the image pipelines; Whisper (via `faster-whisper` or `transformers`) handles audio.
## Agent Protocol
### Trigger
"stable diffusion", "SDXL", "FLUX", "diffusers", "text-to-image", "img2img", "inpainting", "LoRA for SD", "Whisper", "transcribe audio".
### Input Context
- Use case (commercial or not), target quality, latency per image.
- GPU (VRAM size) or CPU-only constraints.
- Need for conditioning (img2img, inpainting, ControlNet, LoRA styles).
- Audio language(s) and real-time vs batch transcription.
### Output Artifact
Model choice with license note, pipeline code, memory/performance settings, serving outline.
### Response Format
```
Model: {repo id} License: {license} VRAM: {approx}
Pipeline: {class} dtype: {fp16|bf16} Steps/guidance: {n}/{g}
Memory: {cpu offload|vae tiling|none}
Repro: seed={n} recorded with prompt + model revision
Audio: {whisper variant, compute_type}
```
### Completion Criteria
- [ ] License verified for intended use.
- [ ] Device selected dynamically; half precision used on GPU.
- [ ] Seed, model revision, and parameters logged per output.
- [ ] Safety/NSFW policy defined for user-facing generation.
## Model Selection (verify licenses on the model card before use)
| Model family | Notes | License (check card) |
|---|---|---|
| Stable Diffusion 1.5 | Small, huge LoRA ecosystem; original runwayml repo was removed, mirrors exist | CreativeML OpenRAIL-M |
| SDXL base 1.0 | 1024px, good quality/VRAM balance | CreativeML OpenRAIL++-M |
| SD 3.5 (Medium/Large) | MMDiT architecture, better text rendering | Stability AI Community License (revenue threshold) |
| FLUX.1 [schnell] | Few-step, high quality | Apache-2.0 |
| FLUX.1 [dev] | Higher quality, guidance-distilled | Non-commercial license |
## Text-to-Image (diffusers)
```python
from __future__ import annotations
import json
import logging
from pathlib import Path
import torch
from diffusers import AutoPipelineForText2Image
log = logging.getLogger("genai")
MODEL_ID = "stabilityai/stable-diffusion-xl-base-1.0"
def pick_device() -> tuple[str, torch.dtype]:
if torch.cuda.is_available():
return "cuda", torch.float16
if torch.backends.mps.is_available():
return "mps", torch.float16
return "cpu", torch.float32 # CPU kernels need fp32; expect minutes per image
def load_pipeline(low_vram: bool = False):
device, dtype = pick_device()
pipe = AutoPipelineForText2Image.from_pretrained(
MODEL_ID, torch_dtype=dtype, variant="fp16" if dtype == torch.float16 else None,
use_safetensors=True,
)
if low_vram and device == "cuda":
pipe.enable_model_cpu_offload() # needs `accelerate`; do not also call .to("cuda")
else:
pipe.to(device)
return pipe, device
def generate(pipe, device: str, prompt: str, out: Path, seed: int = 0,
steps: int = 30, guidance: float = 7.0, negative: str = "") -> Path:
generator = torch.Generator(device="cpu" if device == "mps" else device).manual_seed(seed)
image = pipe(prompt=prompt, negative_prompt=negative or None, num_inference_steps=steps,
guidance_scale=guidance, generator=generator).images[0]
image.save(out)
out.with_suffix(".json").write_text(json.dumps(
{"model": MODEL_ID, "prompt": prompt, "negative": negative, "seed": seed,
"steps": steps, "guidance": guidance}))
log.info("generated %s seed=%d", out, seed)
return out
```
Notes:
- PyTorch 2.x uses scaled-dot-product attention by default; installing xformers is no longer required.
- FLUX.1 [schnell] uses `FluxPipeline`, ~4 steps, `guidance_scale=0.0`.
- Pin `revision=` on `from_pretrained` for reproducible production builds.
## Conditioning Options
| Need | Tool |
|---|---|
| Edit an existing image | `AutoPipelineForImage2Image` (`strength` 0.3-0.8) |
| Replace a region | `AutoPipelineForInpainting` with a mask |
| Pose/edge/depth control | ControlNet pipelines (`StableDiffusionXLControlNetPipeline`) |
| Style or subject | LoRA: `pipe.load_lora_weights(path)`; scale via `cross_attention_kwargs={"scale": 0.8}` or adapter weights |
| Fast drafts | Distilled/turbo models or LCM-LoRA with 4-8 steps |
## Memory & Speed
| Problem | Setting |
|---|---|
| OOM on load | `enable_model_cpu_offload()`; smaller model; fp16 variant |
| OOM at high resolution | `pipe.vae.enable_tiling()` / `enable_slicing()` |
| Throughput | Batch prompts (`num_images_per_prompt`), `torch.compile(pipe.unet)` after warmup |
| Latency | Fewer steps with a distilled model rather than cutting steps on a base model |
## Speech Transcription (Whisper)
```python
from faster_whisper import WhisperModel # CTranslate2 backendFrom j4flmao/agent-skills, MIT.
More from j4flmao/agent-skills
- 0.610score
dotnet-patterns
j4flmao
Use this skill when implementing .NET patterns — MediatR pipelines, CQRS, Result pattern, EF Core patterns, pipeline behaviors, and event sourcing.
SkillBFreshness: B★ 34Claude Code +9 - 0.610score
elysia-patterns
j4flmao
Use this skill when implementing Elysia.js patterns — Eden Treaty client, WebSocket handlers, auth/guard macros, custom plugins, performance optimization, and…
SkillBFreshness: B★ 34Claude Code +9 - 0.607score
llm-finetuning
j4flmao
Best practices for dataset preparation and PEFT/LoRA fine-tuning.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
micronaut
j4flmao
Use this skill when building Micronaut applications — compile-time DI, reactive HTTP server, AOT optimization, GraalVM native image.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
bun
j4flmao
Use this skill when building with Bun runtime — Bun APIs, testing, package management, shell scripting, hot reload, SQLite, file I/O.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
elixir
j4flmao
Use this skill when building with Elixir — Phoenix framework, OTP, BEAM, LiveView, Ecto, supervision trees.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
deno
j4flmao
Use this skill when building with Deno — TypeScript runtime, Deno Deploy, Fresh framework, Deno std library.
SkillBFreshness: B★ 34Claude Code +9 - 0.601score
nestjs-architecture
j4flmao
Use this skill when structuring NestJS applications — module-based architecture, dependency injection, provider scopes, dynamic modules, and monorepo structure.
SkillBFreshness: B★ 34Claude Code +9 - 0.601score
nestjs-patterns
j4flmao
Use this skill when implementing NestJS patterns — CQRS with @nestjs/cqrs, guards/interceptors/pipes/filters, event sourcing, custom decorators…
SkillBFreshness: B★ 34Claude Code +9 - 0.601score
kotlin-backend-patterns
j4flmao
Use this skill when implementing Kotlin backend patterns — repository pattern, service layer, DTO mapping, DI setup (Koin, Kodein), testing with MockK, and…
SkillBFreshness: B★ 34Claude Code +9 - 0.601score
kotlin-architecture
j4flmao
Use this skill when designing Kotlin backend architecture — Ktor, Spring WebFlux, http4k.
SkillBFreshness: B★ 34Claude Code +9 - 0.601score
nodejs-architecture
j4flmao
Use this skill when designing Node.js backend architecture — Express, Fastify, Hono.
SkillBFreshness: B★ 34Claude Code +9
Signals
- Stars
- 34
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Aug 30, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/j4flmao/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from j4flmao
- 0.610score
dotnet-patterns
j4flmao
Use this skill when implementing .NET patterns — MediatR pipelines, CQRS, Result pattern, EF Core patterns, pipeline behaviors, and event sourcing.
SkillBFreshness: B★ 34Claude Code +9 - 0.610score
elysia-patterns
j4flmao
Use this skill when implementing Elysia.js patterns — Eden Treaty client, WebSocket handlers, auth/guard macros, custom plugins, performance optimization, and…
SkillBFreshness: B★ 34Claude Code +9 - 0.607score
llm-finetuning
j4flmao
Best practices for dataset preparation and PEFT/LoRA fine-tuning.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
bun
j4flmao
Use this skill when building with Bun runtime — Bun APIs, testing, package management, shell scripting, hot reload, SQLite, file I/O.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
deno
j4flmao
Use this skill when building with Deno — TypeScript runtime, Deno Deploy, Fresh framework, Deno std library.
SkillBFreshness: B★ 34Claude Code +9 - 0.605score
elixir
j4flmao
Use this skill when building with Elixir — Phoenix framework, OTP, BEAM, LiveView, Ecto, supervision trees.
SkillBFreshness: B★ 34Claude Code +9
Cite this page
genai-vision skill. Agent Mart. https://agentmart.dev/skills/j4flmao-genai-vision (last updated 2026-10-24)