Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
642faa1f
Commit
642faa1f
authored
Aug 30, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #12856 from catboxanon/extra-noise-noisy-latent
Add noisy latent to `ExtraNoiseParams` for callback
parent
a0af2852
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
modules/script_callbacks.py
modules/script_callbacks.py
+5
-2
modules/sd_samplers_kdiffusion.py
modules/sd_samplers_kdiffusion.py
+1
-1
modules/sd_samplers_timesteps.py
modules/sd_samplers_timesteps.py
+1
-1
No files found.
modules/script_callbacks.py
View file @
642faa1f
...
...
@@ -29,12 +29,15 @@ class ImageSaveParams:
class
ExtraNoiseParams
:
def
__init__
(
self
,
noise
,
x
):
def
__init__
(
self
,
noise
,
x
,
xi
):
self
.
noise
=
noise
"""Random noise generated by the seed"""
self
.
x
=
x
"""Latent image representation of the image"""
"""Latent representation of the image"""
self
.
xi
=
xi
"""Noisy latent representation of the image"""
class
CFGDenoiserParams
:
...
...
modules/sd_samplers_kdiffusion.py
View file @
642faa1f
...
...
@@ -148,7 +148,7 @@ class KDiffusionSampler(sd_samplers_common.Sampler):
if
opts
.
img2img_extra_noise
>
0
:
p
.
extra_generation_params
[
"Extra noise"
]
=
opts
.
img2img_extra_noise
extra_noise_params
=
ExtraNoiseParams
(
noise
,
x
)
extra_noise_params
=
ExtraNoiseParams
(
noise
,
x
,
xi
)
extra_noise_callback
(
extra_noise_params
)
noise
=
extra_noise_params
.
noise
xi
+=
noise
*
opts
.
img2img_extra_noise
...
...
modules/sd_samplers_timesteps.py
View file @
642faa1f
...
...
@@ -107,7 +107,7 @@ class CompVisSampler(sd_samplers_common.Sampler):
if
opts
.
img2img_extra_noise
>
0
:
p
.
extra_generation_params
[
"Extra noise"
]
=
opts
.
img2img_extra_noise
extra_noise_params
=
ExtraNoiseParams
(
noise
,
x
)
extra_noise_params
=
ExtraNoiseParams
(
noise
,
x
,
xi
)
extra_noise_callback
(
extra_noise_params
)
noise
=
extra_noise_params
.
noise
xi
+=
noise
*
opts
.
img2img_extra_noise
*
sqrt_alpha_cumprod
...
...
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