mirror of https://github.com/vladmandic/automatic
parent
a5b77b8ee2
commit
8c676d0a61
|
|
@ -19,7 +19,7 @@ ci:
|
|||
repos:
|
||||
# Standard hooks
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
|
|
@ -27,7 +27,6 @@ repos:
|
|||
- id: check-symlinks
|
||||
- id: check-yaml
|
||||
args: ["--allow-multiple-documents"]
|
||||
- id: debug-statements
|
||||
- id: end-of-file-fixer
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
|
|
@ -36,31 +35,3 @@ repos:
|
|||
.*\.md|
|
||||
.github/ISSUE_TEMPLATE/.*\.yml
|
||||
)$
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: 'v0.0.285'
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: pylint
|
||||
language: system
|
||||
types: [python]
|
||||
args: []
|
||||
|
||||
# Black, the code formatter, natively supports pre-commit
|
||||
# - repo: https://github.com/psf/black
|
||||
# rev: 23.7.0
|
||||
# hooks:
|
||||
# - id: black
|
||||
# exclude: ^(docs)
|
||||
|
||||
# Changes tabs to spaces
|
||||
# - repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
# rev: v1.5.3
|
||||
# hooks:
|
||||
# - id: remove-tabs
|
||||
# exclude: ^(docs)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
- major refactoring of requirements and dependencies to unblock `numpy>=2.1.0`
|
||||
- patch `insightface`
|
||||
- stronger lint rules
|
||||
add separate `npm run lint`, `npm run todo`, `npm run test` macros
|
||||
add separate `npm run lint`, `npm run todo`, `npm run test`, `npm run format` macros
|
||||
|
||||
## Update for 2025-06-30
|
||||
|
||||
|
|
|
|||
|
|
@ -234,4 +234,3 @@ def resnext101_32x8d(pretrained=True, **kwargs):
|
|||
|
||||
model = ResNet(Bottleneck, [3, 4, 23, 3], **kwargs)
|
||||
return model
|
||||
|
||||
|
|
|
|||
|
|
@ -416,4 +416,3 @@ if __name__ == '__main__':
|
|||
inputs = torch.ones(4,3,128,128)
|
||||
out = net(inputs)
|
||||
print(out.size())
|
||||
|
||||
|
|
|
|||
|
|
@ -165,4 +165,3 @@ class MiDaSInference(nn.Module):
|
|||
def forward(self, x):
|
||||
prediction = self.model(x)
|
||||
return prediction
|
||||
|
||||
|
|
|
|||
|
|
@ -339,4 +339,3 @@ class FeatureFusionBlock_custom(nn.Module):
|
|||
output = self.out_conv(output)
|
||||
|
||||
return output
|
||||
|
||||
|
|
|
|||
|
|
@ -106,4 +106,3 @@ class DPTDepthModel(DPT):
|
|||
|
||||
def forward(self, x):
|
||||
return super().forward(x).squeeze(dim=1)
|
||||
|
||||
|
|
|
|||
|
|
@ -199,4 +199,3 @@ class Decoder(nn.Module):
|
|||
return [out_res8, out_res4, out_res2, out_res1], \
|
||||
[out_res8, samples_pred_res4, samples_pred_res2, samples_pred_res1], \
|
||||
[None, point_coords_res4, point_coords_res2, point_coords_res1]
|
||||
|
||||
|
|
|
|||
|
|
@ -319,5 +319,3 @@ export now requires additional args mentioned in the export script (not needed i
|
|||
2. TF ported models with 'SAME' padding will have the padding fixed at export time to the resolution used for export. Even though dynamic padding is supported in opset >= 11, I can't get it working.
|
||||
3. ONNX optimize facility doesn't work reliably in PyTorch 1.6 / ONNX 1.7. Fortunately, the onnxruntime based inference is working very well now and includes on the fly optimization.
|
||||
3. ONNX / Caffe2 export/import frequently breaks with different PyTorch and ONNX version releases. Please check their respective issue trackers before filing issues here.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -133,5 +133,3 @@ def get_act_layer(name='relu'):
|
|||
if use_jit and name in _ACT_FN_JIT: # jit scripted models should be okay for export/scripting
|
||||
return _ACT_LAYER_JIT[name]
|
||||
return _ACT_LAYER_DEFAULT[name]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -98,5 +98,3 @@ class HardSigmoid(nn.Module):
|
|||
|
||||
def forward(self, x):
|
||||
return hard_sigmoid(x, self.inplace)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,4 +49,3 @@ def get_outdir(path, *paths, inc=False):
|
|||
outdir = outdir_inc
|
||||
os.makedirs(outdir)
|
||||
return outdir
|
||||
|
||||
|
|
|
|||
|
|
@ -155,5 +155,3 @@ def _build_sam(
|
|||
state_dict = torch.load(f)
|
||||
sam.load_state_dict(state_dict)
|
||||
return sam
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@
|
|||
# SOFTWARE.
|
||||
|
||||
# File author: Shariq Farooq Bhat
|
||||
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@
|
|||
# SOFTWARE.
|
||||
|
||||
# File author: Shariq Farooq Bhat
|
||||
|
||||
|
|
|
|||
|
|
@ -438,4 +438,3 @@ class FeatureFusionBlock_custom(nn.Module):
|
|||
output = self.out_conv(output)
|
||||
|
||||
return output
|
||||
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@
|
|||
# SOFTWARE.
|
||||
|
||||
# File author: Shariq Farooq Bhat
|
||||
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ options_templates.update(options_section(('saving-paths', "Image Paths"), {
|
|||
"outdir_extras_samples": OptionInfo("outputs/extras", 'Folder for processed images', component_args=hide_dirs, folder=True),
|
||||
"outdir_save": OptionInfo("outputs/save", "Folder for manually saved images", component_args=hide_dirs, folder=True),
|
||||
"outdir_video": OptionInfo("outputs/video", "Folder for videos", component_args=hide_dirs, folder=True),
|
||||
"outdir_init_images": OptionInfo("outputs/init-images", "Folder for init images", component_args=hide_dirs, folder=True),
|
||||
"outdir_init_images": OptionInfo("outputs/inputs", "Folder for init images", component_args=hide_dirs, folder=True),
|
||||
|
||||
"outdir_sep_grids": OptionInfo("<h2>Grids</h2>", "", gr.HTML),
|
||||
"outdir_grids": OptionInfo("", "Grids folder", component_args=hide_dirs, folder=True),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
"eslint": "eslint javascript/ extensions-builtin/sdnext-modernui/javascript/",
|
||||
"ruff": ". venv/bin/activate && ruff check",
|
||||
"pylint": ". venv/bin/activate && pylint *.py modules/ pipelines/ scripts/ extensions-builtin/ | grep -v '^*'",
|
||||
"lint": "npm run eslint && npm run ruff && npm run pylint | grep -v TODO",
|
||||
"format": ". venv/bin/activate && pre-commit run -a",
|
||||
"lint": "npm run eslint && npm run format && npm run ruff && npm run pylint | grep -v TODO",
|
||||
"todo": "npm run pylint | grep W0511 | awk -F'TODO ' '{print \"- \"$NF}' | sed 's/ (fixme)//g' | sort",
|
||||
"test": ". venv/bin/activate; python launch.py --debug --test"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -168,4 +168,3 @@ def crop_border(imgs, crop_border):
|
|||
return [v[crop_border:-crop_border, crop_border:-crop_border, ...] for v in imgs]
|
||||
else:
|
||||
return imgs[crop_border:-crop_border, crop_border:-crop_border, ...]
|
||||
|
||||
|
|
@ -26,8 +26,6 @@ voluptuous
|
|||
yapf
|
||||
fasteners
|
||||
orjson
|
||||
ruff
|
||||
pylint
|
||||
sqlalchemy
|
||||
invisible-watermark
|
||||
pi-heif
|
||||
|
|
@ -70,6 +68,11 @@ scikit-image
|
|||
seam-carving
|
||||
sentencepiece
|
||||
|
||||
# lint
|
||||
ruff
|
||||
pylint
|
||||
pre-commit
|
||||
|
||||
# block
|
||||
torch!=2.5.0
|
||||
torchvision!=0.20.0
|
||||
|
|
|
|||
|
|
@ -1824,4 +1824,3 @@ class StableDiffusionXLAdapterControlnetPipeline(DiffusionPipeline, FromSingleFi
|
|||
init_latents = self.scheduler.add_noise(init_latents, noise, timestep)
|
||||
|
||||
return init_latents
|
||||
|
||||
|
|
|
|||
|
|
@ -1910,4 +1910,3 @@ class StableDiffusionXLAdapterControlnetI2IPipeline(DiffusionPipeline, FromSingl
|
|||
# image.save(f'./test_img/noisy_image_sd1_5_{int(timestep)}.jpg')
|
||||
|
||||
return init_latents
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue