{"id":13574190,"url":"https://github.com/Aloereed/stable-diffusion-webui-arc-directml","last_synced_at":"2025-04-04T14:31:59.969Z","repository":{"id":149397697,"uuid":"603635382","full_name":"Aloereed/stable-diffusion-webui-arc-directml","owner":"Aloereed","description":"A proven usable Stable diffusion webui project on Intel Arc GPU with DirectML","archived":false,"fork":false,"pushed_at":"2023-10-22T06:27:03.000Z","size":73491,"stargazers_count":71,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T21:51:10.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aloereed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-19T05:25:54.000Z","updated_at":"2025-01-08T00:16:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f157270b-60cb-4570-a131-d182b1e786b6","html_url":"https://github.com/Aloereed/stable-diffusion-webui-arc-directml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aloereed%2Fstable-diffusion-webui-arc-directml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aloereed%2Fstable-diffusion-webui-arc-directml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aloereed%2Fstable-diffusion-webui-arc-directml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aloereed%2Fstable-diffusion-webui-arc-directml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aloereed","download_url":"https://codeload.github.com/Aloereed/stable-diffusion-webui-arc-directml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247194187,"owners_count":20899440,"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":[],"created_at":"2024-08-01T15:00:47.900Z","updated_at":"2025-04-04T14:31:56.470Z","avatar_url":"https://github.com/Aloereed.png","language":"Python","funding_links":[],"categories":["Table of Contents"],"sub_categories":["AI - Computer Vision"],"readme":"# Stable Diffusion web UI for Intel Arc with DirectML\nForked from [lshqqytiger/stable-diffusion-webui-directml](https://github.com/lshqqytiger/stable-diffusion-webui-directml). The code was fine-tuned only for the errors reported for the Intel Arc GPU.   [中文自述文件在这里.](README_ZH.md)  \n\n**For Stable Diffusion in Linux/WSL using IPEX (Intel Extensions for Pytorch) see here. [Aloereed/stable-diffusion-webui-ipex-arc](https://github.com/Aloereed/stable-diffusion-webui-ipex-arc)  . This approach uses less video memory, generates larger images, and reduces the whine of Intel graphics cards during processing.**\n\nThis repository is just to document a version of webui that is verified to be available for the Intel Arc GPU (and very, very minor code tweaks). To get the latest webui features, you can check [here](https://github.com/lshqqytiger/stable-diffusion-webui-directml) directly.\n\n## Requirements\n+ An Intel Arc GPU with the latest gfx\n+ Windows 11 64 Bit\n+ A Python environment\n  \nIf you are using an nVidia GPU, you can [go here](https://github.com/AUTOMATIC1111/stable-diffusion-webui). AMD GPU [here](https://github.com/lshqqytiger/stable-diffusion-webui-directml).  \n\n## Test Enviroment\n+ Intel Arc A770 16G\n+ Driver: 31.0.101.4125\n+ Windows 11 22H2\n+ Model: anything-v4.0-pruned-fp32 (running in fp16 however)\n\nA browser interface based on Gradio library for Stable Diffusion.\n\n![Preview](screenshot.png)  \n\n![Usage](usage.png)\n\n## Issues\n+ You should generate images up to 512x512. 512x512 is probably a critical point even for A770 16GB. Or you can try \"set COMMANDLINE_ARGS= --opt-sub-quad-attention --lowvram --disable-nan-check\" in webui-user.bat, but it would be much slower. A380/A750 also should try this line.\n+ The same case to Hires.fix\n+ If you have multiple DirectML devices on your computer, you may need to check [here](https://github.com/lshqqytiger/stable-diffusion-webui-directml). Or modify [modules/devices.py](modules/devices.py).\n## Setup\nJust run webui-user.bat. You should also download some repositories first. (Repos include BLIP, CodeFromer, [k-diffusion](https://github.com/lshqqytiger/k-diffusion-directml/tree/891466a373cef42ce7ac3dd840dbba6d832b024b), [stable-diffusion-stability-ai](https://github.com/lshqqytiger/stablediffusion-directml/tree/890e30734bece57c05ed6849c9453359c3511844),taming-transformes)  \n\n## Features\n[Detailed feature showcase with images](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features):\n- Original txt2img and img2img modes\n- One click install and run script (but you still must install python and git)\n- Outpainting\n- Inpainting\n- Color Sketch\n- Prompt Matrix\n- Stable Diffusion Upscale\n- Attention, specify parts of text that the model should pay more attention to\n    - a man in a ((tuxedo)) - will pay more attention to tuxedo\n    - a man in a (tuxedo:1.21) - alternative syntax\n    - select text and press ctrl+up or ctrl+down to automatically adjust attention to selected text (code contributed by anonymous user)\n- Loopback, run img2img processing multiple times\n- X/Y/Z plot, a way to draw a 3 dimensional plot of images with different parameters\n- Textual Inversion\n    - have as many embeddings as you want and use any names you like for them\n    - use multiple embeddings with different numbers of vectors per token\n    - works with half precision floating point numbers\n    - train embeddings on 8GB (also reports of 6GB working)\n- Extras tab with:\n    - GFPGAN, neural network that fixes faces\n    - CodeFormer, face restoration tool as an alternative to GFPGAN\n    - RealESRGAN, neural network upscaler\n    - ESRGAN, neural network upscaler with a lot of third party models\n    - SwinIR and Swin2SR([see here](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/2092)), neural network upscalers\n    - LDSR, Latent diffusion super resolution upscaling\n- Resizing aspect ratio options\n- Sampling method selection\n    - Adjust sampler eta values (noise multiplier)\n    - More advanced noise setting options\n- Interrupt processing at any time\n- 4GB video card support (also reports of 2GB working)\n- Correct seeds for batches\n- Live prompt token length validation\n- Generation parameters\n     - parameters you used to generate images are saved with that image\n     - in PNG chunks for PNG, in EXIF for JPEG\n     - can drag the image to PNG info tab to restore generation parameters and automatically copy them into UI\n     - can be disabled in settings\n     - drag and drop an image/text-parameters to promptbox\n- Read Generation Parameters Button, loads parameters in promptbox to UI\n- Settings page\n- Running arbitrary python code from UI (must run with --allow-code to enable)\n- Mouseover hints for most UI elements\n- Possible to change defaults/mix/max/step values for UI elements via text config\n- Tiling support, a checkbox to create images that can be tiled like textures\n- Progress bar and live image generation preview\n    - Can use a separate neural network to produce previews with almost none VRAM or compute requirement\n- Negative prompt, an extra text field that allows you to list what you don't want to see in generated image\n- Styles, a way to save part of prompt and easily apply them via dropdown later\n- Variations, a way to generate same image but with tiny differences\n- Seed resizing, a way to generate same image but at slightly different resolution\n- CLIP interrogator, a button that tries to guess prompt from an image\n- Prompt Editing, a way to change prompt mid-generation, say to start making a watermelon and switch to anime girl midway\n- Batch Processing, process a group of files using img2img\n- Img2img Alternative, reverse Euler method of cross attention control\n- Highres Fix, a convenience option to produce high resolution pictures in one click without usual distortions\n- Reloading checkpoints on the fly\n- Checkpoint Merger, a tab that allows you to merge up to 3 checkpoints into one\n- [Custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts) with many extensions from community\n- [Composable-Diffusion](https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/), a way to use multiple prompts at once\n     - separate prompts using uppercase `AND`\n     - also supports weights for prompts: `a cat :1.2 AND a dog AND a penguin :2.2`\n- No token limit for prompts (original stable diffusion lets you use up to 75 tokens)\n- DeepDanbooru integration, creates danbooru style tags for anime prompts\n- [xformers](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers), major speed increase for select cards: (add --xformers to commandline args)\n- via extension: [History tab](https://github.com/yfszzx/stable-diffusion-webui-images-browser): view, direct and delete images conveniently within the UI\n- Generate forever option\n- Training tab\n     - hypernetworks and embeddings options\n     - Preprocessing images: cropping, mirroring, autotagging using BLIP or deepdanbooru (for anime)\n- Clip skip\n- Hypernetworks\n- Loras (same as Hypernetworks but more pretty)\n- A sparate UI where you can choose, with preview, which embeddings, hypernetworks or Loras to add to your prompt. \n- Can select to load a different VAE from settings screen\n- Estimated completion time in progress bar\n- API\n- Support for dedicated [inpainting model](https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion) by RunwayML.\n- via extension: [Aesthetic Gradients](https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients), a way to generate images with a specific aesthetic by using clip images embeds (implementation of [https://github.com/vicgalle/stable-diffusion-aesthetic-gradients](https://github.com/vicgalle/stable-diffusion-aesthetic-gradients))\n- [Stable Diffusion 2.0](https://github.com/Stability-AI/stablediffusion) support - see [wiki](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable-diffusion-20) for instructions\n- [Alt-Diffusion](https://arxiv.org/abs/2211.06679) support - see [wiki](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#alt-diffusion) for instructions\n- Now without any bad letters!\n- Load checkpoints in safetensors format\n- Eased resolution restriction: generated image's domension must be a multiple of 8 rather than 64\n- Now with a license!\n- Reorder elements in the UI from settings screen\n- \n\n## Installation and Running\nMake sure the required [dependencies](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies) are met and follow the instructions available for both [NVidia](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs) (recommended) and [AMD/Intel](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs) GPUs.\n\nAlternatively, use online services (like Google Colab):\n\n- [List of Online Services](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Online-Services)\n\n### Automatic Installation on Windows\n1. Install [Python 3.10.6](https://www.python.org/downloads/windows/), checking \"Add Python to PATH\"\n2. Install [git](https://git-scm.com/download/win).\n3. Download the stable-diffusion-webui repository, for example by running `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git`.\n4. Place stable diffusion checkpoint (`model.ckpt`) in the `models/Stable-diffusion` directory (see [dependencies](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies) for where to get it).\n5. Run `webui-user.bat` from Windows Explorer as normal, non-administrator, user.\n\n### Automatic Installation on Linux\n1. Install the dependencies:\n```bash\n# Debian-based:\nsudo apt install wget git python3 python3-venv\n# Red Hat-based:\nsudo dnf install wget git python3\n# Arch-based:\nsudo pacman -S wget git python3\n```\n2. To install in `/home/$(whoami)/stable-diffusion-webui/`, run:\n```bash\nbash \u003c(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)\n```\n\n### Installation on Apple Silicon\n\nFind the instructions [here](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon).\n\n## Contributing\nHere's how to add code to this repo: [Contributing](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing)\n\n## Documentation\nThe documentation was moved from this README over to the project's [wiki](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki).\n\n## Credits\nLicenses for borrowed code can be found in `Settings -\u003e Licenses` screen, and also in `html/licenses.html` file.\n\n- Stable Diffusion - https://github.com/CompVis/stable-diffusion, https://github.com/CompVis/taming-transformers\n- k-diffusion - https://github.com/crowsonkb/k-diffusion.git\n- GFPGAN - https://github.com/TencentARC/GFPGAN.git\n- CodeFormer - https://github.com/sczhou/CodeFormer\n- ESRGAN - https://github.com/xinntao/ESRGAN\n- SwinIR - https://github.com/JingyunLiang/SwinIR\n- Swin2SR - https://github.com/mv-lab/swin2sr\n- LDSR - https://github.com/Hafiidz/latent-diffusion\n- MiDaS - https://github.com/isl-org/MiDaS\n- Ideas for optimizations - https://github.com/basujindal/stable-diffusion\n- Cross Attention layer optimization - Doggettx - https://github.com/Doggettx/stable-diffusion, original idea for prompt editing.\n- Cross Attention layer optimization - InvokeAI, lstein - https://github.com/invoke-ai/InvokeAI (originally http://github.com/lstein/stable-diffusion)\n- Sub-quadratic Cross Attention layer optimization - Alex Birch (https://github.com/Birch-san/diffusers/pull/1), Amin Rezaei (https://github.com/AminRezaei0x443/memory-efficient-attention)\n- Textual Inversion - Rinon Gal - https://github.com/rinongal/textual_inversion (we're not using his code, but we are using his ideas).\n- Idea for SD upscale - https://github.com/jquesnelle/txt2imghd\n- Noise generation for outpainting mk2 - https://github.com/parlance-zz/g-diffuser-bot\n- CLIP interrogator idea and borrowing some code - https://github.com/pharmapsychotic/clip-interrogator\n- Idea for Composable Diffusion - https://github.com/energy-based-model/Compositional-Visual-Generation-with-Composable-Diffusion-Models-PyTorch\n- xformers - https://github.com/facebookresearch/xformers\n- DeepDanbooru - interrogator for anime diffusers https://github.com/KichangKim/DeepDanbooru\n- Sampling in float32 precision from a float16 UNet - marunine for the idea, Birch-san for the example Diffusers implementation (https://github.com/Birch-san/diffusers-play/tree/92feee6)\n- Instruct pix2pix - Tim Brooks (star), Aleksander Holynski (star), Alexei A. Efros (no star) - https://github.com/timothybrooks/instruct-pix2pix\n- Security advice - RyotaK\n- Initial Gradio script - posted on 4chan by an Anonymous user. Thank you Anonymous user.\n- (You)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAloereed%2Fstable-diffusion-webui-arc-directml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAloereed%2Fstable-diffusion-webui-arc-directml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAloereed%2Fstable-diffusion-webui-arc-directml/lists"}