# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file
name:Run Linting/Formatting on Pull Requests
on:
- push
- pull_request
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs
# if you want to filter out branches, delete the `- pull_request` and uncomment these lines :
# pull_request:
# branches:
# - master
# branches-ignore:
# - development
jobs:
lint:
runs-on:ubuntu-latest
steps:
- name:Checkout Code
uses:actions/checkout@v3
- name:Set up Python 3.10
uses:actions/setup-python@v3
with:
python-version:3.10.6
- name:Install PyLint
run:|
python -m pip install --upgrade pip
pip install pylint
# This lets PyLint check to see if it can resolve imports
"\u2199\ufe0f":"Read generation parameters from prompt or last generation if prompt is empty into user interface.",
"\u{1f4c2}":"Open images output directory",
"\u{1f4be}":"Save style",
"\u{1f4cb}":"Apply selected styles to current prompt",
"Inpaint a part of image":"Draw a mask over an image, and the script will regenerate the masked area with content according to prompt",
"SD upscale":"Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back",
@ -87,8 +89,8 @@ titles = {
"Quicksettings list":"List of setting names, separated by commas, for settings that should go to the quick access bar at the top, rather than the usual setting tab. See modules/shared.py for setting names. Requires restarting to apply.",
"Weighted Sum":"Result = A * (1 - M) + B * M",
"Add difference":"Result = A + (B - C) * (1 - M)",
run(f'"{git}" -C {dir} fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
run(f'"{git}" -C {dir} checkout {commithash}',f"Checking out commint for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}")
run(f'"{git}" -C {dir} checkout {commithash}',f"Checking out commit for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}""{dir}"',f"Cloning {name} into {dir}...",f"Couldn't clone {name}")
theta_0[key]=theta_func(theta_0[key],theta_1[key],theta_2[key]iftheta_2elseNone,(float(1.0)-interp_amount))# Need to reverse the interp_amount to match the desired mix ration in the merged checkpoint
parser.add_argument("--allow-code",action='store_true',help="allow custom script execution from webui")
parser.add_argument("--medvram",action='store_true',help="enable stable diffusion model optimizations for sacrificing a little speed for low VRM usage")
parser.add_argument("--lowvram",action='store_true',help="enable stable diffusion model optimizations for sacrificing a lot of speed for very low VRM usage")
parser.add_argument("--lowram",action='store_true',help="load stable diffusion checkpoint weights to VRAM instead of RAM")
parser.add_argument("--always-batch-cond-uncond",action='store_true',help="disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram")
parser.add_argument("--unload-gfpgan",action='store_true',help="does not do anything.")
parser.add_argument("--precision",type=str,help="evaluate at this precision",choices=["full","autocast"],default="autocast")
parser.add_argument("--opt-split-attention-invokeai",action='store_true',help="force-enables InvokeAI's cross-attention layer optimization. By default, it's on when cuda is unavailable.")
parser.add_argument("--opt-split-attention-v1",action='store_true',help="enable older version of split attention optimization that does not consume all the VRAM it can find")
parser.add_argument("--use-cpu",nargs='+',choices=['SD','GFPGAN','BSRGAN','ESRGAN','SCUNet','CodeFormer'],help="use CPU as torch device for specified modules",default=[])
parser.add_argument("--use-cpu",nargs='+',choices=['all','sd','interrogate','gfpgan','bsrgan','esrgan','scunet','codeformer'],help="use CPU as torch device for specified modules",default=[],type=str.lower)
parser.add_argument("--listen",action='store_true',help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests")
parser.add_argument("--port",type=int,help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available",default=None)
parser.add_argument("--show-negative-prompt",action='store_true',help="does not do anything",default=False)
"training_image_repeats_per_epoch":OptionInfo(100,"Number of repeats for a single input image per epoch; used only for displaying epoch number",gr.Number,{"precision":0}),
"training_image_repeats_per_epoch":OptionInfo(1,"Number of repeats for a single input image per epoch; used only for displaying epoch number",gr.Number,{"precision":0}),
"training_write_csv_every":OptionInfo(500,"Save an csv containing the loss to log directory every N steps, 0 to disable"),
'CLIP_stop_at_last_layers':OptionInfo(1,"Stop At last layers of CLIP model",gr.Slider,{"minimum":1,"maximum":12,"step":1}),
"random_artist_categories":OptionInfo([],"Allowed categories for random artists selection when using the Roll button",gr.CheckboxGroup,{"choices":artist_db.categories()}),
init_img=gr.Image(label="Image for img2img",elem_id="img2img_image",show_label=False,source="upload",interactive=True,type="pil",tool=cmd_opts.gradio_img2img_tool)
init_img=gr.Image(label="Image for img2img",elem_id="img2img_image",show_label=False,source="upload",interactive=True,type="pil",tool=cmd_opts.gradio_img2img_tool).style(height=480)
withgr.TabItem('Inpaint',id='inpaint'):
init_img_with_mask=gr.Image(label="Image for inpainting with mask",show_label=False,elem_id="img2maskimg",source="upload",interactive=True,type="pil",tool="sketch",image_mode="RGBA")
init_img_with_mask=gr.Image(label="Image for inpainting with mask",show_label=False,elem_id="img2maskimg",source="upload",interactive=True,type="pil",tool="sketch",image_mode="RGBA").style(height=480)
init_img_inpaint=gr.Image(label="Image for img2img",show_label=False,source="upload",interactive=True,type="pil",visible=False,elem_id="img_inpaint_base")
AxisOptionImg2Img("Denoising",float,apply_field("denoising_strength"),format_value_add_label,None),# as it is now all AxisOptionImg2Img items must go after AxisOption ones