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
425507bd
Commit
425507bd
authored
Jan 07, 2024
by
continue-revolution
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add p to cfgdenoiserparams
parent
2f98a35f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
modules/script_callbacks.py
modules/script_callbacks.py
+4
-1
modules/sd_samplers_cfg_denoiser.py
modules/sd_samplers_cfg_denoiser.py
+1
-1
No files found.
modules/script_callbacks.py
View file @
425507bd
...
...
@@ -41,7 +41,7 @@ class ExtraNoiseParams:
class
CFGDenoiserParams
:
def
__init__
(
self
,
x
,
image_cond
,
sigma
,
sampling_step
,
total_sampling_steps
,
text_cond
,
text_uncond
):
def
__init__
(
self
,
x
,
image_cond
,
sigma
,
sampling_step
,
total_sampling_steps
,
text_cond
,
text_uncond
,
p
):
self
.
x
=
x
"""Latent image representation in the process of being denoised"""
...
...
@@ -63,6 +63,9 @@ class CFGDenoiserParams:
self
.
text_uncond
=
text_uncond
""" Encoder hidden states of text conditioning from negative prompt"""
self
.
p
=
p
"""StableDiffusionProcessing object with processing parameters"""
class
CFGDenoisedParams
:
def
__init__
(
self
,
x
,
sampling_step
,
total_sampling_steps
,
inner_model
):
...
...
modules/sd_samplers_cfg_denoiser.py
View file @
425507bd
...
...
@@ -146,7 +146,7 @@ class CFGDenoiser(torch.nn.Module):
sigma_in
=
torch
.
cat
([
torch
.
stack
([
sigma
[
i
]
for
_
in
range
(
n
)])
for
i
,
n
in
enumerate
(
repeats
)]
+
[
sigma
]
+
[
sigma
])
image_cond_in
=
torch
.
cat
([
torch
.
stack
([
image_cond
[
i
]
for
_
in
range
(
n
)])
for
i
,
n
in
enumerate
(
repeats
)]
+
[
image_uncond
]
+
[
torch
.
zeros_like
(
self
.
init_latent
)])
denoiser_params
=
CFGDenoiserParams
(
x_in
,
image_cond_in
,
sigma_in
,
state
.
sampling_step
,
state
.
sampling_steps
,
tensor
,
uncond
)
denoiser_params
=
CFGDenoiserParams
(
x_in
,
image_cond_in
,
sigma_in
,
state
.
sampling_step
,
state
.
sampling_steps
,
tensor
,
uncond
,
self
.
p
)
cfg_denoiser_callback
(
denoiser_params
)
x_in
=
denoiser_params
.
x
image_cond_in
=
denoiser_params
.
image_cond
...
...
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