parser.add_argument("--outdir",type=str,nargs="?",help="dir to write results to",default=None)
parser.add_argument("--skip_grid",action='store_true',help="do not save a grid, only individual samples. Helpful when evaluating lots of samples",)
parser.add_argument("--skip_save",action='store_true',help="do not save indiviual samples. For speed measurements.",)
parser.add_argument("--n_rows",type=int,default=-1,help="rows in the grid; use -1 for autodetect and 0 for n_rows to be same as batch_size (default: -1)",)
parser.add_argument("--config",type=str,default="configs/stable-diffusion/v1-inference.yaml",help="path to config which constructs model",)
parser.add_argument("--ckpt",type=str,default="models/ldm/stable-diffusion-v1/model.ckpt",help="path to checkpoint of model",)
parser.add_argument("--precision",type=str,help="evaluate at this precision",choices=["full","autocast"],default="autocast")
parser.add_argument("--gfpgan-dir",type=str,help="GFPGAN directory",default=('./src/gfpgan'ifos.path.exists('./src/gfpgan')else'./GFPGAN'))# i disagree with where you're putting it but since all guidefags are doing it this way, there you go
parser.add_argument("--no-verify-input",action='store_true',help="do not verify input to check if it's too long")
parser.add_argument("--no-half",action='store_true',help="do not switch the model to 16-bit floats")
parser.add_argument("--no-progressbar-hiding",action='store_true',help="do not hide progressbar in gradio UI (we hide it because it slows down ML if you have hardware accleration in browser)")
parser.add_argument("--max-batch-count",type=int,default=16,help="maximum batch count value for the UI")
parser.add_argument("--save-format",type=str,default='png',help="file format for saved indiviual samples; can be png or jpg")
parser.add_argument("--grid-format",type=str,default='png',help="file format for saved grids; can be png or jpg")
parser.add_argument("--grid-extended-filename",action='store_true',help="save grid images to filenames with extended info: seed, prompt")
parser.add_argument("--jpeg-quality",type=int,default=80,help="quality for saved jpeg images")
parser.add_argument("--disable-pnginfo",action='store_true',help="disable saving text information about generation parameters as chunks to png files")
parser.add_argument("--embeddings-dir",type=str,default='embeddings',help="embeddings dirtectory for textual inversion (default: embeddings)")
parser.add_argument("--inversion",action='store_true',help="switch to stable inversion version; allows for uploading embeddings; this option should be used only with textual inversion repo")
opt=parser.parse_args()
GFPGAN_dir=opt.gfpgan_dir
cmd_opts=parser.parse_args()
css_hide_progressbar="""
.wrap .m-12 svg { display:none!important; }
...
...
@@ -70,6 +60,49 @@ css_hide_progressbar = """
.meta-text { display:none!important; }
"""
classOptions:
data=None
data_labels={
"outdir":("","Output dictectory; if empty, defaults to 'outputs/*'"),
"samples_save":(True,"Save indiviual samples"),
"samples_format":('png','File format for indiviual samples'),
"grid_save":(True,"Save image grids"),
"grid_format":('png','File format for grids'),
"grid_extended_filename":(False,"Add extended info (seed, prompt) to filename when saving grid"),
"n_rows":(-1,"Grid row count; use -1 for autodetect and 0 for it to be same as batch size",-1,16),
"jpeg_quality":(80,"Quality for saved jpeg images",1,100),
"verify_input":(True,"Check input, and produce warning if it's too long"),
"enable_pnginfo":(True,"Save text information about generation parameters as chunks to png files"),