Skip to content

Commit 7618712

Browse files
committed
Fix ruff violations: remove conflicting dataclass fields, fix imports, whitespace, and outpainting closure
1 parent f0a1c99 commit 7618712

5 files changed

Lines changed: 2 additions & 5 deletions

File tree

modules/processing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def txt2img_image_conditioning(sd_model, x, width, height):
135135

136136
@dataclass(repr=False)
137137
class StableDiffusionProcessing:
138-
sd_model: object = None
139138
outpath_samples: str = None
140139
outpath_grids: str = None
141140
prompt: str = ""
@@ -1562,7 +1561,6 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
15621561
mask: Any = None
15631562
mask_blur_x: int = 4
15641563
mask_blur_y: int = 4
1565-
mask_blur: int = None
15661564
mask_round: bool = True
15671565
inpainting_fill: int = 0
15681566
inpaint_full_res: bool = True

scripts/img2imgalt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from collections import namedtuple
2-
from typing import Optional
32

43
import numpy as np
54
from tqdm import trange

scripts/outpainting_mk_2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def run(self, p, _, pixels, mask_blur, direction, noise_q, color_variation):
186186
down = target_h - init_img.height - up
187187

188188
def expand(init, count, expand_pixels, is_left=False, is_right=False, is_top=False, is_bottom=False):
189+
nonlocal initial_seed, initial_info
189190
is_horiz = is_left or is_right
190191
is_vert = is_top or is_bottom
191192
pixels_horiz = expand_pixels if is_horiz else 0

scripts/postprocessing_gfpgan.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ def process(self, pp: scripts_postprocessing.PostprocessedImage, enable, gfpgan_
3030

3131
pp.image = res
3232
pp.info["GFPGAN visibility"] = round(gfpgan_visibility, 3)
33-

scripts/prompt_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import math
22

3-
import scripts as modules
3+
import scripts as modules
44
import gradio as gr
55

66
from modules import images

0 commit comments

Comments
 (0)