Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
DiffBIR_pytorch
Commits
4b209f64
Commit
4b209f64
authored
Sep 19, 2023
by
XinqiLin
Browse files
update README
parent
e9e58bef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
README.md
README.md
+4
-6
inference.py
inference.py
+3
-0
No files found.
README.md
View file @
4b209f64
...
...
@@ -160,8 +160,7 @@ python inference.py \
--reload_swinir
--swinir_ckpt
weights/general_swinir_v1.ckpt
\
--steps
50
\
--sr_scale
4
\
--image_size
512
\
--color_fix_type
wavelet
--resize_back
\
--color_fix_type
wavelet
\
--output
results/demo/general
\
--device
cuda
[
--tiled
--tile_size
512
--tile_stride
256]
```
...
...
@@ -205,8 +204,7 @@ python inference.py \
--reload_swinir
--swinir_ckpt
weights/general_swinir_v1.ckpt
\
--steps
50
\
--sr_scale
4
\
--image_size
512
\
--color_fix_type
wavelet
--resize_back
\
--color_fix_type
wavelet
\
--output
results/demo/general
\
--device
cuda
\
--use_guidance
--g_scale
400
--g_t_start
200
...
...
@@ -238,9 +236,9 @@ Since the proposed two-stage pipeline is very flexible, you can utilize other aw
python inference.py
\
--config
configs/model/cldm.yaml
\
--ckpt
[
full_ckpt_path]
\
--steps
50
--sr_scale
1
--image_size
512
\
--steps
50
--sr_scale
1
\
--input
[
img_dir_path]
\
--color_fix_type
wavelet
--resize_back
\
--color_fix_type
wavelet
\
--output
[
output_dir_path]
\
--disable_preprocess_model
\
--device
cuda
...
...
inference.py
View file @
4b209f64
...
...
@@ -62,6 +62,9 @@ def process(
control
=
model
.
preprocess_model
(
control
)
model
.
control_scales
=
[
strength
]
*
13
if
cond_fn
is
not
None
:
cond_fn
.
load_target
(
2
*
control
-
1
)
height
,
width
=
control
.
size
(
-
2
),
control
.
size
(
-
1
)
shape
=
(
n_samples
,
4
,
height
//
8
,
width
//
8
)
x_T
=
torch
.
randn
(
shape
,
device
=
model
.
device
,
dtype
=
torch
.
float32
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment