{"id":17902160,"url":"https://github.com/basharast/a2iprompt","last_synced_at":"2025-04-03T05:25:28.923Z","repository":{"id":179511458,"uuid":"663583609","full_name":"basharast/A2IPrompt","owner":"basharast","description":"Automatic1111 to InvokeAI prompt resolver","archived":false,"fork":false,"pushed_at":"2024-06-29T11:01:18.000Z","size":4254,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-22T21:12:27.354Z","etag":null,"topics":["ai","automatic1111","invokeai","prompt"],"latest_commit_sha":null,"homepage":"https://basharast.github.io/A2IPrompt/","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basharast.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}},"created_at":"2023-07-07T16:25:12.000Z","updated_at":"2025-02-22T18:56:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ab36a28-8622-487c-9238-52f8e07c4465","html_url":"https://github.com/basharast/A2IPrompt","commit_stats":null,"previous_names":["basharast/a2iprompt"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basharast%2FA2IPrompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basharast%2FA2IPrompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basharast%2FA2IPrompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basharast%2FA2IPrompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basharast","download_url":"https://codeload.github.com/basharast/A2IPrompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246941150,"owners_count":20858273,"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","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":["ai","automatic1111","invokeai","prompt"],"created_at":"2024-10-28T16:05:03.850Z","updated_at":"2025-04-03T05:25:28.892Z","avatar_url":"https://github.com/basharast.png","language":null,"readme":"# About\n\nThis tool will help you to convert [Automatic1111](https://github.com/AUTOMATIC1111/stable-diffusion-webui) prompt to [InvokeAI](https://github.com/invoke-ai/InvokeAI) prompt\n\n\u003cimg src=\"docs/assets/preview.jpg?t=123\"\u003e\n\n\u003cimg src=\"docs/assets/preview2.JPG?t=123\"\u003e\n\n## Usage\n\nOnline test [click here](https://basharast.github.io/A2IPrompt/) and use it directly\n\nor download this repo and open `index.html` it will work locally.\n\n## Features \n\n- Support InvokeAI (V2 and V3)\n\n- Support wide conversion cases\n\n- Support translation from invokeai to automatic1111\n\n- Fetch prompt from online image\n\n- Copy shortcuts\n\n- Tokens counter\n\n- Prompt syntax highlights\n\n- Auto prompt copy\n\n- Weight limiters\n\n- Weight randomizer\n\n## Standalone (Developers)\n\nIf you want to use the translation engine in your project use `converter_standalone.js` or `converter_standalone.ts` for `TypeScript`\n\nnote that `.ts` version will report error for missing `encoder` function, you need to import that (`GPT-Tokenizer`) manually or disable the line if you're not intersted in tokens counter\n\n```js\n//Create instance first\nvar invokeaiResolver = new InvokeAIPromptResolver();\n\n//Prepare options, all keys are optional, you don't have to add all of them\nvar options = {\n    invokeaiVersion: 3,\n    rawNegative: false,\n    limitWeightPositive: \"$1\",\n    limitWeightNegative: \"$1\",\n    randomWeight: false,\n    usePowValueAlways: false,\n    dynamicPrompts: true\n};\n\n//1- From auto1111 to invokeai \nvar output1 = invokeaiResolver.convertAuto1111ToInvokeAI(positive, negative, options);\n\n//2- From invokeai to auto1111\nvar output2 = invokeaiResolver.convertInvokeAIToAuto1111(positive, negative, options);;\n\n//Both functions (1 \u0026 2) returns object as below:\n/*\n    {\n    from: {\n            positive: { text: , tokens: },\n            negative: { text: , tokens: },\n        },\n    to: {\n            positive: { text: , tokens: },\n            negative: { text: , tokens: },\n        }\n    }\n*/\n\n//Calculate tokens without translation\n//Require `encoders/cl100k_base.js` to be included\nvar tokensOutput = invokeaiResolver.calculateInvokeAITokens(positive, negative);\n//This function returns object as below:\n/*\n    {\n        positive: { text: , tokens: },\n        negative: { text: , tokens: }\n    };\n*/\n\n```\n\n## Contribution\n\nFeel free to submit any request or fix\n\nif you want to make your own fork just don't remove copyright section.\n\n\n## Privacy \n\nThis tool works locally and doesn't send or collect any usage data or any texts\n\n\n## Credits\n\nBashar Astifan (Developer)\n\nGPT-Tokenizer thanks to [Bazyli Brzóska](https://github.com/niieani)\n\nSyntax highlights and code editor [CodeMirror](https://codemirror.net/)\n\nTooltips [TippyJS](https://atomiks.github.io/tippyjs/)\n\nNotifications [Ryan Morr](https://codepen.io/ryanmorr/pen/MyVvLg)\n\nCheckbox switch [Edgar](https://codepen.io/BuiltByEdgar/pen/jWOVYQ)\n\nHTML page has some elements from [Navneet](https://codepen.io/heynavneet/details/yXjPLw) and [Trent Dec](https://codepen.io/Trentdec/pen/YBEQKm)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasharast%2Fa2iprompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasharast%2Fa2iprompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasharast%2Fa2iprompt/lists"}