Skip to content

Commit

Permalink
Merge pull request #23 from deep-floyd/IF-Release-1
Browse files Browse the repository at this point in the history
If release 1
  • Loading branch information
zeroshot-ai authored Apr 26, 2023
2 parents c012dc4 + 1d1b929 commit 6712073
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
39 changes: 9 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,32 +210,31 @@ if_I.show(result['II'], 1, 20)


## III. Super Resolution
For super-resolution, users can run `IF-II` and `IF-III` on an image that was not necessarely generated by IF
`96px --> 1024px` (two cascades):
For super-resolution, users can run `IF-II` and `IF-III` or 'Stable x4' on an image that was not necessarely generated by IF (two cascades):

```python
from deepfloyd_if.pipelines import super_resolution

middle_res = super_resolution(
t5,
if_III=if_II,
prompt=['face of beautiful woman, makeup, detailed picture, 4k dslr, best quality'],
prompt=['woman with a blue headscarf and a blue sweaterp, detailed picture, 4k dslr, best quality'],
support_pil_img=raw_pil_image,
img_scale=4.0,
img_size=96,
img_scale=4.,
img_size=64,
if_III_kwargs={
'sample_timestep_respacing': 'smart100',
'aug_level': 0.25,
'guidance_scale': 4.0,
'aug_level': 0.5,
'guidance_scale': 6.0,
},
)
high_res = super_resolution(
t5,
if_III=if_III,
prompt=[''],
support_pil_img=middle_res['III'][0],
img_scale=1024/384,
img_size=384,
img_scale=4.,
img_size=256,
if_III_kwargs={
"guidance_scale": 9.0,
"noise_level": 20,
Expand All @@ -245,27 +244,7 @@ high_res = super_resolution(
show_superres(raw_pil_image, high_res['III'][0])
```

`384px --> 1024px` with aspect-ratio:

```python
from deepfloyd_if.pipelines import super_resolution

_res = super_resolution(
t5,
if_III=if_III,
prompt=['cat, detailed picture, 4k dslr'],
support_pil_img=raw_pil_image,
img_scale=1024/384,
img_size=384,
if_III_kwargs={
"guidance_scale": 9.0,
"noise_level": 20,
"sample_timestep_respacing": "75",
},
)
show_superres(raw_pil_image, _res['III'][0])
```
![](./pics/super-res-1.jpg)
![](./pics/if_as_upscaler.jpg)


### IV. Zero-shot Inpainting
Expand Down
Binary file added pics/if_as_upscaler.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6712073

Please sign in to comment.