a
    Aþdè’  ã                )   @   s”  d dl Zd dlmZmZmZmZmZmZ d dl	m
Z
mZmZmZmZmZmZmZmZ d dlmZ d dlmZmZmZ i ZejZh d£Ze ededd	ƒed
dƒedded dd¡eddededdƒed
dƒeddƒeddƒeddƒedded dd¡eddejddddœƒeddƒedd eji ƒed!d"eji ƒed#d$eji ƒedd%ƒedd&ƒedd'ƒedd(ƒedd)ƒedd*ƒedd+ƒed,d-ejdd.ddœƒedd/ƒedd0ƒ  d1¡ed2d3ej!ƒed4d5ej!ƒed6d7ej!ƒ  d8¡edd9ƒedd:ƒedd;ƒedd<ƒedd=ƒedd>ƒedd?ƒ  d@¡dAœ#ƒ¡ e edBeddCededDdEededFdGededHdIededdJededKdLededMdNededOdPededQdReddSœ	ƒ¡ e edTeddUƒeddVƒeddWƒedXdYed dd¡edZd[ejdd\ddœe¥ƒd]œƒ¡ e ed^ed_d`ejd daddœƒ  db¡edZdcejd ddddœƒ  de¡edfdggdhej"didj„ ƒeddkej#dldj„ ƒdmœƒ¡ e edneddodpdq  dr¡edsdtej$dudj„ ƒedvdwejd ddxdœƒ  dy¡eddzƒd{œƒ¡ e ed|ed}d~ej$ddj„ ƒedd€ƒ %¡ eddƒ %¡ edZd‚ejd dƒddœƒ  d„¡edd…ƒedd†ƒedd‡ƒeddˆƒ  d‰¡eddŠƒ  d‹¡eddŒƒdœ
ƒ¡ e edŽeddddedd‘ddedd’ddd“œƒ¡ e ed”edd•ƒedd–ƒedd—ƒedd˜ƒedd™ƒedšd›ƒeddœej!dd iƒedždŸƒedd ƒedd¡ƒedd¢ƒed£d¤ƒd¥œƒ¡ e ed¦edd§ej#d¨dj„ ej&d©dªedd«ejdd¬ddœƒedd­ƒ  d®¡ed d¯ejd d¬ddœƒ  d°¡ed±d²ej#d³dj„ ej'd´  dµ¡edd¶ƒ %¡ edd·ƒ  d¸¡edd¹ƒed\dºejd d»ddœƒ  d¼¡edd½ejdd¾ddœd½dq dd¿¡  dÀ¡eddÁƒedÂdÃej$dÄg dÅ¢idÆdq  dÇ¡eddÈdÈdq  dÉ¡edÊdËej$dÄg dÌ¢idÍdqdÎœƒ¡ e edÏed dÐƒed dÑƒedÒdÓej!ƒ  dÔ¡edÕdÖej!ƒ  d×¡dØœƒ¡ e edÙedÚƒed dÛejd d¬ddœƒed±dÜej#dÝdj„ ej(dÞdª  dß¡eddàƒ  dá¡eddâƒ  dã¡edädåej$dÄdädægidçdq  dè¡edädéej$dÄdädægidêdq  dë¡dìœƒ¡ e edíedîdïejdðdîdxdœdñdqedîdòejdðdódôdœdõdqedðdöejdðdîdxdœd÷dq  dø¡eddùƒeddúƒ  dû¡ed#düeji ƒedýdþejd,dÿddœƒ  d ¡ %¡ ed#deji ƒ  d¡ %¡ ed#deji ƒ  d¡ %¡ ed#deji ƒ  d¡ %¡ eddƒeddƒd	œƒ¡ e ed
ed±dej#ddj„ ƒedðdejdðddxdœƒ dd¡  d¡edðdejdðdddœddq dd¡  d¡edðdejdðdddœƒ  d¡edðdejdðdddœddq  d¡eddddq  d¡eddƒ  d¡edd ƒ  d!¡d"œƒ¡ e ed#edd$ƒedd%ƒedd&ƒedd'ƒedd(ƒedd)ƒedd*d+dq  d,¡d-œƒ¡ e ed.edd/ƒedd0ƒ  d1¡edd2ejddddœƒed3d4ejdd5ddœƒeddd6ejdd7ddœƒed8d9ƒ  d:¡eg d;ej"d<dj„ ej)d´edvd=ejd ddxdœƒedd>ƒ  d?¡edd@ƒ  dA¡eddBƒ  dC¡eddDƒ  dE¡dFœƒ¡ e edGeddHƒ  dI¡edJdKej$dÄg dL¢iƒ  dM¡edîdNejdðdOdxdœƒed dPƒ  d ¡ed dQƒ  d ¡edîdRejdðdOdxdœƒ  dS¡eddTƒedšdUƒ  dV¡eddWƒ %¡ eddXƒeddYƒedZd[ej#d\dj„ ej*d´d]œƒ¡ e ed^edZd_ej#d`dj„ dadj„ d´ %¡ edbdcej+dddj„ ƒ  de¡ %¡ eddfƒ  dg¡eddhej,ƒ  di¡ %¡ eddjƒeddkƒeddlƒeddmƒeddnƒeddoƒeddpƒedqdrƒeddsƒeddtƒ %¡ edduƒ %¡ eddvejdxdwdôdœƒedxdyejdxdwdôdœƒedzd{ƒedd|ƒed}gd~ej-ddj„ ƒ .d€d¡  d‚¡ %¡ eg dƒej-d„dj„ ƒ %¡ eg d…ej-d†dj„ ƒ %¡ eg d‡ej-dˆdj„ ƒ  d‰¡ %¡ eddŠƒ %¡ edd‹ƒ %¡ eddŒƒ %¡ dœƒ¡ e edŽeddƒeddƒedd‘ƒedd’ƒedd“ƒ  d”¡ed•d–ej$dÄg d—¢iƒ  d˜¡ /d™¡dšœƒ¡ e ed›eddœƒeddƒed
džej$dÄg dŸ¢iƒedd ƒed¬d¡ejdd¢ddœƒ  d£¡ed¤d¥ej$dÄg d¦¢iƒ  d§¡edd¨ƒ  d©¡edªd«ej$dÄg d¬¢iƒed­d®ƒ  d¯¡edd°ƒ  d±¡d²œ
ƒ¡ e ed³eg d´ej"dµdj„ ƒ %¡ edðd¶ejdðdîdxdœd·dq  d¸¡edîd¹ejdðdîdxdœdºdq  d»¡ed¼d½ej$dÄd¼d¾giƒedðd¿ejdðdÀdxdœdÁdq  dÂ¡edðdÃejdðdÄdxdœdÅdq  dÆ¡edðdÇejdðdÈdxdœdÉdq  dÊ¡edîdËejdðdÌdôdœdÍdq  dÎ¡ed±dÏej#dÄg dÐ¢idÑdq  dÒ¡edðdÓej!dÔdq  dÕ¡edðdÖej!d×dq  dØ¡edðdÙej!dÚdq  dÛ¡ed dÜej!dd idÝdq  dÞ¡eddßdàdq ddá¡eddâdãdq ddä¡  då¡edædçej$dÄg dè¢idçdqedédêej$dÄg dë¢idêdqedìdíejddîddœdídq  dï¡eddðdðdqdñœƒ¡ e edòeg dóej-dôdj„ ƒeg dõej-dödj„ ƒed÷døejd d¬ddœƒdùœƒ¡ e edúeg dûƒedüdýej$dÄg dþ¢iƒeddÿƒedd ƒdœƒ¡ dS (  é    N)ÚlocalizationÚui_componentsÚshared_itemsÚsharedÚinterrogateÚshared_gradio_themes)	Úmodels_pathÚscript_pathÚ	data_pathÚsd_configs_pathÚsd_default_configÚsd_model_fileÚdefault_sd_model_fileÚextensions_dirÚextensions_builtin_dir)Úcmd_opts)Úoptions_sectionÚ
OptionInfoÚ
OptionHTML>
   Úoutdir_samplesÚoutdir_gridsÚoutdir_saveÚoutdir_extras_samplesÚoutdir_txt2img_samplesÚoutdir_img2img_samplesÚoutdir_init_imagesÚsamples_filename_patternÚdirectories_filename_patternÚoutdir_txt2img_grids)zsaving-imageszSaving images/gridsTz Always save all generated imagesÚpngzFile format for imagesÚ zImages filename pattern)Úcomponent_argsZwikizihttps://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Images-Filename-Name-and-Subdirectoryz"Add number to filename when savingz%Always save all generated image gridszFile format for gridsFz=Add extended info (seed, prompt) to filename when saving gridz+Do not save grids consisting of one picturez4Prevent empty spots in grid (when set to autodetect)zArchive filename patternéÿÿÿÿzKGrid row count; use -1 for autodetect and 0 for it to be same as batch sizeé   é   )ÚminimumÚmaximumÚstepz#Font for image grids that have textz#000000zText color for image gridsz#999999z#Inactive text color for image gridsz#ffffffz Background color for image gridszHSave text information about generation parameters as chunks to png fileszBCreate a text file next to every image with generation parameters.z3Save a copy of image before doing face restoration.z1Save a copy of image before applying highres fix.zHSave a copy of image before applying color correction to img2img resultsz1For inpainting, save a copy of the greyscale maskz'For inpainting, save a masked compositeéP   zQuality for saved jpeg imageséd   z(Use lossless compression for webp imagesz Save copy of large images as JPGzRif the file size is above the limit, or either width or height are above the limitg      @z(File size limit for the above option, MBi   z2Width/height limit for the above option, in pixelséÈ   zMaximum image sizezin megapixelszHUse original name for output filename during batch process in extras tabz6Use upscaler name as filename suffix in the extras tabz;When using 'Save' button, only save a single selected imagez#Save init images when using img2imgz7Directory for temporary images; leave empty for defaultz;Cleanup non-default temporary directory when starting webuizSave incomplete imagesztsave images that has been interrupted in mid-generation; even if not saved, they will still show up in webui output.)#Zsamples_saveZsamples_formatr   Zsave_images_add_numberZ	grid_saveZgrid_formatZgrid_extended_filenameZgrid_only_if_multipleZgrid_prevent_empty_spotsZgrid_zip_filename_patternÚn_rowsÚfontZgrid_text_active_colorZgrid_text_inactive_colorZgrid_background_colorZenable_pnginfoZsave_txtZ#save_images_before_face_restorationZsave_images_before_highres_fixZ#save_images_before_color_correctionZ	save_maskZsave_mask_compositeZjpeg_qualityZwebp_losslessZexport_for_4chanZimg_downscale_thresholdZtarget_side_lengthZimg_max_size_mpZuse_original_name_batchZuse_upscaler_name_as_suffixZsave_selected_onlyZsave_init_imgÚtemp_dirÚclean_temp_dir_at_startZsave_incomplete_images)zsaving-pathszPaths for savingzJOutput directory for images; if empty, defaults to three directories belowzoutputs/txt2img-imagesz#Output directory for txt2img imageszoutputs/img2img-imagesz#Output directory for img2img imageszoutputs/extras-imagesz+Output directory for images from extras tabzGOutput directory for grids; if empty, defaults to two directories belowzoutputs/txt2img-gridsz"Output directory for txt2img gridszoutputs/img2img-gridsz"Output directory for img2img gridsz
log/imagesz1Directory for saving images using the Save buttonzoutputs/init-imagesz3Directory for saving init images when using img2img)	r   r   r   r   r   r   Zoutdir_img2img_gridsr   r   )zsaving-to-dirszSaving to a directoryzSave images to a subdirectoryzSave grids to a subdirectoryz7When using "Save" button, save images to a subdirectoryz[date]zDirectory name patterné   z+Max prompt words for [prompt_words] patterné   )Zsave_to_dirsZgrid_save_to_dirsZuse_save_to_dirs_for_uir   Zdirectories_max_prompt_words)Ú	upscalingZ	UpscalingéÀ   zTile size for ESRGAN upscalers.i   z0 = no tilingz"Tile overlap for ESRGAN upscalers.é0   zLow values = visible seamzR-ESRGAN 4x+zR-ESRGAN 4x+ Anime6Bz6Select which Real-ESRGAN models to show in the web UI.c                   C   s   dt  ¡ iS ©NÚchoices)r   Úrealesrgan_models_names© r7   r7   ú>/var/www/html/stable-diffusion-webui/modules/shared_options.pyÚ<lambda>Z   ó    r9   zUpscaler for img2imgc                   C   s   ddd„ t jD ƒiS )Nr5   c                 S   s   g | ]
}|j ‘qS r7   ©Úname©Ú.0Úxr7   r7   r8   Ú
<listcomp>[   r:   ú<lambda>.<locals>.<listcomp>)r   Úsd_upscalersr7   r7   r7   r8   r9   [   r:   )ZESRGAN_tileZESRGAN_tile_overlapZrealesrgan_enabled_modelsZupscaler_for_img2img)zface-restorationúFace restorationzRestore facesrC   )ÚinfotextzFwill use a third-party model on generation result to reconstruct facesÚ
CodeFormerzFace restoration modelc                   C   s   ddd„ t jD ƒiS )Nr5   c                 S   s   g | ]}|  ¡ ‘qS r7   r;   r=   r7   r7   r8   r@   `   r:   rA   )r   Úface_restorersr7   r7   r7   r8   r9   `   r:   g      à?zCodeFormer weightg{®Gáz„?z&0 = maximum effect; 1 = minimum effectz?Move face restoration model from VRAM into RAM after processing)Zface_restorationZface_restoration_modelZcode_former_weightZface_restoration_unload)ÚsystemÚSystemÚLocalz.Automatically open webui in browser on startupc                   C   s   dg d¢iS )Nr5   )ZDisablerI   ÚRemoter7   r7   r7   r7   r8   r9   f   r:   zShow warnings in console.z,Show gradio deprecation warnings in console.z.VRAM usage polls per second during generation.é(   z0 = disablez3Always print all generation info to standard outputzOAdd a second progress bar to the console that shows progress for an entire job.z0Print extra hypernetwork information to console.z'Load models/files in hidden directoriesz/directory is hidden if its name starts with "."z2Disable memmapping for loading .safetensors files.z+fixes very slow loading speed in some caseszFPrevent Stability-AI's ldm/sgm modules from printing noise to console.)
Úauto_launch_browserZshow_warningsZ show_gradio_deprecation_warningsZmemmon_poll_rateZsamples_log_stdoutZmultiple_tqdmZprint_hypernet_extraÚlist_hidden_filesZdisable_mmap_load_safetensorsÚhide_ldm_prints)ÚAPIrO   z7Allow http:// and https:// URLs for input images in API)Úrestrict_apizForbid URLs to local resourceszUser agent for requests)Zapi_enable_requestsZapi_forbid_local_requestsZapi_useragent)ÚtrainingÚTrainingz?Move VAE and CLIP to RAM when training if possible. Saves VRAM.z`Turn on pin_memory for DataLoader. Makes training slightly faster but can increase memory usage.zxSaves Optimizer state as separate *.optim file. Training of embedding or HN can be resumed with the matching optim file.zUSave textual inversion and hypernet settings to a text file whenever training starts.zFilename word regexÚ zFilename join stringz[Number of repeats for a single input image per epoch; used only for displaying epoch numberÚ	precisioniô  zLSave an csv containing the loss to log directory every N steps, 0 to disablez0Use cross attention optimizations while trainingzEnable tensorboard logging.z)Save generated images within tensorboard.éx   zUHow often, in seconds, to flush the pending tensorboard events and summaries to disk.)Zunload_models_when_trainingÚ
pin_memoryZsave_optimizer_stateZsave_training_settings_to_txtZdataset_filename_word_regexZdataset_filename_join_stringZ training_image_repeats_per_epochZtraining_write_csv_everyZ!training_xattention_optimizationsZtraining_enable_tensorboardZ training_tensorboard_save_imagesZ training_tensorboard_flush_every)ÚsdzStable DiffusionzStable Diffusion checkpointc                   C   s   dt  ¡ iS r4   )r   Úlist_checkpoint_tilesr7   r7   r7   r8   r9   ˆ   r:   z
Model hash)ÚrefreshrD   z5Maximum number of checkpoints loaded at the same timeé
   zOnly keep one model on devicezJwill keep models other than the currently used one in RAM rather than VRAMzCheckpoints to cache in RAMz9obsolete; set to 0 and use the two settings above insteadÚ	AutomaticzSD Unetc                   C   s   dt  ¡ iS r4   )r   Úsd_unet_itemsr7   r7   r7   r8   r9   Œ   r:   )rY   zhchoose Unet model: Automatic = use one with same filename as checkpoint; None = use Unet from checkpointzaEnable quantization in K samplers for sharper and cleaner results. This may change existing seedszEnable emphasisz\use (text) to make model pay more attention to text and [text] to make it pay less attentionzVMake K-diffusion samplers produce same images in a batch as when making a single imagezPrompt word wrap length limitéJ   zyin tokens - for texts shorter than specified, if they don't fit into 75 token limit, move them to the next 75 token chunkz	Clip skipé   zOhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#clip-skipzGignore last layers of CLIP network; 1 ignores none, 2 ignores one layerz'Upcast cross attention layer to float32ÚGPUzRandom number generator source.r5   )r_   ÚCPUÚNVZRNGz™changes seeds drastically; use CPU to produce the same picture across different videocard vendors; use NV to produce same picture as on NVidia videocardsZTilingzproduce a tileable pictureúsecond passz+Hires fix: which pass to enable refiner for)z
first passrb   zboth passeszHires refiner)Úsd_model_checkpointZsd_checkpoints_limitZsd_checkpoints_keep_in_cpuZsd_checkpoint_cacheÚsd_unetZenable_quantizationZenable_emphasisZenable_batch_seedsZcomma_padding_backtrackZCLIP_stop_at_last_layersZupcast_attnZrandn_sourceZtilingZhires_fix_refiner_pass)ZsdxlzStable Diffusion XLzcrop top coordinatezcrop left coordinateg      @zSDXL low aesthetic scorez&used for refiner model negative promptg      @zSDXL high aesthetic scorezused for refiner model prompt)Zsdxl_crop_topZsdxl_crop_leftZ sdxl_refiner_low_aesthetic_scoreZ!sdxl_refiner_high_aesthetic_score)ZvaeÚVAEa  
<abbr title='Variational autoencoder'>VAE</abbr> is a neural network that transforms a standard <abbr title='red/green/blue'>RGB</abbr>
image into latent space representation and back. Latent space representation is what stable diffusion is working on during sampling
(i.e. when the progress bar is between empty and full). For txt2img, VAE is used to create a resulting image after the sampling is finished.
For img2img, VAE is used to process user's input image before the sampling, and to create an image after sampling.
zVAE Checkpoints to cache in RAMzSD VAEc                   C   s   dt  ¡ iS r4   )r   Úsd_vae_itemsr7   r7   r7   r8   r9   §   r:   re   zfchoose VAE model: Automatic = use one with same filename as checkpoint; None = use VAE from checkpointz,Selected VAE overrides per-model preferencesz|you can set per-model VAE either by editing user metadata for checkpoints, or by making the VAE have same name as checkpointz)Automatically revert VAE to 32-bit floatszztriggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square imageÚFullzVAE type for encodeÚTAESDzVAE EncoderzLmethod to encode image to latent (use in img2img, hires-fix or inpaint mask)zVAE type for decodezVAE Decoderz method to decode latent to image)Zsd_vae_explanationZsd_vae_checkpoint_cacheÚsd_vaeÚ&sd_vae_overrides_per_model_preferencesZauto_vae_precisionZsd_vae_encode_methodZsd_vae_decode_method)Úimg2imgrk   g      ð?z%Inpainting conditioning mask strengthg        zConditional mask weightzNoise multiplier for img2imgg      ø?gü©ñÒMbP?zNoise multiplierz0Extra noise multiplier for img2img and hires fixzExtra noisez?0 = disabled (default); should be lower than denoising strengthzCApply color correction to img2img results to match original colors.zBWith img2img, do exactly the amount of steps the slider specifies.z*normally you'd do less with less denoisingzHWith img2img, fill transparent parts of the input image with this color.iÐ  zHeight of the image editori@  z	in pixelszSketch initial brush colorz%default brush color of img2img sketchzInpaint mask brush colorzbrush color of inpaint maskz"Inpaint sketch initial brush colorz-default brush color of img2img inpaint sketchz=For inpainting, include the greyscale mask in results for webz;For inpainting, include masked composite in results for web)Zinpainting_mask_weightZinitial_noise_multiplierZimg2img_extra_noiseZimg2img_color_correctionZimg2img_fix_stepsZimg2img_background_colorZimg2img_editor_heightZ"img2img_sketch_default_brush_colorZ img2img_inpaint_mask_brush_colorZ*img2img_inpaint_sketch_default_brush_colorZreturn_maskZreturn_mask_composite)ÚoptimizationsZOptimizationszCross attention optimizationc                   C   s   dt  ¡ iS r4   )r   Úcross_attention_optimizationsr7   r7   r7   r8   r9   ¾   r:   zNegative Guidance minimum sigmag      .@ÚPRzAhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9177z\skip negative prompt for some steps when the image is almost ready; 0=disable, higher=fasterzToken merging ratiogÍÌÌÌÌÌì?gš™™™™™¹?zAhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9256z0=disable, higher=fasterzToken merging ratio for img2imgz,only applies if non-zero and overrides abovez%Token merging ratio for high-res passzToken merging ratio hrz,Pad prompt/negative prompt to be same lengthz	Pad condszZimproves performance when prompt and negative prompt have different lengths; changes seedszPersistent cond cachez\do not recalculate conds from prompts if prompts have not changed since previous calculationzBatch cond/uncondzÈdo both conditional and unconditional denoising in one batch; uses a bit more VRAM during sampling, but improves speed; previously this was controlled by --always-batch-cond-uncond comandline argument)Úcross_attention_optimizationZs_min_uncondZtoken_merging_ratioZtoken_merging_ratio_img2imgZtoken_merging_ratio_hrZpad_cond_uncondZpersistent_cond_cacheÚbatch_cond_uncond)ÚcompatibilityZCompatibilityzFUse old emphasis implementation. Can be useful to reproduce old seeds.z,Use old karras scheduler sigmas (0.1 to 10).zADo not make DPM++ SDE deterministic across different batch sizes.z…For hires fix, use width/height sliders to set final resolution rather than first pass (disables Upscale by, Resize width/height to).z5Do not fix prompt schedule for second order samplers.zQFor hires fix, calculate conds of second pass using extra networks of first pass.z!Use old prompt editing timelines.zOld prompt editing timelinesa!  For [red:green:N]; old: If N < 1, it's a fraction of steps (and hires fix uses range from 0 to 1), if N >= 1, it's an absolute number of steps; new: If N has a decimal point in it, it's a fraction of steps (and hires fix uses range from 1 to 2), othewrwise it's an absolute number of steps)Zuse_old_emphasis_implementationZuse_old_karras_scheduler_sigmasZno_dpmpp_sde_batch_determinismZuse_old_hires_fix_width_heightZ'dont_fix_second_order_samplers_scheduleZhires_fix_use_firstpass_condsZuse_old_scheduling)r   ZInterrogatezKeep models in VRAMz/Include ranks of model tags matches in results.z
booru onlyzBLIP: num_beamsé   z BLIP: minimum description lengthé€   z BLIP: maximum description lengthé   iÜ  z*CLIP: maximum number of lines in text filez0 = No limitzCLIP: skip inquire categoriesc                   C   s   dt  ¡ iS r4   )r   Úcategory_typesr7   r7   r7   r8   r9   Ù   r:   zdeepbooru: score thresholdz#deepbooru: sort tags alphabeticallyzif not: sort by scorezdeepbooru: use spaces in tagszif not: use underscoreszdeepbooru: escape (\) bracketsz9so they are used as literal brackets and not for emphasisz deepbooru: filter out those tagszseparate by comma)Z!interrogate_keep_models_in_memoryZinterrogate_return_ranksZinterrogate_clip_num_beamsZinterrogate_clip_min_lengthZinterrogate_clip_max_lengthZinterrogate_clip_dict_limitZ interrogate_clip_skip_categoriesZ%interrogate_deepbooru_score_thresholdZdeepbooru_sort_alphaZdeepbooru_use_spacesZdeepbooru_escapeZdeepbooru_filter_tags)Úextra_networkszExtra NetworkszShow hidden directoriesz0directory is hidden if its name starts with ".".úWhen searchedz+Show cards for models in hidden directories)ÚAlwaysrw   ÚNeverz^"When searched" option will only show the item when the search string has 4 characters or morez%Default multiplier for extra networksg       @zCard width for Extra NetworkszCard height for Extra NetworkszCard text scalez1 = original sizezShow description on cardzExtra networks separatorzBextra text to add before <...> when adding extra network to promptzExtra networks tab orderz?Print a list of Textual Inversion embeddings when loading modelz(Add Textual Inversion hashes to infotextÚNonezAdd hypernetwork to promptc                   C   s   ddgt j¢iS ©Nr5   rz   )r   Úhypernetworksr7   r7   r7   r8   r9   í   r:   )Z&extra_networks_show_hidden_directoriesZextra_networks_hidden_modelsZ!extra_networks_default_multiplierZextra_networks_card_widthZextra_networks_card_heightZextra_networks_card_text_scaleZextra_networks_card_show_descZ!extra_networks_add_text_separatorZui_extra_networks_tab_reorderZtextual_inversion_print_at_loadZ(textual_inversion_add_hashes_to_infotextZsd_hypernetwork)ÚuizUser interfaceZLocalizationc                   C   s   ddgt tj ¡ ƒ iS r{   )Úlistr   ZlocalizationsÚkeysr7   r7   r7   r8   r9   ñ   r:   c                   C   s   t  tj¡S )N)r   Úlist_localizationsr   Úlocalizations_dirr7   r7   r7   r8   r9   ñ   r:   ÚDefaultzGradio themec                   C   s   ddgt j iS )Nr5   r‚   )r   Úgradio_hf_hub_themesr7   r7   r7   r8   r9   ò   r:   z|you can also manually enter any of themes from the <a href='https://huggingface.co/spaces/gradio/theme-gallery'>gallery</a>.zCache gradio themes locallyz+disable to update the selected Gradio themezGallery heightzan be any valid CSS valuezShow grid in results for webz)Do not show any images in results for webz9Send seed when sending prompt or image to other interfacez;Send size when sending prompt or image to another interfacezEnable full page image viewerz:Show images zoomed in by default in full page image viewerz"Navigate image viewer with gamepadéú   z&Gamepad repeat period, in millisecondsz)Show generation progress in window title.z9Use dropdown for sampler selection instead of radio groupz/Show Width/Height and Batch sliders in same rowz3Ctrl+up/down precision when editing (attention:1.1)gš™™™™™É?gš™™™™™©?z8Ctrl+up/down precision when editing <extra networks:0.9>z.,\/!?%^*;:{}=`~()zCtrl+up/down word delimitersz$Alt+left/right moves prompt elementsrc   zQuicksettings listc                   C   s   dt tjj ¡ ƒiS r4   )r~   r   ÚoptsÚdata_labelsr   r7   r7   r7   r8   r9     r:   ÚinfoZsettingsHintsShowQuicksettingszJsetting entries that appear at the top of page rather than in settings tabzUI tab orderc                   C   s   dt tjƒiS r4   ©r~   r   Ú	tab_namesr7   r7   r7   r8   r9     r:   zHidden UI tabsc                   C   s   dt tjƒiS r4   rˆ   r7   r7   r7   r8   r9     r:   ztxt2img/img2img UI item orderc                   C   s   dt t ¡ ƒiS r4   )r~   r   Úui_reorder_categoriesr7   r7   r7   r8   r9     r:   zselected items appear firstz6Hires fix: show hires checkpoint and sampler selectionz0Hires fix: show hires prompt and negative promptzDisable prompt token counters)r   Úgradio_themeÚgradio_themes_cacheZgallery_heightZreturn_gridZdo_not_show_imagesZ	send_seedZ	send_sizeZjs_modal_lightboxZ"js_modal_lightbox_initially_zoomedZjs_modal_lightbox_gamepadZ js_modal_lightbox_gamepad_repeatZshow_progress_in_titleZsamplers_in_dropdownZdimensions_and_batch_togetherZkeyedit_precision_attentionZkeyedit_precision_extraZkeyedit_delimitersZkeyedit_moveÚquicksettings_listZui_tab_orderZhidden_tabsÚui_reorder_listZhires_fix_show_samplerZhires_fix_show_promptsZdisable_token_counters)rD   ZInfotextz(Add model hash to generation informationz(Add model name to generation informationz:Add user name to generation information when authenticatedz-Add program version to generation informationz5Disregard checkpoint information from pasted infotextz4when reading generation parameters from text into UIúApply if anyz,Infer styles from prompts of pasted infotext)ÚIgnoreÚApplyZDiscardr   z5when reading generation parameters from text into UI)aÄ  <ul style='margin-left: 1.5em'>
<li>Ignore: keep prompt and styles dropdown as it is.</li>
<li>Apply: remove style text from prompt, always replace styles dropdown value with found styles (even if none are found).</li>
<li>Discard: remove style text from prompt, keep styles dropdown as it is.</li>
<li>Apply if any: remove style text from prompt; if any styles are found in prompt, put them into styles dropdown, otherwise keep it as it is.</li>
</ul>)Zadd_model_hash_to_infoZadd_model_name_to_infoZadd_user_name_to_infoZadd_version_to_infotextZdisable_weights_auto_swapZinfotext_styles)r}   zLive previewszShow progressbarz'Show live previews of the created imagezLive preview file format)Újpegr   Úwebpz:Show previews of all images generated in a batch as a gridzLive preview display periodé    zpin sampling steps - show new live preview image every N sampling steps; -1 = only show after completion of batchú	Approx NNzLive preview method)rg   r•   zApprox cheaprh   ztFull = slow but pretty; Approx NN and TAESD = fast but low quality; Approx cheap = super fast but terrible otherwisez3Allow Full live preview method with lowvram/medvramzŠIf not, Approx NN will be used instead; Full live preview method is very detrimental to speed if lowvram/medvram optimizations are enabledÚPromptzLive preview subject)ZCombinedr–   zNegative promptiè  z%Progressbar and preview update periodzin millisecondsz9Return image with chosen live preview method on interruptzmakes interrupts faster)
Zshow_progressbarZlive_previews_enableZlive_previews_image_formatZshow_progress_gridZshow_progress_every_n_stepsZshow_progress_typeZlive_preview_allow_lowvram_fullZlive_preview_contentZlive_preview_refresh_periodZlive_preview_fast_interrupt)zsampler-paramszSampler parameterszHide samplers in user interfacec                   C   s   ddd„ t  ¡ D ƒiS )Nr5   c                 S   s   g | ]
}|j ‘qS r7   r;   r=   r7   r7   r8   r@   +  r:   rA   )r   Úlist_samplersr7   r7   r7   r8   r9   +  r:   zEta for DDIMzEta DDIMz5noise multiplier; higher = more unpredictable resultszEta for k-diffusion samplersÚEtaz^noise multiplier; currently only applies to ancestral samplers (i.e. Euler a) and SDE samplersÚuniformzimg2img DDIM discretizeÚquadzsigma churng      Y@zSigma churnz>amount of stochasticity; only applies to Euler, Heun, and DPM2z
sigma tming      $@z
Sigma tminz[enable stochasticity; start value of the sigma range; only applies to Euler, Heun, and DPM2z
sigma tmaxg     8@z
Sigma tmaxzL0 = inf; end value of the sigma range; only applies to Euler, Heun, and DPM2zsigma noisegš™™™™™ñ?zSigma noisezGamount of additional noise to counteract loss of detail during samplingzScheduler type)r[   ZkarrasÚexponentialZpolyexponentialzSchedule typezulets you override the noise schedule for k-diffusion samplers; choosing Automatic disables the three parameters belowz	sigma minzSchedule max sigmazK0 = default (~0.03); minimum noise strength for k-diffusion noise schedulerz	sigma maxzSchedule min sigmazK0 = default (~14.6); maximum noise strength for k-diffusion noise schedulerÚrhozSchedule rhozv0 = default (7 for karras, 1 for polyexponential); higher values result in a steeper noise schedule (decreases faster)zEta noise seed deltaZENSDz|ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing imagesz!Always discard next-to-last sigmazDiscard penultimate sigmazAhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/6044zSGM noise multiplierzSGM noise multplierzBhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12818zXMatch initial noise to official SDXL implementation - only useful for reproducing imagesÚbh1zUniPC variant)r   Zbh2Z
vary_coeffÚtime_uniformzUniPC skip type)rž   Ztime_quadraticZlogSNRé   zUniPC orderé2   zmust be < sampling stepszUniPC lower order final)Zhide_samplersZeta_ddimZeta_ancestralÚddim_discretizeÚs_churnÚs_tminÚs_tmaxÚs_noiseZk_sched_typeÚ	sigma_minÚ	sigma_maxrœ   Zeta_noise_seed_deltaZ!always_discard_next_to_last_sigmaZsgm_noise_multiplierZuni_pc_variantZuni_pc_skip_typeZuni_pc_orderZuni_pc_lower_order_final)ZpostprocessingZPostprocessingz<Enable postprocessing operations in txt2img and img2img tabsc                   C   s   ddd„ t  ¡ D ƒiS )Nr5   c                 S   s   g | ]
}|j ‘qS r7   r;   r=   r7   r7   r8   r@   A  r:   rA   ©r   Úpostprocessing_scriptsr7   r7   r7   r8   r9   A  r:   zPostprocessing operation orderc                   C   s   ddd„ t  ¡ D ƒiS )Nr5   c                 S   s   g | ]
}|j ‘qS r7   r;   r=   r7   r7   r8   r@   B  r:   rA   r¨   r7   r7   r7   r8   r9   B  r:   é   z+Maximum number of images in upscaling cache)Z postprocessing_enable_in_main_uiZpostprocessing_operation_orderZupscaling_max_images_in_cache)NzHidden optionszDisable these extensionsÚnonezBDisable all extensions (preserves the list of disabled extensions))r«   ÚextraÚallz@Config state file to restore from, under 'config-states/' folderz%SHA256 hash of the current checkpoint)Údisabled_extensionsÚdisable_all_extensionsÚrestore_config_state_fileZsd_checkpoint_hash)0ÚgradioÚgrÚmodulesr   r   r   r   r   r   Úmodules.paths_internalr   r	   r
   r   r   r   r   r   r   Úmodules.shared_cmd_optionsr   Zmodules.optionsr   r   r   Úoptions_templatesÚ	hide_dirsÚrestricted_optsÚupdateÚlinkÚSliderZFormColorPickerr‡   ÚNumberÚCheckboxGroupÚDropdownÚRadioÚneeds_reload_uiÚrefresh_checkpointsÚrefresh_unet_listÚrefresh_vae_listru   Úreload_hypernetworksZDropdownEditableÚTextboxZDropdownMultiÚjsÚhtmlr7   r7   r7   r8   Ú<module>   s*   ,Ø
+÷
û
ü
ü
ö
ý
ô
( ò
ü
   ô
 "

ô
.6$*ø






ù


ô
$"


ô
&$








2"æ




,ú



"$ö
&&((((("$""*í
ý



ü