Skip to content

Commit

Permalink
Merge branch 'dev-1.x' into fix-rand_degradation
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Fran authored Jan 9, 2023
2 parents 943c5e1 + 6de38d0 commit 8345855
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ workflows:
name: minimum_version_cpu
torch: 1.6.0
torchvision: 0.7.0
python: 3.6.9 # The lowest python 3.6.x version available on CircleCI images
python: 3.7.4
requires:
- lint
- build_cpu:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge_stage_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.6, 3.8, 3.9]
python-version: [3.8, 3.9]
torch: [1.8.1]
include:
- torch: 1.8.1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ mmedit/.mim
demo/*.png
*.csv
out/*.png
resources/

# Pytorch
*.pth
Expand Down
29 changes: 25 additions & 4 deletions configs/stable_diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,34 @@

<!-- [ABSTRACT] -->

Stable Diffusion is a latent diffusion model conditioned on the text embeddings of a CLIP text encoder, which allows you to create images from text inputs.
Stable Diffusion is a latent diffusion model conditioned on the text embeddings of a CLIP text encoder, which allows you to create images from text inputs. This model builds upon the CVPR'22 work [High-Resolution Image Synthesis with Latent Diffusion Models](https://ommer-lab.com/research/latent-diffusion-models/). The official code was released at [stable-diffusion](https://github.com/CompVis/stable-diffusion) and also implemented at [diffusers](https://github.com/huggingface/diffusers). We support this algorithm here to facilitate the community to learn together and compare it with other text2image methods.

<!-- [IMAGE] -->

<div align=center >
<img src="https://user-images.githubusercontent.com/12782558/209609229-8221c7cc-d5c9-44d5-a1af-c254b5a95fae.png" width="400"/>
</div >
<table align="center">
<thead>
<tr>
<td>
<div align="center">
<img src="https://user-images.githubusercontent.com/12782558/209609229-8221c7cc-d5c9-44d5-a1af-c254b5a95fae.png" width="400"/>
<br/>
<b>A mecha robot in a favela in expressionist style</b>
</div></td>
<td>
<div align="center">
<img src="https://user-images.githubusercontent.com/12782558/210951970-a81e80c3-822e-4782-901e-db52e34b85a3.png" width="400"/>
<br/>
<b>A Chinese palace is beside a beautiful lake</b>
</div></td>
<td>
<div align="center">
<img src="https://user-images.githubusercontent.com/12782558/210952108-df82e5ad-6eb6-4948-8d22-3802299d1131.png" width="400"/>
<br/>
<b>A panda is having dinner in KFC</b>
</div></td>
</tr>
</thead>
</table>

## Pretrained models

Expand Down
8 changes: 4 additions & 4 deletions mmedit/datasets/transforms/aug_pixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class BinarizeImage(BaseTransform):
Args:
keys (Sequence[str]): The images to be binarized.
binary_thr (float): Threshold for binarization.
amin (int): Lower limits of pixel value.
amx (int): Upper limits of pixel value.
a_min (int): Lower limits of pixel value.
a_max (int): Upper limits of pixel value.
dtype (np.dtype): Set the data type of the output. Default: np.uint8
"""

Expand Down Expand Up @@ -86,8 +86,8 @@ class Clip(BaseTransform):
Args:
keys (list[str]): The keys whose values are clipped.
amin (int): Lower limits of pixel value.
amx (int): Upper limits of pixel value.
a_min (int): Lower limits of pixel value.
a_max (int): Upper limits of pixel value.
"""

def __init__(self, keys, a_min=0, a_max=255):
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def add_mim_extention():
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand Down

0 comments on commit 8345855

Please sign in to comment.