Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
H
Hydra Node Http
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
Hydra Node Http
Commits
847474c9
Commit
847474c9
authored
Aug 20, 2022
by
kurumuz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seed for stage 2
parent
bbcb482d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
hydra_node/models.py
hydra_node/models.py
+5
-1
hydra_node/sanitize.py
hydra_node/sanitize.py
+1
-0
main.py
main.py
+1
-0
No files found.
hydra_node/models.py
View file @
847474c9
...
...
@@ -180,7 +180,7 @@ class StableDiffusionModel(nn.Module):
if
request
.
seed
is
not
None
:
torch
.
manual_seed
(
request
.
seed
)
np
.
random
.
seed
(
request
.
seed
)
if
request
.
image
is
not
None
:
request
.
sampler
=
"ddim_img2img"
#enforce ddim for now
self
.
ddim
.
make_schedule
(
ddim_num_steps
=
request
.
steps
,
ddim_eta
=
request
.
ddim_eta
,
verbose
=
False
)
...
...
@@ -316,6 +316,10 @@ class StableDiffusionModel(nn.Module):
x_samples_ddim
=
torch
.
clamp
((
x_samples_ddim
+
1.0
)
/
2.0
,
min
=
0.0
,
max
=
1.0
)
.
squeeze
(
0
)
x_samples_ddim
=
pil_upscale
(
x_samples_ddim
,
scale
=
2
)
if
request
.
stage_two_seed
is
not
None
:
torch
.
manual_seed
(
request
.
stage_two_seed
)
np
.
random
.
seed
(
request
.
stage_two_seed
)
with
torch
.
autocast
(
"cuda"
,
enabled
=
self
.
config
.
amp
):
with
self
.
model
.
ema_scope
():
init_latent
=
self
.
model
.
get_first_stage_encoding
(
self
.
model
.
encode_first_stage
(
x_samples_ddim
))
...
...
hydra_node/sanitize.py
View file @
847474c9
...
...
@@ -18,6 +18,7 @@ v1pp_defaults = {
'scale'
:
7.0
,
'dynamic_threshold'
:
None
,
'seed'
:
None
,
'stage_two_seed'
:
None
,
}
v1pp_forced_defaults
=
{
...
...
main.py
View file @
847474c9
...
...
@@ -71,6 +71,7 @@ class GenerationRequest(BaseModel):
top_k
:
int
=
256
grid_size
:
int
=
4
advanced
:
bool
=
False
stage_two_seed
:
int
=
None
strength
:
float
=
0.69
noise
:
float
=
0.667
...
...
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