🎨 Loki's Claude to A1111 Extension Installation Guide
Overview
This browser extension automatically sends specially formatted text from Claude.ai to your local Automatic1111 installation for image generation. Only text formatted as bold+italic will trigger image generation.
Prerequisites
1. Install Automatic1111 (Stable Diffusion WebUI)
2. Install Tampermonkey Browser Extension
- Chrome/Edge: Install from Chrome Web Store
- Firefox: Install from Firefox Add-ons
- Safari: Install from Mac App Store
Installation Steps
Step 1: Configure Automatic1111 for API Access
- Launch A1111 with API enabled:
- Windows: Edit your
webui-user.bat file and add --api --listen to the COMMANDLINE_ARGS
- Mac/Linux: Run with flags:
./webui.sh --api --listen
- Example:
COMMANDLINE_ARGS=--api --listen --xformers
- Start Automatic1111:
- Launch the webui normally
- Verify it's running at
http://127.0.0.1:7860
- The API will be available at
http://127.0.0.1:7860/docs
Step 2: Install the Browser Extension
- Open Tampermonkey Dashboard:
- Click the Tampermonkey icon in your browser
- Select "Dashboard"
- Create New Script:
- Click the "+" button or "Create a new script"
- Delete all existing content in the editor
- Paste the Extension Code:
- Copy the entire extension code (provided separately)
- Paste it into the Tampermonkey editor
- Press
Ctrl+S (or Cmd+S on Mac) to save
- Enable the Script:
- Make sure the toggle switch is "ON" for the script
- The script should show as "Loki's Claude to A1111 Auto-Generator"
Step 3: Test the Installation
- Visit Claude.ai:
- Open the Control Panel:
- Click the floating 🎨 button
- A maroon control panel should appear
- Test Basic Functionality:
- Click "🔍 DEBUG TEST" to verify the extension is working
- Check that A1111 is detected (should show no connection errors)
Usage Instructions
Basic Workflow
- Start your conversation with Claude
- Format your image prompts using triple asterisks:
***a majestic dragon breathing fire over a medieval castle***
- Choose your method:
- Manual: Click "🚀 SEND TO A1111" button
- Automatic: Enable "Auto-send responses" checkbox
Control Panel Settings
- Steps: Number of diffusion steps (20-50 recommended)
- CFG Scale: How closely to follow the prompt (7-12 recommended)
- Dimensions: Custom width × height (default 832×1216 for portraits)
- Use Fixed Seed: Enable for consistent results
- Auto-send responses: Automatically generate when formatted text is detected
Advanced Features
- Random Seed Generation: Click 🎲 to generate random seeds
- Seed History: Track previously used seeds
- Quick Dimension Presets: 512², 768², Portrait, Landscape buttons
- Image Pinning: Generated images appear below Claude's responses
- Click to Expand: Click any generated image to zoom in/out
Troubleshooting
Common Issues
"Failed to connect to A1111":
- Verify A1111 is running with
--api --listen flags
- Check that A1111 is accessible at http://127.0.0.1:7860
- Disable firewall/antivirus temporarily to test
"No Claude responses found":
- Refresh the Claude.ai page
- Make sure you're on claude.ai (not console.anthropic.com)
- Try typing a message in Claude first
"No bold+italic formatted text found":
- Use triple asterisks:
***your prompt here***
- Or manually format text as both bold and italic
- Only specially formatted text triggers generation
Panel won't appear:
- Refresh the page
- Check Tampermonkey is enabled
- Verify the script is active in Tampermonkey dashboard
Advanced Troubleshooting
- Check Browser Console:
- Press F12 → Console tab
- Look for "🎨 A1111 Extension" messages
- Red errors indicate problems
- Verify API Access:
- Test A1111 Directly:
- Use the A1111 web interface to generate an image
- Confirms your installation is working
Security Notes
- The extension only connects to your local A1111 installation
- No data is sent to external servers
- All processing happens locally on your machine
- Extension only activates on claude.ai domain
Customization
Changing Default Settings
Edit these values in the script:
javascript
const DEFAULT_SETTINGS = {
steps: 20,
cfg_scale: 7,
width: 832,
height: 1216,
// ... other settings
};
Changing A1111 URL
If A1111 runs on a different port:
javascript
const A1111_URL = 'http://127.0.0.1:8080'; // Change port as needed
Support
- Check the browser console (F12) for error messages
- Verify A1111 is running with API enabled
- Test with simple prompts first
- Ensure you're using the correct formatting (text)
Version Information
- Browser: Chrome, Firefox, Edge, Safari (with Tampermonkey)
- A1111: Any recent version with API support
- Models: Compatible with SD 1.5, SDXL, and other Stable Diffusion models
Created by Loki, God of Digital Mischief 🎨