reorg cli

Signed-off-by: vladmandic <mandic00@live.com>
pull/4626/head
vladmandic 2026-02-05 10:33:42 +01:00
parent 5009b70ed8
commit 605d87cb2d
5 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ Bugfix refresh
- add metadata restore to always-on scripts
- improve wildcard weights parsing, thanks @Tillerz
- fix `anima` model detection
- reorganize `cli` scripts
## Update for 2026-02-04

View File

@ -221,7 +221,7 @@ def args(): # parse cmd arguments
global random # pylint: disable=global-statement
parser = argparse.ArgumentParser(description = 'sd pipeline')
parser.add_argument('--config', type = str, default = 'generate.json', required = False, help = 'configuration file')
parser.add_argument('--random', type = str, default = 'random.json', required = False, help = 'prompt file with randomized sections')
parser.add_argument('--random', type = str, default = 'generate-random.json', required = False, help = 'prompt file with randomized sections')
parser.add_argument('--max', type = int, default = 1, required = False, help = 'maximum number of generated images')
parser.add_argument('--prompt', type = str, default = 'dynamic', required = False, help = 'prompt')
parser.add_argument('--negative', type = str, default = 'dynamic', required = False, help = 'negative prompt')

View File

@ -12,7 +12,7 @@ from scipy.stats import beta
import util
import sdapi
import options
import process_options as options
face_model = None
body_model = None
@ -42,7 +42,7 @@ def detect_blur(image: Image):
cx, cy = image.size[0] // 2, image.size[1] // 2
fft = np.fft.fft2(bw)
fftShift = np.fft.fftshift(fft)
fftShift[cy - options.process.blur_samplesize: cy + options.process.blur_samplesize, cx - options.process.blur_samplesize: cx + options.process.blur_samplesize] = 0
fftShift[cy - options.process.blur_samplesize: cy + options.process.blur_samplesize, cx - options.process.blur_samplesize: cx + options.process.blur_samplesize] = 0 # pylint: disable=unsupported-assignment-operation
fftShift = np.fft.ifftshift(fftShift)
recon = np.fft.ifft2(fftShift)
magnitude = np.log(np.abs(recon))