Skip to content

Documentation changes (refreshing documentation) #297

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
## Changelog
### 0.4.1 standalone mode
* ability to run DepthMap without WebUI (Use main.py. Make sure all the dependencies are installed. The support is not feature-complete.)

### 0.4.0 large code refactor
* UI improvements
* improved Batch from Directory, Clip and renormalize DepthMap
* slightly changed the behaviour of various options
* extension may partially work even if some of the dependencies are unmet

### 0.3.12
* Fixed stereo image generation
* Other bugfixes
### 0.3.11
* 3D model viewer (Experimental!)
* simple and fast (occluded) 3D mesh generation, support for equirectangular projection
(accurate results with ZoeDepth models only, no boost, no custom maps)
* default output format is now obj for inpainted mesh and simple mesh
### 0.3.10
* ZoeDepth support (with boost), 3 new models, best results so far
* better heatmap
### 0.3.9
* use existing/custom depthmaps in output dir for batch mode
* custom depthmap support for single file
* wavefront obj output support for inpainted mesh (enabled in settings)
* option to generate all stereo formats at once
* bugfix: convert single channel input image to rgb
* renamed midas imports to fix conflict with deforum
* ui cleanup
### 0.3.8 bugfix
* bugfix in remove background path
### 0.3.7 new features
* [rembg](https://github.com/danielgatis/rembg) Remove Background [PR](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/78) by [@graemeniedermayer](https://github.com/graemeniedermayer) merged
* setting to flip Left/Right SBS images
* added missing parameter for 3d inpainting (repeat_inpaint_edge)
* option to generate demo videos with mesh
### 0.3.6 new feature
* implemented binary ply file format for the inpainted 3D mesh, big reduction in filesize and save/load times.
* added progress indicators to the inpainting process
### 0.3.5 bugfix
* create path to 3dphoto models before download (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/76))
### 0.3.4 new featues
* depth clipping option (original idea by [@Extraltodeus](https://github.com/Extraltodeus))
* by popular demand, 3D-Photo-Inpainting is now implemented
* generate inpainted 3D mesh (PLY) and videos of said mesh
### 0.3.3 bugfix and new midas models
* updated to midas 3.1, bringing 2 new depth models (the 512 one eats VRAM for breakfast!)
* fix Next-ViT dependency issue for new installs
* extension no longer clones repositories, all dependencies are now contained in the extension
### 0.3.2 new feature and bugfixes
* several bug fixes for apple silicon and other machines without cuda
* NEW Stereo Image Generation techniques for gap filling by [@semjon00](https://github.com/semjon00) using polylines. (See [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/56)) Significant improvement in quality.
### 0.3.1 bugfix
* small speed increase for anaglyph creation
* clone midas repo before midas 3.1 to fix issue (see [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/55#issue-1510266008))
### 0.3.0 improved stereo image generation
* New improved technique for generating stereo images and balancing distortion between eyes by [@semjon00](https://github.com/semjon00) (See [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/51))
* Substantial speedup of stereo image generation code using numba JIT
### 0.2.9 new feature
* 3D Stereo (side-by-side) and red/cyan anaglyph image generation.
(Thanks to [@sina-masoud-ansari](https://github.com/sina-masoud-ansari) for the tip! Discussion [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/discussions/45))
### 0.2.8 bugfix
* boost (pix2pix) now also able to compute on cpu
* res101 able to compute on cpu
### 0.2.7 separate tab
* Depth Tab now available for easier stand-alone (batch) processing
### 0.2.6 ui layout and settings
* added link to repo so more people find their way to the instructions.
* boost rmax setting
### 0.2.5 bugfix
* error checking on model download (now with progressbar)
### 0.2.4 high resolution depthmaps
* multi-resolution merging is now implemented, significantly improving results!
* res101 can now also compute on CPU
### 0.2.3 bugfix
* path error on linux fixed
### 0.2.2 new features
* added (experimental) support for AdelaiDepth/LeReS (GPU Only!)
* new option to view depthmap as heatmap
* optimised ui layout
### 0.2.1 bugfix
* Correct seed is now used in filename and pnginfo when running batches. (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/35))
### 0.2.0 upgrade
* the script is now an extension, enabling auto installation.
### 0.1.9 bugfixes
* sd model moved to system memory while computing depthmap
* memory leak/fragmentation issue fixed
* recover from out of memory error
### 0.1.8 new options
* net size can now be set as width and height, option to match input size, sliders now have the same range as generation parameters. (see usage below)
* better error handling
### 0.1.7 bugfixes
* batch img2img now works (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/21#issuecomment-1306445056))
* generation parameters now only saved when enabled in settings
* model memory freed explicitly at end of script
### 0.1.6 new option
* option to invert depthmap (black=near, white=far), as required by some viewers.
### 0.1.5 bugfix
* saving as any format other than PNG now always produces an 8 bit, 3 channel RGB image. A single channel 16 bit image is only supported when saving as PNG. (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/15#issuecomment-1304909019))
### 0.1.4 update
* added support for `--no-half`. Now also works with cards that don't support half precision like GTX 16xx. ([verified](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/12#issuecomment-1304656398))
### 0.1.3 bugfix
* bugfix where some controls where not visible (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/11#issuecomment-1304400537))
### 0.1.2 new option
* network size slider. higher resolution depth maps (see usage below)
### 0.1.1 bugfixes
* overflow issue (see [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/10) for details and examples of artifacts)
* when not combining, depthmap is now saved as single channel 16 bit
### 0.1.0
* initial version: script mode, supports generating depthmaps with 4 different midas models
141 changes: 1 addition & 140 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,112 +20,6 @@ video by [@graemeniedermayer](https://github.com/graemeniedermayer), more exampl
![](https://user-images.githubusercontent.com/54073010/210012661-ef07986c-2320-4700-bc54-fad3899f0186.png)
images generated by [@semjon00](https://github.com/semjon00) from CC0 photos, more examples [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/56#issuecomment-1367596463).

## Changelog
* v0.4.1 standalone mode
* ability to run DepthMap without WebUI (Use main.py. Make sure all the dependencies are installed. The support is not feature-complete.)
* v0.4.0 large code refactor
* UI improvements
* improved Batch from Directory, Clip and renormalize DepthMap
* slightly changed the behaviour of various options
* extension may partially work even if some of the dependencies are unmet
* v0.3.12
* Fixed stereo image generation
* Other bugfixes
* v0.3.11
* 3D model viewer (Experimental!)
* simple and fast (occluded) 3D mesh generation, support for equirectangular projection
(accurate results with ZoeDepth models only, no boost, no custom maps)
* default output format is now obj for inpainted mesh and simple mesh
* v0.3.10
* ZoeDepth support (with boost), 3 new models, best results so far
* better heatmap
* v0.3.9
* use existing/custom depthmaps in output dir for batch mode
* custom depthmap support for single file
* wavefront obj output support for inpainted mesh (enabled in settings)
* option to generate all stereo formats at once
* bugfix: convert single channel input image to rgb
* renamed midas imports to fix conflict with deforum
* ui cleanup
* v0.3.8 bugfix
* bugfix in remove background path
* v0.3.7 new features
* [rembg](https://github.com/danielgatis/rembg) Remove Background [PR](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/78) by [@graemeniedermayer](https://github.com/graemeniedermayer) merged
* setting to flip Left/Right SBS images
* added missing parameter for 3d inpainting (repeat_inpaint_edge)
* option to generate demo videos with mesh
* v0.3.6 new feature
* implemented binary ply file format for the inpainted 3D mesh, big reduction in filesize and save/load times.
* added progress indicators to the inpainting process
* v0.3.5 bugfix
* create path to 3dphoto models before download (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/76))
* v0.3.4 new featues
* depth clipping option (original idea by [@Extraltodeus](https://github.com/Extraltodeus))
* by popular demand, 3D-Photo-Inpainting is now implemented
* generate inpainted 3D mesh (PLY) and videos of said mesh
* v0.3.3 bugfix and new midas models
* updated to midas 3.1, bringing 2 new depth models (the 512 one eats VRAM for breakfast!)
* fix Next-ViT dependency issue for new installs
* extension no longer clones repositories, all dependencies are now contained in the extension
* v0.3.2 new feature and bugfixes
* several bug fixes for apple silicon and other machines without cuda
* NEW Stereo Image Generation techniques for gap filling by [@semjon00](https://github.com/semjon00) using polylines. (See [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/56)) Significant improvement in quality.
* v0.3.1 bugfix
* small speed increase for anaglyph creation
* clone midas repo before midas 3.1 to fix issue (see [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/55#issue-1510266008))
* v0.3.0 improved stereo image generation
* New improved technique for generating stereo images and balancing distortion between eyes by [@semjon00](https://github.com/semjon00) (See [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/pull/51))
* Substantial speedup of stereo image generation code using numba JIT
* v0.2.9 new feature
* 3D Stereo (side-by-side) and red/cyan anaglyph image generation.
(Thanks to [@sina-masoud-ansari](https://github.com/sina-masoud-ansari) for the tip! Discussion [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/discussions/45))
* v0.2.8 bugfix
* boost (pix2pix) now also able to compute on cpu
* res101 able to compute on cpu
* v0.2.7 separate tab
* Depth Tab now available for easier stand-alone (batch) processing
* v0.2.6 ui layout and settings
* added link to repo so more people find their way to the instructions.
* boost rmax setting
* v0.2.5 bugfix
* error checking on model download (now with progressbar)
* v0.2.4 high resolution depthmaps
* multi-resolution merging is now implemented, significantly improving results!
* res101 can now also compute on CPU
* v0.2.3 bugfix
* path error on linux fixed
* v0.2.2 new features
* added (experimental) support for AdelaiDepth/LeReS (GPU Only!)
* new option to view depthmap as heatmap
* optimised ui layout
* v0.2.1 bugfix
* Correct seed is now used in filename and pnginfo when running batches. (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/35))
* v0.2.0 upgrade
* the script is now an extension, enabling auto installation.
* v0.1.9 bugfixes
* sd model moved to system memory while computing depthmap
* memory leak/fragmentation issue fixed
* recover from out of memory error
* v0.1.8 new options
* net size can now be set as width and height, option to match input size, sliders now have the same range as generation parameters. (see usage below)
* better error handling
* v0.1.7 bugfixes
* batch img2img now works (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/21#issuecomment-1306445056))
* generation parameters now only saved when enabled in settings
* model memory freed explicitly at end of script
* v0.1.6 new option
* option to invert depthmap (black=near, white=far), as required by some viewers.
* v0.1.5 bugfix
* saving as any format other than PNG now always produces an 8 bit, 3 channel RGB image. A single channel 16 bit image is only supported when saving as PNG. (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/15#issuecomment-1304909019))
* v0.1.4 update
* added support for `--no-half`. Now also works with cards that don't support half precision like GTX 16xx. ([verified](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/12#issuecomment-1304656398))
* v0.1.3 bugfix
* bugfix where some controls where not visible (see [issue](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/11#issuecomment-1304400537))
* v0.1.2 new option
* network size slider. higher resolution depth maps (see usage below)
* v0.1.1 bugfixes
* overflow issue (see [here](https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/10) for details and examples of artifacts)
* when not combining, depthmap is now saved as single channel 16 bit

## Install instructions
The script is now also available to install from the `Available` subtab under the `Extensions` tab in the WebUI.
Expand Down Expand Up @@ -190,48 +84,15 @@ If you often get out of memory errors when computing a depthmap on GPU while usi
- You can run the MiDaS network on their colab linked here https://pytorch.org/hub/intelisl_midas_v2/
- You can run BoostingMonocularDepth on their colab linked here : https://colab.research.google.com/github/compphoto/BoostingMonocularDepth/blob/main/Boostmonoculardepth.ipynb

## Viewing

### For viewing on 2D displays

* There is the excellent [depthy](https://github.com/panrafal/depthy) by Rafał Lindemann. LIVE link : [https://depthy.stamina.pl/](https://depthy.stamina.pl/)
(Instructions: Drag the rgb image into the window, then select Load depthmap, and drag the depthmap into the dialog inside the window.) Generates GIF and video.

* The [depth-player](https://github.com/spite/depth-player) by [@spite](https://github.com/spite) can load rgb and depthmap images and export a Wavefront OBJ file of a displaced plane mesh with the rgb image applied as texture. LIVE link : [https://depthplayer.ugocapeto.com/](https://depthplayer.ugocapeto.com/) Thanks to [@AugmentedRealityCat](https://github.com/AugmentedRealityCat) for the tip.

* Simple interactive depthmap viewer using three ([source](https://github.com/thygate/depthmap-viewer-three)). LIVE link : [https://thygate.github.io/depthmap-viewer-three](https://thygate.github.io/depthmap-viewer-three) (Instructions: Drag a combined-rgb-and-depth-horizontally image into the window to view it)

### For viewing on 3D devices

* SBS Stereo images can easily be viewed in 3D on VR devices, even cheap ones that use a smartphone like [Google Cardboard](https://arvr.google.com/cardboard/). To view an SBS image, you may simply display it on the phone screen and then insert the phone into the headset. A more convenient option may be to stream the picture from the computer screen to the phone using Sunshine. You may want to change resolution to match phone's aspect ratio. If you decide to buy a headset, pay attention to the lens' size - usually headsets with larger lenses work the best.

* Simple interactive depthmap viewer for Looking Glass using three. LIVE link : [https://thygate.github.io/depthmap-viewer-three-lookingglass](https://thygate.github.io/depthmap-viewer-three-lookingglass) (Instructions: Drag a combined-rgb-and-depth-horizontally image into the window to view it)

* Unity3D project to view the depthmaps on Looking Glass in realtime as images are generated. Leave a message in the discussion section if you want me to publish it too.

### Blender
* Blender depthmap import addon by [@Ladypoly](https://github.com/LadyPoly) ([comment](https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/4252#discussioncomment-4333661)).
Download the addon here : [importdepthmap_1.0.3.zip](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/10194086/importdepthmap_1.0.3.zip) (Blender 3.3.0 or newer)
Demonstration videos : (1) https://www.youtube.com/watch?v=vfu5yzs_2EU , (2) https://www.youtube.com/watch?v=AeDngG9kQNI

[![video](https://img.youtube.com/vi/vfu5yzs_2EU/1.jpg)](https://www.youtube.com/watch?v=vfu5yzs_2EU) [![video](https://img.youtube.com/vi/AeDngG9kQNI/2.jpg)](https://www.youtube.com/watch?v=AeDngG9kQNI)

* To view the 3D-inpainted mesh in blender:
* import the PLY file
* Set camera to origin (0, 0, 0) and pointing up to align it with the mesh
* adjust camera FOV to match the mesh
* Add a 'Color Attribute' Node and connect it to the shader color input

## Forks and Related
* Generate normal maps from depth maps : [stable-diffusion-webui-normalmap-script](https://github.com/graemeniedermayer/stable-diffusion-webui-normalmap-script) by [@graemeniedermayer](https://github.com/graemeniedermayer), also check his [clothseg](https://github.com/graemeniedermayer/clothseg) extension.

* Several scripts by [@Extraltodeus](https://github.com/Extraltodeus) using depth maps : https://github.com/Extraltodeus?tab=repositories

### More updates soon .. Feel free to comment and share in the discussions.

## Acknowledgements

This project uses code and information from following papers :
This project relies on code and information from following papers :

MiDaS :

Expand Down