Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,11 @@ def weighted_histogram_filter_single(idx):
return np.sum(values * overlap) / np.sum(overlap) if np.sum(overlap) > 0 else 0

# Split pixel_coords into equal chunks based on n_jobs
n_jobs = -1
n_jobs = 1
if cpu_count() > 6:
n_jobs = 6 # More than 6 isn't worth unless it's more than 3000x3000px

else:
n_jobs = cpu_count() # Assign all cores if there are less than 7
chunk_size = len(pixel_coords) // n_jobs
pixel_chunks = [pixel_coords[i:i + chunk_size] for i in range(0, len(pixel_coords), chunk_size)]

Expand Down Expand Up @@ -530,7 +531,7 @@ def gaussian_kernel_func(coordinate):

class Script(scripts.Script):
def __init__(self):
self.section = "inpaint"
# self.section = "inpaint"
self.masks_for_overlay = None
self.overlay_images = None

Expand Down
1 change: 1 addition & 0 deletions requirements_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ tqdm==4.66.1
peft==0.13.2
pydantic==2.8.2
huggingface-hub==0.26.2
joblib==1.5.1