{"id":30683262,"url":"https://github.com/aatricks/newelle-light-diffusion","last_synced_at":"2025-09-01T19:43:01.269Z","repository":{"id":312489293,"uuid":"1047654071","full_name":"Aatricks/Newelle-Light-Diffusion","owner":"Aatricks","description":"Image generation extension for newelle using Light-Diffusion as backend","archived":false,"fork":false,"pushed_at":"2025-08-31T00:06:20.000Z","size":186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T02:27:16.398Z","etag":null,"topics":["newelle-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aatricks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T22:55:23.000Z","updated_at":"2025-08-31T00:08:07.000Z","dependencies_parsed_at":"2025-08-31T02:27:31.890Z","dependency_job_id":"28e22cba-7761-4773-8ece-5e92213660f0","html_url":"https://github.com/Aatricks/Newelle-Light-Diffusion","commit_stats":null,"previous_names":["aatricks/newelle-light-diffusion"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Aatricks/Newelle-Light-Diffusion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aatricks%2FNewelle-Light-Diffusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aatricks%2FNewelle-Light-Diffusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aatricks%2FNewelle-Light-Diffusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aatricks%2FNewelle-Light-Diffusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aatricks","download_url":"https://codeload.github.com/Aatricks/Newelle-Light-Diffusion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aatricks%2FNewelle-Light-Diffusion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273183161,"owners_count":25059811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["newelle-extension"],"created_at":"2025-09-01T19:42:58.168Z","updated_at":"2025-09-01T19:43:01.253Z","avatar_url":"https://github.com/Aatricks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Newelle-Light-Diffusion\n\u003ca href=\"https://github.com/topics/newelle-extension\"\u003e\n    \u003cimg width=\"150\" alt=\"Download on Flathub\" src=\"https://raw.githubusercontent.com/qwersyk/Assets/main/newelle-extension.svg\"/\u003e\n  \u003c/a\u003e\n\nImage generation extension for Newelle using the LightDiffusion-Next backend.\n\n![demo](/demo.png)\n\n⭐ If this project helps you, please give it a star! It helps others discover it too.\n---\n\n## Features\n\n- 🖼️ Generate images inline in Newelle via LightDiffusion-Next.\n- ⚙️ Configure server URL, positive/negative prompt templates, image size, and advanced settings (steps, CFG scale, seed, ...).\n- 💾 Cache generated images and save to custom paths.\n- 🔄 Reuse the same seed or randomize for varied outputs.\n- 🛠️ Support extra JSON payload overrides for custom API options.\n- 🚀 Img2Img upscaling: reference a source image directly (inline) or via settings.\n\n## Installation\n\n1. Install [Newelle](https://flathub.org/apps/io.github.qwersyk.Newelle) (or Nyarch Assistant).\n2. Ensure you have a running LightDiffusion-Next backend:\n   ```fish\n   https://github.com/Aatricks/LightDiffusion-Next.git\n   cd LightDiffusion-Next\n   pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128\n   pip install -r requirements.txt\n   python server.py\n   ```\n3. Clone this extension'repo or simply download the [lightdiffusion.py](https://raw.githubusercontent.com/Aatricks/Newelle-Light-Diffusion/refs/heads/main/lightdiffusion.py) file:\n   ```fish\n   git clone https://github.com/Aatricks/Newelle-Light-Diffusion.git\n   ```\n4. Launch Newelle and open **Extensions → Install extension from file...**, then select the `lightdiffusion.py` file.\n5. Configure under **Extensions → Extension Settings → LightDiffusion**:\n   - **URL**: LightDiffusion-Next server URL (default: `http://localhost:7861`).\n   - **Positive Prompt Template**: e.g. `[input]`.\n   - **Negative Prompt**: e.g. `(low quality, blurry)`.\n   - **Width/Height**: image dimensions (128–2048).\n   - **Advanced Settings**: steps, guidance scale, seed, extra JSON options.\n\n## Usage\n\nUse a `generateimage` or `lightdiffusion` code block in Newelle to create images:\n\n```generateimage\nA serene mountain landscape at sunrise, ultra-detailed, vibrant colors\n```\n\nThe extension sends your prompt to LightDiffusion-Next and displays the generated image inline.\n\n### Img-to-Img (Upscale) via inline path\n\nYou can upscale/refine an existing image by including its path inside the code block. The extension detects the path and switches to Img2Img automatically:\n\n```generateimage\nimg: /absolute/path/to/image.png\na cinematic photo of a mountain village at sunrise, ultra-detailed, 35mm\n```\n\n![demo_upscaling](/demo_up.png)\n\n### Img-to-Img via settings (fallback)\n\nIf you prefer settings instead of inline path:\n\n1. Open Extensions → Extension Settings → LightDiffusion.\n2. In Advanced Settings, set:\n    - `Img2Img (Upscale)`: `1`\n    - `Img2Img Image Path`: absolute path to the image on the server machine\n\nIf both inline and settings are provided, the inline path takes precedence.\n\n## Issues\n\nOne 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 :\n\n`````\nIf prompted to generate an image, only follow this instruction and this exact format written just below\n\n```generateimage\nyour prompt here\n```\nUse detailed prompts, with english words separated by commas\n`````\n\n### Img2Img troubleshooting\n\n- 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).\n- 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.\n- You can verify the server is up via:\n   ```fish\n   curl http://localhost:7861/health\n   ```\n   Expect `{ \"status\": \"ok\" }`.\n\n## License\n\nGPLv3 License. See [LICENSE](../LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatricks%2Fnewelle-light-diffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faatricks%2Fnewelle-light-diffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faatricks%2Fnewelle-light-diffusion/lists"}