{"id":19070775,"url":"https://github.com/bing-su/aaa1111","last_synced_at":"2025-04-28T14:44:18.552Z","repository":{"id":180919235,"uuid":"665833864","full_name":"Bing-su/AAA1111","owner":"Bing-su","description":"An Api for Automatic1111","archived":false,"fork":false,"pushed_at":"2024-03-13T01:52:28.000Z","size":1522,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T13:10:48.998Z","etag":null,"topics":["python","sd-webui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/Bing-su.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-13T05:37:02.000Z","updated_at":"2024-01-31T11:23:43.000Z","dependencies_parsed_at":"2024-11-09T01:22:00.853Z","dependency_job_id":"54b74c91-6b0b-4b96-b751-4f0af82daa0e","html_url":"https://github.com/Bing-su/AAA1111","commit_stats":null,"previous_names":["bing-su/aaa1111"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bing-su%2FAAA1111","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bing-su%2FAAA1111/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bing-su%2FAAA1111/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bing-su%2FAAA1111/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bing-su","download_url":"https://codeload.github.com/Bing-su/AAA1111/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251332289,"owners_count":21572589,"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":["python","sd-webui"],"created_at":"2024-11-09T01:20:29.451Z","updated_at":"2025-04-28T14:44:18.531Z","avatar_url":"https://github.com/Bing-su.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AAA1111\n\nAn Api for Automatic1111\n\n## 설치\n\n```\npip install aaa1111\n```\n\npip를 통하여 설치할 수 있습니다.\n\n\n## 사용법\n\n### 1. CLI\naaa1111을 설치하면, `txt2img`, `img2img` 2가지 cli 명령어를 사용할 수 있습니다.\n\n```sh\n❯ txt2img --help\n\n Usage: txt2img [OPTIONS] PARAMS...\n\n╭─ api ───────────────────────────────────────────────────────────────────────────╮\n│ *    params      PARAMS...  Path to params files. .toml, .yaml, .yml, .json,    │\n│                             .json5 available. others will be ignored.           │\n│                             [required]                                          │\n╰─────────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ───────────────────────────────────────────────────────────────────────╮\n│ --install-completion        [bash|zsh|fish|powershel  Install completion for    │\n│                             l|pwsh]                   the specified shell.      │\n│                                                       [default: None]           │\n│ --show-completion           [bash|zsh|fish|powershel  Show completion for the   │\n│                             l|pwsh]                   specified shell, to copy  │\n│                                                       it or customize the       │\n│                                                       installation.             │\n│                                                       [default: None]           │\n│ --help                                                Show this message and     │\n│                                                       exit.                     │\n╰─────────────────────────────────────────────────────────────────────────────────╯\n╭─ save ──────────────────────────────────────────────────────────────────────────╮\n│ --save-dir  -d                   DIRECTORY  Path to save directory.             │\n│                                             [env var: AAA1111_SAVE_DIR]         │\n│                                             [default: output]                   │\n│ --save-ext  -e                   TEXT       [default: png]                      │\n│ --quality   -q                   INTEGER    [default: 95]                       │\n│ --lossless      --no-lossless               [default: lossless]                 │\n╰─────────────────────────────────────────────────────────────────────────────────╯\n╭─ api ───────────────────────────────────────────────────────────────────────────╮\n│ --base-url  -b                TEXT     base url, if given, 'host', 'port' and   │\n│                                        'https' are ignored.                     │\n│                                        [env var: AAA1111_BASE_URL]              │\n│                                        [default: None]                          │\n│ --host      -h                TEXT     [default: 127.0.0.1]                     │\n│ --port      -p                INTEGER  [default: 7860]                          │\n│ --https         --no-https             [default: no-https]                      │\n╰─────────────────────────────────────────────────────────────────────────────────╯\n```\n\n`--api`옵션을 활성화한채 실행중인 webui가 필요합니다.\n\n\n명령어 뒤에 입력 파라미터를 담은 파일의 경로를 1개 또는 그 이상 지정해주는 것으로 이미지를 생성합니다.\n\n```sh\n# 하나의 파일만 사용\ntxt2img examples/txt1.yaml\n```\n\n```sh\n# glob 패턴\ntxt2img examples/txt*\n```\n\n지원하지 않는 확장자를 가진 파일은 무시됩니다.\n\n`.toml, .yaml, .yml, .json, .json5` 5가지 확장을 지원하며, 파일은 하나의 python dict를 반환하도록 작성되어야 합니다.\n\n예시: yaml\n\n[`ruamel.yaml`](https://yaml.readthedocs.io/en/latest/overview.html)을 사용중이므로 기본적으로 yaml 1.2를 사용합니다.\n\n```yaml\nprompt: masterpiece, best quality, 1girl\nnegative_prompt: (worst quality, low quality:1.1), text, title, logo, signature, (EasyNegativeV2:0.7), (negative_hand-neg:0.7)\nsampler_name: DPM++ 2M Karras\nbatch_size: 2\nn_iter: 1\ncfg_scale: 7.5\nwidth: 512\nheight: 768\nsteps: 20\n\noverride_settings:\n  CLIP_stop_at_last_layers: 2\n\nalwayson_scripts:\n  Simple wildcards:\n    args: [] # Simple wildcards doesn't accept arguments\n```\n\n예시: toml\n\n```toml\nprompt = \"masterpiece, best quality, 1girl\"\nnegative_prompt = \"(worst quality, low quality:1.1), text, title, logo, signature, (EasyNegativeV2:0.7), (negative_hand-neg:0.7)\"\nsampler_name = \"DPM++ 2M Karras\"\nbatch_size = 2\nn_iter = 1\ncfg_scale = 7.5\nwidth = 512\nheight = 768\nsteps = 20\n\n[override_settings]\nCLIP_stop_at_last_layers = 2\n\n[alwayson_scripts.\"Simple wildcards\"]\nargs = []  # Simple wildcards doesn't accept arguments\n```\n\n예시: json5\n\n```json5\n// json5 example with comments\n\n{\n    \"prompt\": \"masterpiece, best quality, 1girl\",\n    \"negative_prompt\": \"(worst quality, low quality:1.1), text, title, logo, signature, (EasyNegativeV2:0.7), (negative_hand-neg:0.7)\",\n    \"sampler_name\": \"DPM++ 2M Karras\",\n    \"batch_size\": 2,\n    \"n_iter\": 1,\n    \"cfg_scale\": 7.5,\n    \"width\": 512,\n    \"height\": 768,\n    \"steps\": 20,\n\n    \"override_settings\": {\n        \"CLIP_stop_at_last_layers\": 2\n    },\n\n    \"alwayson_scripts\": {\n        \"Simple wildcards\": {\n            \"args\": [],  // Simple wildcards doesn't accept arguments\n        },\n    },  // Trailing comma available\n}\n```\n\n### 2. python\n\n기본 사용방법\n\n```py\nfrom aaa1111 import AAA1111\nfrom aaa1111.types import TXT2IMG, IMG2IMG\nfrom aaa1111.types.extension import SimpleWildcards\n\napi = AAA1111()\nparams = TXT2IMG(\n    prompt=\"masterpiece, best quality, 1girl, __woman_clothes__, __places__\",\n    negative_prompt=\"(worst quality, low quality:1.1), text, title, logo, signature, (EasyNegativeV2:0.7), (negative_hand-neg:0.7)\",\n    sampler_name=\"DPM++ 2M Karras\",\n    batch_size=2,\n    n_iter=1,\n    cfg_scale=7.5,\n    width=512,\n    height=768,\n    steps=20,\n    override_settings={\"CLIP_stop_at_last_layers\": 2},\n    alwayson_scripts=[SimpleWildcards()]\n)\n\nresp = api.txt2img(txt2img)\nimages = resp.images\n```\n\n대신 설정 파일 경로를 넣을 수도 있습니다.\n\n```py\nfrom aaa1111 import AAA1111\n\napi = AAA1111()\nresp = api.txt2img(\"examples/txt1.yaml\")\nimages = resp.images\n```\n\nasync 호출도 지원합니다.\n\n```py\nimport asyncio\nfrom aaa1111 import AAA1111\n\nasync def gen():\n    api = AAA1111()\n    resp = await api.atxt2img(\"examples/txt1.yaml\")\n    return resp.images\n\nimages = asyncio.run(gen())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbing-su%2Faaa1111","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbing-su%2Faaa1111","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbing-su%2Faaa1111/lists"}