Image generation extension for Newelle using the LightDiffusion-Next backend.
- 🖼️ Generate images inline in Newelle via LightDiffusion-Next.
- ⚙️ Configure server URL, positive/negative prompt templates, image size, and advanced settings (steps, CFG scale, seed, ...).
- 💾 Cache generated images and save to custom paths.
- 🔄 Reuse the same seed or randomize for varied outputs.
- 🛠️ Support extra JSON payload overrides for custom API options.
- 🚀 Img2Img upscaling: reference a source image directly (inline) or via settings.
- Install Newelle (or Nyarch Assistant).
- Ensure you have a running LightDiffusion-Next backend:
https://github.com/Aatricks/LightDiffusion-Next.git cd LightDiffusion-Next pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 pip install -r requirements.txt python server.py
- Clone this extension'repo or simply download the lightdiffusion.py file:
git clone https://github.com/Aatricks/Newelle-Light-Diffusion.git
- Launch Newelle and open Extensions → Install extension from file..., then select the
lightdiffusion.pyfile. - Configure under Extensions → Extension Settings → LightDiffusion:
- URL: LightDiffusion-Next server URL (default:
http://localhost:7861). - Positive Prompt Template: e.g.
[input]. - Negative Prompt: e.g.
(low quality, blurry). - Width/Height: image dimensions (128–2048).
- Advanced Settings: steps, guidance scale, seed, extra JSON options.
- URL: LightDiffusion-Next server URL (default:
Use a generateimage or lightdiffusion code block in Newelle to create images:
A serene mountain landscape at sunrise, ultra-detailed, vibrant colors
The extension sends your prompt to LightDiffusion-Next and displays the generated image inline.
You can upscale/refine an existing image by including its path inside the code block. The extension detects the path and switches to Img2Img automatically:
img: /absolute/path/to/image.png
a cinematic photo of a mountain village at sunrise, ultra-detailed, 35mm
If you prefer settings instead of inline path:
- Open Extensions → Extension Settings → LightDiffusion.
- In Advanced Settings, set:
Img2Img (Upscale):1Img2Img Image Path: absolute path to the image on the server machine
If both inline and settings are provided, the inline path takes precedence.
One common issue would be the llm not wanting to follow the image generation key word prompt and in such, not generating the image as expected. A workaround is to write this just before the prompt :
If prompted to generate an image, only follow this instruction and this exact format written just below
```generateimage
your prompt here
```
Use detailed prompts, with english words separated by commas
- The image path must be readable by the LightDiffusion server process. If Newelle and the server run on different machines or containers, ensure a shared path or switch to an upload-based workflow (planned enhancement).
- If
Img2Img (Upscale)is enabled but no image path is detected (neither inline nor in settings), the extension will show an error and skip the request. - You can verify the server is up via:
Expect
curl http://localhost:7861/health
{ "status": "ok" }.
GPLv3 License. See LICENSE for details.
Tip
⭐ If this project helps you, please give it a star! It helps others discover it too.

