Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
a14d774b
Commit
a14d774b
authored
Jun 10, 2022
by
Patrick von Platen
Browse files
fix readme again
parent
d90a7367
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
README.md
README.md
+3
-3
No files found.
README.md
View file @
a14d774b
...
...
@@ -23,7 +23,7 @@
```
git clone https://github.com/huggingface/diffusers.git
cd diffusers && pip install -e .
``
``
`
### 1. `diffusers` as a central modular diffusion and sampler library
...
...
@@ -55,7 +55,7 @@ num_prediction_steps = len(noise_scheduler)
for
t
in
tqdm
.
tqdm
(
reversed
(
range
(
num_prediction_steps
)),
total
=
num_prediction_steps
):
# predict noise residual
with
torch
.
no_grad
():
residual =
self.
unet(image, t)
residual
=
unet
(
image
,
t
)
# predict previous mean of image x_t-1
pred_prev_image
=
noise_scheduler
.
compute_prev_image_step
(
residual
,
image
,
t
)
...
...
@@ -105,7 +105,7 @@ eta = 0.0 # <- deterministic sampling
for
t
in
tqdm
.
tqdm
(
reversed
(
range
(
num_inference_steps
)),
total
=
num_inference_steps
):
# 1. predict noise residual
with
torch
.
no_grad
():
residual =
self.
unet(image, inference_step_times[t])
residual
=
unet
(
image
,
inference_step_times
[
t
])
# 2. predict previous mean of image x_t-1
pred_prev_image
=
noise_scheduler
.
compute_prev_image_step
(
residual
,
image
,
t
,
num_inference_steps
,
eta
)
...
...
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