Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
13008bab
Commit
13008bab
authored
Sep 11, 2022
by
JohannesGaessler
Committed by
AUTOMATIC1111
Sep 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed prompt_style type hints: int -> str
parent
ae6b879b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
img2img.py
modules/img2img.py
+1
-1
processing.py
modules/processing.py
+2
-2
txt2img.py
modules/txt2img.py
+1
-1
No files found.
modules/img2img.py
View file @
13008bab
...
...
@@ -11,7 +11,7 @@ from modules.ui import plaintext_to_html
import
modules.images
as
images
import
modules.scripts
def
img2img
(
prompt
:
str
,
negative_prompt
:
str
,
prompt_style
:
int
,
init_img
,
init_img_with_mask
,
init_mask
,
mask_mode
,
steps
:
int
,
sampler_index
:
int
,
mask_blur
:
int
,
inpainting_fill
:
int
,
restore_faces
:
bool
,
tiling
:
bool
,
mode
:
int
,
n_iter
:
int
,
batch_size
:
int
,
cfg_scale
:
float
,
denoising_strength
:
float
,
denoising_strength_change_factor
:
float
,
seed
:
int
,
subseed
:
int
,
subseed_strength
:
float
,
seed_resize_from_h
:
int
,
seed_resize_from_w
:
int
,
height
:
int
,
width
:
int
,
resize_mode
:
int
,
upscaler_index
:
str
,
upscale_overlap
:
int
,
inpaint_full_res
:
bool
,
inpainting_mask_invert
:
int
,
*
args
):
def
img2img
(
prompt
:
str
,
negative_prompt
:
str
,
prompt_style
:
str
,
init_img
,
init_img_with_mask
,
init_mask
,
mask_mode
,
steps
:
int
,
sampler_index
:
int
,
mask_blur
:
int
,
inpainting_fill
:
int
,
restore_faces
:
bool
,
tiling
:
bool
,
mode
:
int
,
n_iter
:
int
,
batch_size
:
int
,
cfg_scale
:
float
,
denoising_strength
:
float
,
denoising_strength_change_factor
:
float
,
seed
:
int
,
subseed
:
int
,
subseed_strength
:
float
,
seed_resize_from_h
:
int
,
seed_resize_from_w
:
int
,
height
:
int
,
width
:
int
,
resize_mode
:
int
,
upscaler_index
:
str
,
upscale_overlap
:
int
,
inpaint_full_res
:
bool
,
inpainting_mask_invert
:
int
,
*
args
):
is_inpaint
=
mode
==
1
is_loopback
=
mode
==
2
is_upscale
=
mode
==
3
...
...
modules/processing.py
View file @
13008bab
...
...
@@ -30,14 +30,14 @@ def torch_gc():
class
StableDiffusionProcessing
:
def
__init__
(
self
,
sd_model
=
None
,
outpath_samples
=
None
,
outpath_grids
=
None
,
prompt
=
""
,
prompt_style
=
0
,
seed
=-
1
,
subseed
=-
1
,
subseed_strength
=
0
,
seed_resize_from_h
=-
1
,
seed_resize_from_w
=-
1
,
sampler_index
=
0
,
batch_size
=
1
,
n_iter
=
1
,
steps
=
50
,
cfg_scale
=
7.0
,
width
=
512
,
height
=
512
,
restore_faces
=
False
,
tiling
=
False
,
do_not_save_samples
=
False
,
do_not_save_grid
=
False
,
extra_generation_params
=
None
,
overlay_images
=
None
,
negative_prompt
=
None
):
def
__init__
(
self
,
sd_model
=
None
,
outpath_samples
=
None
,
outpath_grids
=
None
,
prompt
=
""
,
prompt_style
=
"None"
,
seed
=-
1
,
subseed
=-
1
,
subseed_strength
=
0
,
seed_resize_from_h
=-
1
,
seed_resize_from_w
=-
1
,
sampler_index
=
0
,
batch_size
=
1
,
n_iter
=
1
,
steps
=
50
,
cfg_scale
=
7.0
,
width
=
512
,
height
=
512
,
restore_faces
=
False
,
tiling
=
False
,
do_not_save_samples
=
False
,
do_not_save_grid
=
False
,
extra_generation_params
=
None
,
overlay_images
=
None
,
negative_prompt
=
None
):
self
.
sd_model
=
sd_model
self
.
outpath_samples
:
str
=
outpath_samples
self
.
outpath_grids
:
str
=
outpath_grids
self
.
prompt
:
str
=
prompt
self
.
prompt_for_display
:
str
=
None
self
.
negative_prompt
:
str
=
(
negative_prompt
or
""
)
self
.
prompt_style
:
int
=
prompt_style
self
.
prompt_style
:
str
=
prompt_style
self
.
seed
:
int
=
seed
self
.
subseed
:
int
=
subseed
self
.
subseed_strength
:
float
=
subseed_strength
...
...
modules/txt2img.py
View file @
13008bab
...
...
@@ -6,7 +6,7 @@ import modules.processing as processing
from
modules.ui
import
plaintext_to_html
def
txt2img
(
prompt
:
str
,
negative_prompt
:
str
,
prompt_style
:
int
,
steps
:
int
,
sampler_index
:
int
,
restore_faces
:
bool
,
tiling
:
bool
,
n_iter
:
int
,
batch_size
:
int
,
cfg_scale
:
float
,
seed
:
int
,
subseed
:
int
,
subseed_strength
:
float
,
seed_resize_from_h
:
int
,
seed_resize_from_w
:
int
,
height
:
int
,
width
:
int
,
*
args
):
def
txt2img
(
prompt
:
str
,
negative_prompt
:
str
,
prompt_style
:
str
,
steps
:
int
,
sampler_index
:
int
,
restore_faces
:
bool
,
tiling
:
bool
,
n_iter
:
int
,
batch_size
:
int
,
cfg_scale
:
float
,
seed
:
int
,
subseed
:
int
,
subseed_strength
:
float
,
seed_resize_from_h
:
int
,
seed_resize_from_w
:
int
,
height
:
int
,
width
:
int
,
*
args
):
p
=
StableDiffusionProcessingTxt2Img
(
sd_model
=
shared
.
sd_model
,
outpath_samples
=
opts
.
outdir_samples
or
opts
.
outdir_txt2img_samples
,
...
...
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