Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge dev to master #2653

Merged
merged 151 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
323e2c1
in-mid-out LoRA Weights
AI-Casanova Dec 3, 2023
b59f796
fixes
AI-Casanova Dec 3, 2023
2b49dae
en load improvements, torchvision compatibility fix
vladmandic Dec 4, 2023
27bd7c4
Merge pull request #2585 from AI-Casanova/block-LoRA
vladmandic Dec 4, 2023
167b903
add additional ip-adapters
vladmandic Dec 5, 2023
6cd4abb
cleanup
vladmandic Dec 5, 2023
bf5ea24
add hdr settings to metadata
vladmandic Dec 5, 2023
635efb0
fix save metadata
vladmandic Dec 5, 2023
3a36c07
Check SD_LORA_DIFFUSERS flag once in networks.py
Disty0 Dec 5, 2023
629a46a
Disable IPEX attention if the GPU supports 64 bit
Disty0 Dec 5, 2023
7c16ea6
add modelscope
vladmandic Dec 5, 2023
c8970ab
Cleanup IPEX libs
Disty0 Dec 5, 2023
6cec284
cleanup compile
vladmandic Dec 5, 2023
0febcc2
animatediff full latent mode
vladmandic Dec 5, 2023
6031b71
IPEX fix torch.UntypedStorage.is_cuda
Disty0 Dec 5, 2023
327d15a
update changelog
vladmandic Dec 5, 2023
f6bf515
Use devices.dtype with IP Adapter
Disty0 Dec 6, 2023
71743df
add playground models
vladmandic Dec 6, 2023
21eb429
Fix IPEX Optimize
Disty0 Dec 6, 2023
bd64bac
update ip-adapter, schedulers and xyz-grid
vladmandic Dec 7, 2023
7c3e0f6
Sticky Scrolling with New Data Indicator.
midcoastal Dec 7, 2023
931fa8f
Add ENV var to dissable Gradio Frontend Check
midcoastal Dec 8, 2023
77742f2
Merge pull request #2609 from midcoastal/Imp/DisableGradioFrontendCheck
vladmandic Dec 8, 2023
7e93719
enable ipadapter sd/sdxl switch
vladmandic Dec 8, 2023
efba57a
Merge pull request #2607 from midcoastal/WebUITerminalScroll
vladmandic Dec 8, 2023
72a167c
add video processing
vladmandic Dec 8, 2023
66f7a9a
add lora_force_diffusers and lora_fuse_diffusers
vladmandic Dec 8, 2023
dc56ea1
Update shared opts
Disty0 Dec 8, 2023
87eeedd
long filename and batch processing
vladmandic Dec 8, 2023
aa4b9b4
enable civit token
vladmandic Dec 8, 2023
f49e665
lint fixes
vladmandic Dec 8, 2023
b1e3a8f
fix filenamegen
vladmandic Dec 8, 2023
b96131f
fix en sort
vladmandic Dec 9, 2023
6cd1785
fix hdr
vladmandic Dec 9, 2023
f91735d
fix prompt parser with blank lines
vladmandic Dec 9, 2023
1b1ae67
add demofusion
vladmandic Dec 9, 2023
4823595
minor fixes
vladmandic Dec 10, 2023
d71287e
fix tensor to np
vladmandic Dec 10, 2023
91a8746
update cli scripts
vladmandic Dec 11, 2023
b7cbd34
update api and img2img
vladmandic Dec 11, 2023
0d805e3
fix tensor conversion
vladmandic Dec 11, 2023
0fe2764
IPEX fix dtype errors when GPU supports 64 bit
Disty0 Dec 11, 2023
839e12e
cleanup
vladmandic Dec 11, 2023
ac85b3a
Add OpenVINO cache path option to System Paths
Disty0 Dec 11, 2023
86894b8
Remove Intel ARC 1024x1024 workaround from OpenVINO
Disty0 Dec 11, 2023
291ef78
Update changelog
Disty0 Dec 11, 2023
e2213a4
add pipeline script example
vladmandic Dec 12, 2023
a6cb38a
update changelog
vladmandic Dec 12, 2023
be1d90c
update examples
vladmandic Dec 12, 2023
033569c
minor updates
vladmandic Dec 12, 2023
c5494e0
add cff
vladmandic Dec 12, 2023
9e9d31f
fix save params.txt
vladmandic Dec 13, 2023
68206fb
IPEX update to PyTorch 2.1 wheels for Linux
Disty0 Dec 13, 2023
72839b7
refactoring to support control
vladmandic Dec 13, 2023
92baeae
IPEX bundle in MKL and DPCPP
Disty0 Dec 13, 2023
f5cab11
IPEX update Tensorflow
Disty0 Dec 14, 2023
934152d
fix hypertile
vladmandic Dec 14, 2023
b96fbd8
add img2img_apply_overlay
vladmandic Dec 14, 2023
50699b6
Merge pull request #2622 from vladmandic/master
vladmandic Dec 14, 2023
135a8aa
Add DISABLE_IPEXRUN environment variable
Disty0 Dec 14, 2023
e6d95fd
Add env variables for MKL, DPCPP and OpenVINO installer
Disty0 Dec 15, 2023
936cf97
create_ui and process refactor
vladmandic Dec 15, 2023
86af00c
control prep work
vladmandic Dec 16, 2023
b9df9be
add segmind vega
vladmandic Dec 16, 2023
0609e99
add upscaler refresh
vladmandic Dec 16, 2023
2020d20
Prompt Scheduling
AI-Casanova Dec 17, 2023
9e7757b
Fixes
AI-Casanova Dec 17, 2023
4f5478d
fix reuse seed
vladmandic Dec 17, 2023
2b56e82
modularize en
vladmandic Dec 17, 2023
0c4f546
IPEX use custom wheels for Windows
Disty0 Dec 17, 2023
a3c4b50
fix styles refresh
vladmandic Dec 17, 2023
d872c8e
add glora
vladmandic Dec 17, 2023
327739d
add text2video
vladmandic Dec 18, 2023
0b3e1f4
Fix batch & optimize
AI-Casanova Dec 18, 2023
5b61d84
[Breaking change] Align some APIs with AUTOMATIC1111
Trojaner Dec 18, 2023
0263a89
vscode: disable format on save
Trojaner Dec 18, 2023
350cd17
Implement remaining API changes
Trojaner Dec 18, 2023
17e8fbf
Fix png-info and extensions endpoints
Trojaner Dec 18, 2023
21adfd5
make some params optional
vladmandic Dec 18, 2023
4f35976
Merge pull request #2634 from Trojaner/fix/api-alignment
vladmandic Dec 18, 2023
5eccf17
Merge pull request #2631 from AI-Casanova/prompt-callback
vladmandic Dec 18, 2023
c1aa146
update changelog
vladmandic Dec 18, 2023
f13f2d0
fix prompt scheduling
vladmandic Dec 18, 2023
711c086
update wiki
vladmandic Dec 18, 2023
bcb54fe
allow missing size
vladmandic Dec 18, 2023
3ee3f30
update control wiki
vladmandic Dec 18, 2023
0482d5a
width/height validation
vladmandic Dec 18, 2023
ff94b19
Fix scheduling, lint
AI-Casanova Dec 19, 2023
2986f55
image check and save
vladmandic Dec 19, 2023
14f03c7
IPEX fix SDPA and SD Video
Disty0 Dec 19, 2023
9c8be98
minor updates
vladmandic Dec 19, 2023
1ec2b0e
update changelog
vladmandic Dec 19, 2023
1eacfc5
IPEX fixes
Disty0 Dec 19, 2023
fad3f41
Merge pull request #2637 from vladmandic/master
vladmandic Dec 19, 2023
9f68fd7
update changelog
vladmandic Dec 19, 2023
8ceeee8
add trace logging
vladmandic Dec 20, 2023
567e637
add blip diffusion
vladmandic Dec 20, 2023
711b744
IPEX fix slicing rate
Disty0 Dec 20, 2023
6e04bac
merge control
vladmandic Dec 20, 2023
d336c1f
control detect diffusers capabilities
vladmandic Dec 20, 2023
5cfc044
tracing and control improvements
vladmandic Dec 20, 2023
10c3671
add themes
vladmandic Dec 20, 2023
787e9b0
runtime eval pipeline type
vladmandic Dec 21, 2023
aeccc28
control set task args
vladmandic Dec 21, 2023
1b0e9b0
update control adapters
vladmandic Dec 21, 2023
01fb0fa
update requirements
vladmandic Dec 21, 2023
9b40bdc
update changelog
vladmandic Dec 21, 2023
d7b0d59
add control tests
vladmandic Dec 21, 2023
0471f54
add more control tests
vladmandic Dec 21, 2023
ec0a08c
fix inpaint overlay
vladmandic Dec 22, 2023
4b74d3e
modularize ui imports
vladmandic Dec 22, 2023
93a3b53
control input control
vladmandic Dec 22, 2023
843340d
OpenVINO 8 bit support for CPUs
Disty0 Dec 23, 2023
9dcc76a
OpenVINO reduce System RAM usage
Disty0 Dec 23, 2023
d25b3d1
OpenVINO fix compile when cache doesn't exist
Disty0 Dec 23, 2023
79e6c51
fix control img2img
vladmandic Dec 23, 2023
1bbdab7
OpenVINO fix cache loading
Disty0 Dec 23, 2023
1d38358
control add ip-adapter
vladmandic Dec 23, 2023
7ab9ba0
hide variation seed in diffusers
vladmandic Dec 23, 2023
c3984b5
lora and vae loading error reporting
vladmandic Dec 23, 2023
6bb73e1
add support for lora oft, lyco oft, peft
vladmandic Dec 24, 2023
3601643
cleanup
vladmandic Dec 24, 2023
542686e
detect sd2
vladmandic Dec 25, 2023
60e0e11
fix control pipeline
vladmandic Dec 25, 2023
0688097
update requirements and add control-lllite
vladmandic Dec 25, 2023
0c38745
fix atomic write
vladmandic Dec 25, 2023
03c59c7
fix model detection compatibility item
vladmandic Dec 26, 2023
54deae7
change onboarding and remove download default model
vladmandic Dec 26, 2023
54acb47
add faceid module
vladmandic Dec 26, 2023
d1acc6e
add faceid metadata
vladmandic Dec 26, 2023
81952ce
cleanups
vladmandic Dec 26, 2023
198c867
update changelog
vladmandic Dec 26, 2023
1f8749a
OpenVINO update PyTorch to 2.1.2
Disty0 Dec 26, 2023
0df9440
add reference to original, reimplement control-xs
vladmandic Dec 27, 2023
1de3c6a
add amused model support and update reference list
vladmandic Dec 27, 2023
3062e9e
add depth3d support
vladmandic Dec 27, 2023
c31671d
update changelog
vladmandic Dec 27, 2023
fd91b4b
nitpicks
vladmandic Dec 28, 2023
1a0e3c6
cleanup logging
vladmandic Dec 28, 2023
8944d3b
simplify processing call
vladmandic Dec 28, 2023
0171b42
fix prompt drag/drop
vladmandic Dec 28, 2023
af60697
remove extra logging
vladmandic Dec 28, 2023
eef0867
improve inpainting quality
vladmandic Dec 28, 2023
8c395a8
improve animatediff
vladmandic Dec 28, 2023
1c7ab98
set vae options on change
vladmandic Dec 28, 2023
4d4edad
Apostrophe
Dec 28, 2023
dc30235
Merge pull request #2650 from JetVarimax/patch-2
vladmandic Dec 28, 2023
4136d60
IPEX Attention reduce CPU overhead
Disty0 Dec 28, 2023
066c27c
Update changelog
Disty0 Dec 29, 2023
b10a579
IPEX 8 bit support with NNCF
Disty0 Dec 29, 2023
f4f4f42
update docs
vladmandic Dec 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cache
*.lock
*.zip
*.rar
*.7z
*.pyc
/*.bat
/*.sh
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
"./repositories/stable-diffusion-stability-ai",
"./repositories/stable-diffusion-stability-ai/ldm"
],
"python.analysis.typeCheckingMode": "off"
}
"python.analysis.typeCheckingMode": "off",
"editor.formatOnSave": false
}
141 changes: 141 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,146 @@
# Change Log for SD.Next

## Update for 2023-12-29

- **Control**
- native implementation of all image control methods:
**ControlNet**, **ControlNet XS**, **Control LLLite**, **T2I Adapters** and **IP Adapters**
- top-level **Control** next to **Text** and **Image** generate
- supports all variations of **SD15** and **SD-XL** models
- supports *Text*, *Image*, *Batch* and *Video* processing
- for details and list of supported models and workflows, see Wiki documentation:
<https://github.com/vladmandic/automatic/wiki/Control>
- **Diffusers**
- [Segmind Vega](https://huggingface.co/segmind/Segmind-Vega) model support
- small and fast version of **SDXL**, only 3.1GB in size!
- select from *networks -> reference*
- [aMUSEd 256](https://huggingface.co/amused/amused-256) and [aMUSEd 512](https://huggingface.co/amused/amused-512) model support
- lightweigt models that excel at fast image generation
- *note*: must select: settings -> diffusers -> generator device: unset
- select from *networks -> reference*
- [Playground v1](https://huggingface.co/playgroundai/playground-v1), [Playground v2 256](https://huggingface.co/playgroundai/playground-v2-256px-base), [Playground v2 512](https://huggingface.co/playgroundai/playground-v2-512px-base), [Playground v2 1024](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) model support
- comparable to SD15 and SD-XL, trained from scratch for highly aesthetic images
- simply select from *networks -> reference* and use as usual
- [BLIP-Diffusion](https://dxli94.github.io/BLIP-Diffusion-website/)
- img2img model that can replace subjects in images using prompt keywords
- download and load by selecting from *networks -> reference -> blip diffusion*
- in image tab, select `blip diffusion` script
- [DemoFusion](https://github.com/PRIS-CV/DemoFusion) run your SDXL generations at any resolution!
- in **Text** tab select *script* -> *demofusion*
- *note*: GPU VRAM limits do not automatically go away so be careful when using it with large resolutions
in the future, expect more optimizations, especially related to offloading/slicing/tiling,
but at the moment this is pretty much experimental-only
- [AnimateDiff](https://github.com/guoyww/animatediff/)
- overall improved quality
- can now be used with *second pass* - enhance, upscale and hires your videos!
- [IP Adapter](https://github.com/tencent-ailab/IP-Adapter)
- add support for **ip-adapter-plus_sd15, ip-adapter-plus-face_sd15 and ip-adapter-full-face_sd15**
- can now be used in *xyz-grid*
- **Text-to-Video**
- in text tab, select `text-to-video` script
- supported models: **ModelScope v1.7b, ZeroScope v1, ZeroScope v1.1, ZeroScope v2, ZeroScope v2 Dark, Potat v1**
*if you know of any other t2v models youd like to see supported, let me know!*
- models are auto-downloaded on first use
- *note*: current base model will be unloaded to free up resources
- **Prompt scheduling** now implemented for Diffusers backend, thanks @AI-Casanova
- **Custom pipelines** contribute by adding your own custom pipelines!
- for details, see fully documented example:
<https://github.com/vladmandic/automatic/blob/dev/scripts/example.py>
- **Schedulers**
- add timesteps range, changing it will make scheduler to be over-complete or under-complete
- add rescale betas with zero SNR option (applicable to Euler, Euler a and DDIM, allows for higher dynamic range)
- **Inpaint**
- improved quality when using mask blur and padding
- **UI**
- 3 new native UI themes: **orchid-dreams**, **emerald-paradise** and **timeless-beige**, thanks @illu_Zn
- more dynamic controls depending on the backend (original or diffusers)
controls that are not applicable in current mode are now hidden
- allow setting of resize method directly in image tab
(previously via settings -> upscaler_for_img2img)
- **Optional**
- **FaceID** face guidance during generation
- also based on IP adapters, but with additional face detection and external embeddings calculation
- calculates face embeds based on input image and uses it to guide generation
- simply select from *scripts -> faceid*
- *experimental module*: requirements must be installed manually:
> pip install insightface ip_adapter
- **Depth 3D** image to 3D scene
- delivered as an extension, install from extensions tab
<https://github.com/vladmandic/sd-extension-depth3d>
- creates fully compatible 3D scene from any image by using depth estimation
and creating a fully populated mesh
- scene can be freely viewed in 3D in the UI itself or downloaded for use in other applications
- [ONNX/Olive](https://github.com/vladmandic/automatic/wiki/ONNX-Olive)
- major work continues in olive branch, see wiki for details, thanks @lshqqytiger
as a highlight, 4-5 it/s using DirectML on AMD GPU translates to 23-25 it/s using ONNX/Olive!
- **General**
- new **onboarding**
- if no models are found during startup, app will no longer ask to download default checkpoint
instead, it will show message in UI with options to change model path or download any of the reference checkpoints
- *extra networks -> models -> reference* section is now enabled for both original and diffusers backend
- support for **Torch 2.1.2** (release) and **Torch 2.3** (dev)
- **Process** create videos from batch or folder processing
supports *GIF*, *PNG* and *MP4* with full interpolation, scene change detection, etc.
- **LoRA**
- add support for block weights, thanks @AI-Casanova
example `<lora:SDXL_LCM_LoRA:1.0:in=0:mid=1:out=0>`
- add support for LyCORIS GLora networks
- add support for LoRA PEFT (*Diffusers*) networks
- add support for Lora-OFT (*Kohya*) and Lyco-OFT (*Kohaku*) networks
- reintroduce alternative loading method in settings: `lora_force_diffusers`
- add support for `lora_fuse_diffusers` if using alternative method
use if you have multiple complex loras that may be causing performance degradation
as it fuses lora with model during load instead of interpreting lora on-the-fly
- **CivitAI downloader** allow usage of access tokens for download of gated or private models
- **Extra networks** new *settting -> extra networks -> build info on first access*
indexes all networks on first access instead of server startup
- **IPEX**, thanks @disty0
- update to **Torch 2.1**
if you get file not found errors, set `DISABLE_IPEXRUN=1` and run the webui with `--reinstall`
- built-in *MKL* and *DPCPP* for IPEX, no need to install OneAPI anymore
- **StableVideoDiffusion** is now supported with IPEX
- **8 bit support with NNCF** on Diffusers backend
- fix IPEX Optimize not applying with Diffusers backend
- disable 32bit workarounds if the GPU supports 64bit
- add `DISABLE_IPEXRUN` and `DISABLE_IPEX_1024_WA` environment variables
- performance and compatibility improvements
- **OpenVINO**, thanks @disty0
- **8 bit support for CPUs**
- reduce System RAM usage
- update to Torch 2.1.2
- add *Directory for OpenVINO cache* option to *System Paths*
- remove Intel ARC specific 1024x1024 workaround
- **HDR controls**
- batch-aware for enhancement of multiple images or video frames
- available in image tab
- **Logging**
- additional *TRACE* logging enabled via specific env variables
see <https://github.com/vladmandic/automatic/wiki/Debug> for details
- improved profiling
use with `--debug --profile`
- log output file sizes
- **Other**
- **API** several minor but breaking changes to API behavior to better align response fields, thanks @Trojaner
- **Inpaint** add option `apply_overlay` to control if inpaint result should be applied as overlay or as-is
can remove artifacts and hard edges of inpaint area but also remove some details from original
- **chaiNNer** fix `NaN` issues due to autocast
- **Upscale** increase limit from 4x to 8x given the quality of some upscalers
- **Extra Networks** fix sort
- reduced default **CFG scale** from 6 to 4 to be more out-of-the-box compatibile with LCM/Turbo models
- disable google fonts check on server startup
- fix torchvision/basicsr compatibility
- fix styles quick save
- add hdr settings to metadata
- improve handling of long filenames and filenames during batch processing
- do not set preview samples when using via api
- avoid unnecessary resizes in img2img and inpaint
- safe handling of config updates avoid file corruption on I/O errors
- updated `cli/simple-txt2img.py` and `cli/simple-img2img.py` scripts
- save `params.txt` regardless of image save status
- update built-in log monitor in ui, thanks @midcoastal
- major CHANGELOG doc cleanup, thanks @JetVarimax
- major INSTALL doc cleanup, thanks JetVarimax

## Update for 2023-12-04

Whats new? Native video in SD.Next via both **AnimateDiff** and **Stable-Video-Diffusion** - and including native MP4 encoding and smooth video outputs out-of-the-box, not just animated-GIFs.
Expand Down
28 changes: 28 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cff-version: 1.2.0
title: SD.Next
url: 'https://github.com/vladmandic/automatic'
message: >-
If you use this software, please cite it using the
metadata from this file
type: software
authors:
- given-names: Vladimir
name-particle: Vlado
family-names: Mandic
orcid: 'https://orcid.org/0009-0003-4592-5074'
identifiers:
- type: url
value: 'https://github.com/vladmandic'
description: GitHub
- type: url
value: 'https://www.linkedin.com/in/cyan051/'
description: LinkedIn
repository-code: 'https://github.com/vladmandic/automatic'
abstract: >-
SD.Next: Advanced Implementation of Stable Diffusion and
other diffusion models for text, image and video
generation
keywords:
- stablediffusion diffusers sdnext
license: AGPL-3.0
date-released: 2022-12-24
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ All individual features are not listed here, instead check [ChangeLog](CHANGELOG
- Multiple backends!
▹ **Original | Diffusers**
- Multiple diffusion models!
▹ **Stable Diffusion | SD-XL | LCM | Segmind | Kandinsky | Pixart-α | Würstchen | DeepFloyd IF | UniDiffusion | SD-Distilled | etc.**
▹ **Stable Diffusion 1.5/2.1 | SD-XL | LCM | Segmind | Kandinsky | Pixart-α | Würstchen | aMUSEd | DeepFloyd IF | UniDiffusion | SD-Distilled | BLiP Diffusion | etc.**
- Built-in Control for Text, Image, Batch and video processing!
▹ **ControlNet | ControlNet XS | Control LLLite | T2I Adapters | IP Adapters**
- Multiplatform!
▹ **Windows | Linux | MacOS with CPU | nVidia | AMD | IntelArc | DirectML | OpenVINO | ONNX+Olive**
- Platform specific autodetection and tuning performed on install
- Optimized processing with latest `torch` developments with built-in support for `torch.compile` and multiple compile backends
- Improved prompt parser
- Enhanced *Lora*/*LoCon*/*Lyco* code supporting latest trends in training
- Built-in queue management
- Advanced metadata caching and handling to speed up operations
- Enterprise level logging and hardened API
- Modern localization and hints engine
- Broad compatibility with existing extensions ecosystem and new extensions manager
Expand All @@ -37,7 +38,8 @@ All individual features are not listed here, instead check [ChangeLog](CHANGELOG

<br>

![Screenshot-Dark](html/black-teal.jpg)
![Screenshot-Dark](html/xmas-default.jpg)
![Screenshot-Control](html/xmas-control.jpg)
![Screenshot-Light](html/light-teal.jpg)

<br>
Expand All @@ -58,17 +60,23 @@ All individual features are not listed here, instead check [ChangeLog](CHANGELOG

Additional models will be added as they become available and there is public interest in them

- [RunwayML Stable Diffusion](https://github.com/Stability-AI/stablediffusion/) 1.x and 2.x *(all variants)*
- [StabilityAI Stable Diffusion XL](https://github.com/Stability-AI/generative-models)
- [StabilityAI Stable Video Diffusion Base and XT](https://huggingface.co/stabilityai/stable-video-diffusion-img2vid)
- [Segmind SSD-1B](https://huggingface.co/segmind/SSD-1B)
- [LCM: Latent Consistency Models](https://github.com/openai/consistency_models)
- [Kandinsky](https://github.com/ai-forever/Kandinsky-2) *2.1 and 2.2 and latest 3.0*
- [PixArt-α XL 2](https://github.com/PixArt-alpha/PixArt-alpha) *Medium and Large*
- [RunwayML Stable Diffusion](https://github.com/Stability-AI/stablediffusion/) 1.x and 2.x *(all variants)*
- [StabilityAI Stable Diffusion XL](https://github.com/Stability-AI/generative-models)
- [StabilityAI Stable Video Diffusion](https://huggingface.co/stabilityai/stable-video-diffusion-img2vid) Base and XT
- [LCM: Latent Consistency Models](https://github.com/openai/consistency_models)
- [aMUSEd 256](https://huggingface.co/amused/amused-256) 256 and 512
- [Segmind Vega](https://huggingface.co/segmind/Segmind-Vega)
- [Segmind SSD-1B](https://huggingface.co/segmind/SSD-1B)
- [Kandinsky](https://github.com/ai-forever/Kandinsky-2) *2.1 and 2.2 and latest 3.0*
- [PixArt-α XL 2](https://github.com/PixArt-alpha/PixArt-alpha) *Medium and Large*
- [Warp Wuerstchen](https://huggingface.co/blog/wuertschen)
- [Playground](https://huggingface.co/playgroundai/playground-v2-256px-base) *v1, v2 256, v2 512, v2 1024*
- [Tsinghua UniDiffusion](https://github.com/thu-ml/unidiffuser)
- [DeepFloyd IF](https://github.com/deep-floyd/IF) *Medium and Large*
- [ModelScope T2V](https://huggingface.co/damo-vilab/text-to-video-ms-1.7b)
- [Segmind SD Distilled](https://huggingface.co/blog/sd_distillation) *(all variants)*
- [BLIP-Diffusion](https://dxli94.github.io/BLIP-Diffusion-website/)


Also supported are modifiers such as:
- **LCM** and **Turbo** (Adversarial Diffusion Distillation) networks
Expand Down Expand Up @@ -209,6 +217,9 @@ General goals:

### **Docs**

If you're unsure how to use a feature, best place to start is [Wiki](https://github.com/vladmandic/automatic/wiki) and if its not there,
check [ChangeLog](CHANGELOG.md) for when feature was first introduced as it will always have a short note on how to use it

- [Wiki](https://github.com/vladmandic/automatic/wiki)
- [ReadMe](README.md)
- [ToDo](TODO.md)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Any code commit is validated before merge
- Download extensions and themes indexes from automatically updated indexes
- Download required packages and repositories from GitHub during installation/upgrade
- Download installed/enabled extensions
- Download default model from official repository
- Download models from CivitAI and/or Huggingface when instructed by user
- Submit benchmark info upon user interaction
2 changes: 1 addition & 1 deletion cli/image-grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def grid(images, labels = None, width = 0, height = 0, border = 0, square = Fals
for i, img in enumerate(images): # pylint: disable=redefined-outer-name
x = (i % cols * w) + (i % cols * border)
y = (i // cols * h) + (i // cols * border)
img.thumbnail((w, h), Image.HAMMING)
img.thumbnail((w, h), Image.Resampling.HAMMING)
image.paste(img, box=(x, y))
if labels is not None and len(images) == len(labels):
ctx = ImageDraw.Draw(image)
Expand Down
63 changes: 40 additions & 23 deletions cli/simple-img2img.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env python
import os
import io
import sys
import time
import base64
import logging
import argparse
import requests
import urllib3
from PIL import Image
Expand All @@ -14,22 +15,13 @@

logging.basicConfig(level = logging.INFO, format = '%(asctime)s %(levelname)s: %(message)s')
log = logging.getLogger(__name__)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

filename='/tmp/simple-img2img.jpg'
options = {
"init_images": [],
"prompt": "city at night",
"negative_prompt": "foggy, blurry",
"steps": 20,
"batch_size": 1,
"n_iter": 1,
"seed": -1,
"sampler_name": "Euler a",
"cfg_scale": 6,
"width": 512,
"height": 512,
"save_images": False,
"send_images": True,
}
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)


def auth():
Expand All @@ -51,26 +43,51 @@ def encode(f):
image = image.convert('RGB')
with io.BytesIO() as stream:
image.save(stream, 'JPEG')
image.close()
values = stream.getvalue()
encoded = base64.b64encode(values).decode()
return encoded

def generate(num: int = 0):
log.info(f'sending generate request: {num+1} {options}')
options['init_images'] = [encode('html/logo-dark.png')]
options['batch_size'] = len(options['init_images'])
def generate(args): # pylint: disable=redefined-outer-name
t0 = time.time()
if args.model is not None:
post('/sdapi/v1/options', { 'sd_model_checkpoint': args.model })
post('/sdapi/v1/reload-checkpoint') # needed if running in api-only to trigger new model load
options['prompt'] = args.prompt
options['negative_prompt'] = args.negative
options['steps'] = int(args.steps)
options['seed'] = int(args.seed)
options['sampler_name'] = args.sampler
options['init_images'] = [encode(args.init)]
image = Image.open(args.init)
options['width'] = image.width
options['height'] = image.height
image.close()
if args.mask is not None:
options['mask'] = encode(args.mask)
data = post('/sdapi/v1/img2img', options)
t1 = time.time()
if 'images' in data:
for i in range(len(data['images'])):
b64 = data['images'][i].split(',',1)[0]
info = data['info']
image = Image.open(io.BytesIO(base64.b64decode(b64)))
log.info(f'received image: {image.size}')
image.save(filename)
log.info(f'received image: size={image.size} file={filename} time={t1-t0:.2f} info="{info}"')
else:
log.warning(f'no images received: {data}')


if __name__ == "__main__":
sys.argv.pop(0)
repeats = int(''.join(sys.argv) or '1')
log.info(f'repeats: {repeats}')
for n in range(repeats):
generate(n)
parser = argparse.ArgumentParser(description = 'simple-img2img')
parser.add_argument('--init', required=True, help='init image')
parser.add_argument('--mask', required=False, help='mask image')
parser.add_argument('--prompt', required=False, default='', help='prompt text')
parser.add_argument('--negative', required=False, default='', help='negative prompt text')
parser.add_argument('--steps', required=False, default=20, help='number of steps')
parser.add_argument('--seed', required=False, default=-1, help='initial seed')
parser.add_argument('--sampler', required=False, default='Euler a', help='sampler name')
parser.add_argument('--model', required=False, help='model name')
args = parser.parse_args()
log.info(f'img2img: {args}')
generate(args)
Loading
Loading