Unverified Commit 4a9ff089 authored by papuSpartan's avatar papuSpartan Committed by GitHub
Browse files

Merge branch 'AUTOMATIC1111:master' into master

parents a3b047b7 f49c08ea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ body:
    attributes:
      label: Commit where the problem happens
      description: Which commit are you running ? (copy the **Commit hash** shown in the cmd/terminal when you launch the UI)
    validations:
      required: true
  - type: dropdown
    id: platforms
    attributes:
+5 −0
Original line number Diff line number Diff line
blank_issues_enabled: false
contact_links:
  - name: WebUI Community Support
    url: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions
    about: Please ask and answer questions here.
+22 −8
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- One click install and run script (but you still must install python and git)
- Outpainting
- Inpainting
- Color Sketch
- Prompt Matrix
- Stable Diffusion Upscale
- Attention, specify parts of text that the model should pay more attention to
@@ -23,6 +24,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
    - have as many embeddings as you want and use any names you like for them
    - use multiple embeddings with different numbers of vectors per token
    - works with half precision floating point numbers
    - train embeddings on 8GB (also reports of 6GB working)
- Extras tab with:
    - GFPGAN, neural network that fixes faces
    - CodeFormer, face restoration tool as an alternative to GFPGAN
@@ -37,14 +39,14 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- Interrupt processing at any time
- 4GB video card support (also reports of 2GB working)
- Correct seeds for batches
- Prompt length validation
     - get length of prompt in tokens as you type
     - get a warning after generation if some text was truncated
- Live prompt token length validation
- Generation parameters
     - parameters you used to generate images are saved with that image
     - in PNG chunks for PNG, in EXIF for JPEG
     - can drag the image to PNG info tab to restore generation parameters and automatically copy them into UI
     - can be disabled in settings
     - drag and drop an image/text-parameters to promptbox
- Read Generation Parameters Button, loads parameters in promptbox to UI
- Settings page
- Running arbitrary python code from UI (must run with --allow-code to enable)
- Mouseover hints for most UI elements
@@ -59,10 +61,10 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- CLIP interrogator, a button that tries to guess prompt from an image
- Prompt Editing, a way to change prompt mid-generation, say to start making a watermelon and switch to anime girl midway
- Batch Processing, process a group of files using img2img
- Img2img Alternative
- Img2img Alternative, reverse Euler method of cross attention control
- Highres Fix, a convenience option to produce high resolution pictures in one click without usual distortions
- Reloading checkpoints on the fly
- Checkpoint Merger, a tab that allows you to merge two checkpoints into one
- Checkpoint Merger, a tab that allows you to merge up to 3 checkpoints into one
- [Custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts) with many extensions from community
- [Composable-Diffusion](https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/), a way to use multiple prompts at once
     - separate prompts using uppercase `AND`
@@ -70,14 +72,26 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- No token limit for prompts (original stable diffusion lets you use up to 75 tokens)
- DeepDanbooru integration, creates danbooru style tags for anime prompts (add --deepdanbooru to commandline args)
- [xformers](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers), major speed increase for select cards: (add --xformers to commandline args)
- History tab: view, direct and delete images conveniently within the UI
- Generate forever option
- Training tab
     - hypernetworks and embeddings options
     - Preprocessing images: cropping, mirroring, autotagging using BLIP or deepdanbooru (for anime)
- Clip skip
- Use Hypernetworks
- Use VAEs
- Estimated completion time in progress bar
- API
- Support for dedicated [inpainting model](https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion) by RunwayML. 
- Aesthetic Gradients, a way to generate images with a specific aesthetic by using clip images embds (implementation of [https://github.com/vicgalle/stable-diffusion-aesthetic-gradients](https://github.com/vicgalle/stable-diffusion-aesthetic-gradients))


## Installation and Running
Make 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](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs) GPUs.

Alternatively, use Google Colab:
Alternatively, use online services (like Google Colab):

- [Colab, maintained by Akaibu](https://colab.research.google.com/drive/1kw3egmSn-KgWsikYvOMjJkVDsPLjEMzl)
- [Colab, original by me, outdated](https://colab.research.google.com/drive/1Iy-xW9t1-OQWhb0hNxueGij8phCyluOh).
- [List of Online Services](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Online-Services)

### Automatic Installation on Windows
1. Install [Python 3.10.6](https://www.python.org/downloads/windows/), checking "Add Python to PATH"
+22 −33
Original line number Diff line number Diff line
@@ -3,12 +3,12 @@ let currentWidth = null;
let currentHeight = null;
let arFrameTimeout = setTimeout(function(){},0);

function dimensionChange(e,dimname){
function dimensionChange(e, is_width, is_height){

	if(dimname == 'Width'){
	if(is_width){
		currentWidth = e.target.value*1.0
	}
	if(dimname == 'Height'){
	if(is_height){
		currentHeight = e.target.value*1.0
	}

@@ -18,22 +18,13 @@ function dimensionChange(e,dimname){
		return;
	}

	var img2imgMode = gradioApp().querySelector('#mode_img2img.tabs > div > button.rounded-t-lg.border-gray-200')
	if(img2imgMode){
		img2imgMode=img2imgMode.innerText
	}else{
		return;
	}

	var redrawImage = gradioApp().querySelector('div[data-testid=image] img');
	var inpaintImage = gradioApp().querySelector('#img2maskimg div[data-testid=image] img')

	var targetElement = null;

	if(img2imgMode=='img2img' && redrawImage){
		targetElement = redrawImage;
	}else if(img2imgMode=='Inpaint' && inpaintImage){
		targetElement = inpaintImage;
    var tabIndex = get_tab_index('mode_img2img')
	if(tabIndex == 0){
		targetElement = gradioApp().querySelector('div[data-testid=image] img');
	} else if(tabIndex == 1){
		targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img');
	}

	if(targetElement){
@@ -99,21 +90,19 @@ onUiUpdate(function(){
	if(inImg2img){
		let inputs = gradioApp().querySelectorAll('input');
		inputs.forEach(function(e){
			let parentLabel = e.parentElement.querySelector('label')
			if(parentLabel && parentLabel.innerText){
				if(!e.classList.contains('scrollwatch')){
					if(parentLabel.innerText == 'Width' || parentLabel.innerText == 'Height'){
						e.addEventListener('input', function(e){dimensionChange(e,parentLabel.innerText)} )
		    var is_width = e.parentElement.id == "img2img_width"
		    var is_height = e.parentElement.id == "img2img_height"

			if((is_width || is_height) && !e.classList.contains('scrollwatch')){
				e.addEventListener('input', function(e){dimensionChange(e, is_width, is_height)} )
				e.classList.add('scrollwatch')
			}
					if(parentLabel.innerText == 'Width'){
			if(is_width){
				currentWidth = e.value*1.0
			}
					if(parentLabel.innerText == 'Height'){
			if(is_height){
				currentHeight = e.value*1.0
			}
				}
			} 
		})
	}
});
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ function dropReplaceImage( imgWrap, files ) {
window.document.addEventListener('dragover', e => {
    const target = e.composedPath()[0];
    const imgWrap = target.closest('[data-testid="image"]');
    if ( !imgWrap && target.placeholder.indexOf("Prompt") == -1) {
    if ( !imgWrap && target.placeholder && target.placeholder.indexOf("Prompt") == -1) {
        return;
    }
    e.stopPropagation();
Loading