], [job_timestamp]; leave empty for default","ui":"settings_saving-paths"},
+ {"id":"","label":"Dark","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Disabled UI tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Disable variable aspect ratio","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Desktop","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Downscale high resolution live previews","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"Detailer use model augment","localized":"","hint":"Run detailer detection models at extra precision","ui":"settings_postprocessing"},
+ {"id":"","label":"Default strength","localized":"","hint":"When adding extra network such as Lora to prompt, use this multiplier for it","ui":"settings_extra_networks"},
+ {"id":"","label":"Do not change selected model when reading generation parameters","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Do conditional and unconditional denoising in one batch","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Disable NaN check","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Disallow models in ckpt format","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Default upscaler for image resize operations","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Debug info","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Download folder","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"DWPose","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Depth Anything","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Depth Pro","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Decode","localized":"","hint":"","ui":"video"}
],
- "e":
- [
- {"id":"component-843","label":"Enhance prompt","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
- {"id":"prompt_enhance_apply","label":"Enhance now","localized":"","hint":"Run prompt enhancement using the selected LLM model","ui":"script_prompt_enhance"},
- {"id":"btn_extensions","label":"Extensions","localized":"","hint":"Application extensions"},
- {"id":"","label":"Extract LoRA","localized":"","hint":""},
- {"id":"","label":"Embedded metadata","localized":"","hint":""},
- {"id":"","label":"Extension list","localized":"","hint":"","ui":"component-8571"},
- {"id":"","label":"Execution Precision","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"Embeddings","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Extract currently loaded LoRA(s)","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"Enable LayerSkipConfig","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Enable refine pass","localized":"","hint":"Use a similar process as image to image to upscale and/or add detail to the final image. Optionally uses refiner model to enhance image details.","ui":"txt2img"},
- {"id":"","label":"Enable detailer pass","localized":"","hint":"Detect target objects such as face and reprocess it at higher resolution","ui":"txt2img"},
- {"id":"","label":"Edge padding","localized":"","hint":"Expand edge of masked area by this percentage","ui":"txt2img"},
- {"id":"","label":"Edge blur","localized":"","hint":"Blur edge of masked area by this percentage","ui":"txt2img"},
- {"id":"","label":"End","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"ETA","localized":"","hint":"","ui":"script_apg"},
- {"id":"","label":"Enable FreeU","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Enable tonemap","localized":"","hint":"","ui":"script_hdr"},
- {"id":"","label":"Enabled","localized":"","hint":"","ui":"script_kohya_hires_fix"},
- {"id":"","label":"Exposure","localized":"","hint":"","ui":"script_lut_color_grading"},
- {"id":"","label":"Encoder","localized":"","hint":"","ui":"script_mulan"},
- {"id":"","label":"Enhanced prompt","localized":"","hint":"The enhanced prompt output from the LLM","ui":"script_prompt_enhance"},
- {"id":"","label":"Edit start","localized":"","hint":"","ui":"script_ledits"},
- {"id":"","label":"Edit stop","localized":"","hint":"","ui":"script_ledits"},
- {"id":"","label":"Erode","localized":"","hint":"","ui":"control"},
- {"id":"","label":"edge","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Ensemble size","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Enable","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Erode size","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Enable PixelArt","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Enable edge detection","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Edge block size","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Edge image weight","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Escape brackets","localized":"","hint":"Escape parentheses and brackets in tags with backslashes. Required when tags contain characters that have special meaning in prompt syntax, such as ( ) [ ]. Enable this when using the output directly in prompts.","ui":"caption"},
- {"id":"","label":"Exclude tags","localized":"","hint":"Comma-separated list of tags to exclude from the output. Useful for filtering out unwanted or redundant tags that appear frequently.","ui":"caption"},
- {"id":"","label":"Extension GIT repository URL","localized":"","hint":"Specify extension repository URL on GitHub","ui":"component-8593"},
- {"id":"","label":"ExecutionProvider.CPU","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"ExecutionProvider.DirectML","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"ExecutionProvider.CUDA","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"ExecutionProvider.ROCm","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"ExecutionProvider.MIGraphX","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"ExecutionProvider.OpenVINO","localized":"","hint":"","ui":"component-8529"},
- {"id":"","label":"Enable modular pipelines (experimental)","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Expandable segments","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Enable use of reference models","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Enable embeddings support","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Enable file wildcards support","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Extra noise multiplier for img2img","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Embeddings train templates directory","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Enable Hypernetwork support","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Enable tensorboard logging","localized":"","hint":"","ui":"settings_legacy_options"}
+ "e": [
+ {"id":"component-883","label":"Enhance prompt","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
+ {"id":"prompt_enhance_apply","label":"Enhance now","localized":"","hint":"Run prompt enhancement using the selected LLM model","ui":"script_prompt_enhance"},
+ {"id":"btn_extensions","label":"Extensions","localized":"","hint":"Application extensions"},
+ {"id":"","label":"Extract LoRA","localized":"","hint":""},
+ {"id":"","label":"Embedded metadata","localized":"","hint":""},
+ {"id":"","label":"Extension list","localized":"","hint":"","ui":"component-8724"},
+ {"id":"","label":"Execution Precision","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"Embeddings","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Extract currently loaded LoRA(s)","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"Effects","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Enable LayerSkipConfig","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Enable refine pass","localized":"","hint":"Use a similar process as image to image to upscale and/or add detail to the final image. Optionally uses refiner model to enhance image details.","ui":"txt2img"},
+ {"id":"","label":"Enable detailer pass","localized":"","hint":"Detect target objects such as face and reprocess it at higher resolution","ui":"txt2img"},
+ {"id":"","label":"Edge padding","localized":"","hint":"Expand edge of masked area by this percentage","ui":"txt2img"},
+ {"id":"","label":"Edge blur","localized":"","hint":"Blur edge of masked area by this percentage","ui":"txt2img"},
+ {"id":"","label":"End","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"ETA","localized":"","hint":"","ui":"script_apg"},
+ {"id":"","label":"Enable FreeU","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Enable tonemap","localized":"","hint":"","ui":"script_hdr"},
+ {"id":"","label":"Enabled","localized":"","hint":"","ui":"script_kohya_hires_fix"},
+ {"id":"","label":"Encoder","localized":"","hint":"","ui":"script_mulan"},
+ {"id":"","label":"Enhanced prompt","localized":"","hint":"The enhanced prompt output from the LLM","ui":"script_prompt_enhance"},
+ {"id":"","label":"Edit start","localized":"","hint":"","ui":"script_ledits"},
+ {"id":"","label":"Edit stop","localized":"","hint":"","ui":"script_ledits"},
+ {"id":"","label":"Erode","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"edge","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Ensemble size","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Enable","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Erode size","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Enable PixelArt","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Enable edge detection","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Edge block size","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Edge image weight","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Escape brackets","localized":"","hint":"Escape parentheses and brackets in tags with backslashes. Required when tags contain characters that have special meaning in prompt syntax, such as ( ) [ ]. Enable this when using the output directly in prompts.","ui":"caption"},
+ {"id":"","label":"Exclude tags","localized":"","hint":"Comma-separated list of tags to exclude from the output. Useful for filtering out unwanted or redundant tags that appear frequently.","ui":"caption"},
+ {"id":"","label":"Extension GIT repository URL","localized":"","hint":"Specify extension repository URL on GitHub","ui":"component-8746"},
+ {"id":"","label":"ExecutionProvider.CPU","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"ExecutionProvider.DirectML","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"ExecutionProvider.CUDA","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"ExecutionProvider.ROCm","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"ExecutionProvider.MIGraphX","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"ExecutionProvider.OpenVINO","localized":"","hint":"","ui":"component-8682"},
+ {"id":"","label":"Enable modular pipelines (experimental)","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Expandable segments","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"Enable use of reference models","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Enable embeddings support","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Enable file wildcards support","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Extra noise multiplier for img2img","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Embeddings train templates directory","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Enable Hypernetwork support","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Enable tensorboard logging","localized":"","hint":"","ui":"settings_legacy_options"}
],
- "f":
- [
- {"id":"","label":"Fixed","localized":"","hint":"Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio","ui":"txt2img"},
- {"id":"","label":"Folder","localized":"","hint":"","ui":"control"},
- {"id":"video_params_framepack","label":"FramePack","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Frames","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Fallback guidance","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"FreeU","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Faster Cache","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Folders","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Fetch model preview metadata","localized":"","hint":"","ui":"models_metadata_tab"},
- {"id":"","label":"Flow shift","localized":"","hint":"Shift value for flowmatching models. Controls the distribution of denoising steps. Values: - >1.0: allocate more steps to early denoising (better structure) -<1.0: allocate more steps to late denoising (better fine details) - 1.0: balanced schedule Most flowmatching models use the value of 3 as default. Effectively inactive if dynamic shift is enabled.","ui":"txt2img"},
- {"id":"","label":"FDG scales","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"FDG weights","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"FDG rescale space","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Force HiRes","localized":"","hint":"Hires runs automatically when Latent upscale is selected, but its skipped when using non-latent upscalers. Enable force hires to run hires with non-latent upscalers","ui":"txt2img"},
- {"id":"","label":"FreeU preset","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"FaceID Model","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Final strength","localized":"","hint":"","ui":"script_loopback"},
- {"id":"","label":"full","localized":"","hint":"Always use full precision","ui":"img2img"},
- {"id":"","label":"Fall-off exponent (lower=higher detail)","localized":"","hint":"","ui":"script_outpainting"},
- {"id":"","label":"Fill strength","localized":"","hint":"","ui":"script_softfill"},
- {"id":"","label":"Face","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Face confidence","localized":"","hint":"","ui":"control"},
- {"id":"","label":"FP model variant","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP resolution","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP duration","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP target FPS","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP interpolation","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP init strength","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP end strength","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP vision strength","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP section prompts","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP latent window size","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP steps","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP sampler shift","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP CFG scale","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP distilled CFG scale","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP CFG re-scale","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP system prompt","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP model receipe","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP enable TeaCache","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP use optimized system prompt","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP enable CFGZero","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP enable Preview","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP attention","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FP VAE","localized":"","hint":"","ui":"video"},
- {"id":"","label":"FPS","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Foreground threshold","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Frame change sensitivity","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Filename","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Force model eval","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"false","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"Full precision (--no-half-vae)","localized":"","hint":"Uses FP32 for the VAE. May produce better results while using more VRAM and slower generation","ui":"settings_vae_encoder"},
- {"id":"","label":"FP32","localized":"","hint":"Use 32-bit floating point precision for calculations","ui":"settings_cuda"},
- {"id":"","label":"FP16","localized":"","hint":"Use 16-bit floating point precision for calculations","ui":"settings_cuda"},
- {"id":"","label":"Force full precision (--no-half)","localized":"","hint":"Uses FP32 for the model. May produce better results while using more VRAM and slower generation","ui":"settings_cuda"},
- {"id":"","label":"Flash","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"Flex attention","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"Flash attention","localized":"","hint":"Highly optimized attention algorithm. Greatly reduces VRAM use and speeds up inference, but can be non-deterministic.","ui":"settings_cuda"},
- {"id":"","label":"Fused projections","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"FreeU enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FreeU 1st stage backbone","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FreeU 2nd stage backbone","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FreeU 1st stage skip","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FreeU 2nd stage skip","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FoCa","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache cache enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache spacial skip range","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache spacial skip start","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache spacial skip end","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache uncond skip range","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache uncond skip start","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache uncond skip end","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"FasterCache guidance distilled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"fullgraph","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Folder with stable diffusion models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with Huggingface models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for Huggingface cache","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for Tunable ops cache","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with VAE files","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with UNET files","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with Text encoder files","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with LoRA network(s)","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"File or Folder with user-defined styles","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with user-defined wildcards","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with textual inversion embeddings","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with Control models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with Yolo models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with ESRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with BSRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with RealESRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with SCUNet models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with SwinIR models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with CLIP models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for disk offload","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for OpenVINO cache","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for ONNX cached models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder for ONNX conversion","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Folder with chaiNNer models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"File format","localized":"","hint":"Select file format for images","ui":"settings_saving-images"},
- {"id":"","label":"Font file","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Font color","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Folder for text generate","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for image generate","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for control generate","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for processed images","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for manually saved images","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for videos","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for init images","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for txt2img grids","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for img2img grids","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Folder for control grids","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Font size","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Full VAE","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"Force offline mode","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"Fixed UNet precision","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Filename join string","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Filename word regex","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Force zeros for prompts when empty","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"fill","localized":"","hint":"Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors","ui":"settings_legacy_options"},
- {"id":"","label":"For image processing do exact number of steps as specified","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Folder with LyCORIS network(s)","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Fuse strength","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"FreeInit","localized":"","hint":"","ui":"script_video"}
+ "f": [
+ {"id":"","label":"Fixed","localized":"","hint":"Resize image to target resolution. Unless height and width match, you will get incorrect aspect ratio","ui":"txt2img"},
+ {"id":"","label":"Folder","localized":"","hint":"","ui":"control"},
+ {"id":"video_params_framepack","label":"FramePack","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Frames","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Fallback guidance","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"FreeU","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Faster Cache","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Folders","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Fetch model preview metadata","localized":"","hint":"","ui":"models_metadata_tab"},
+ {"id":"","label":"Flow shift","localized":"","hint":"Shift value for flowmatching models. Controls the distribution of denoising steps. Values: - >1.0: allocate more steps to early denoising (better structure) -<1.0: allocate more steps to late denoising (better fine details) - 1.0: balanced schedule Most flowmatching models use the value of 3 as default. Effectively inactive if dynamic shift is enabled.","ui":"txt2img"},
+ {"id":"","label":"FDG scales","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"FDG weights","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"FDG rescale space","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Force HiRes","localized":"","hint":"Hires runs automatically when Latent upscale is selected, but its skipped when using non-latent upscalers. Enable force hires to run hires with non-latent upscalers","ui":"txt2img"},
+ {"id":"","label":"FreeU preset","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"FaceID Model","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Final strength","localized":"","hint":"","ui":"script_loopback"},
+ {"id":"","label":"full","localized":"","hint":"Always use full precision","ui":"img2img"},
+ {"id":"","label":"Fall-off exponent (lower=higher detail)","localized":"","hint":"","ui":"script_outpainting"},
+ {"id":"","label":"Fill strength","localized":"","hint":"","ui":"script_softfill"},
+ {"id":"","label":"Face","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Face confidence","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"FP model variant","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP resolution","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP duration","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP target FPS","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP interpolation","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP init strength","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP end strength","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP vision strength","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP section prompts","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP latent window size","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP steps","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP sampler shift","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP CFG scale","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP distilled CFG scale","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP CFG re-scale","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP system prompt","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP model receipe","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP enable TeaCache","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP use optimized system prompt","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP enable CFGZero","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP enable Preview","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP attention","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FP VAE","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"FPS","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Foreground threshold","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Frame change sensitivity","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Filename","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Force model eval","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"false","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"Full precision (--no-half-vae)","localized":"","hint":"Uses FP32 for the VAE. May produce better results while using more VRAM and slower generation","ui":"settings_vae_encoder"},
+ {"id":"","label":"FP32","localized":"","hint":"Use 32-bit floating point precision for calculations","ui":"settings_cuda"},
+ {"id":"","label":"FP16","localized":"","hint":"Use 16-bit floating point precision for calculations","ui":"settings_cuda"},
+ {"id":"","label":"Force full precision (--no-half)","localized":"","hint":"Uses FP32 for the model. May produce better results while using more VRAM and slower generation","ui":"settings_cuda"},
+ {"id":"","label":"Flash","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"Flex attention","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"Flash attention","localized":"","hint":"Highly optimized attention algorithm. Greatly reduces VRAM use and speeds up inference, but can be non-deterministic.","ui":"settings_cuda"},
+ {"id":"","label":"Fused projections","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"FreeU enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FreeU 1st stage backbone","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FreeU 2nd stage backbone","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FreeU 1st stage skip","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FreeU 2nd stage skip","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FoCa","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache cache enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache spacial skip range","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache spacial skip start","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache spacial skip end","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache uncond skip range","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache uncond skip start","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache uncond skip end","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"FasterCache guidance distilled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"fullgraph","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Folder with stable diffusion models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with Huggingface models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for Huggingface cache","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for Tunable ops cache","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with VAE files","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with UNET files","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with Text encoder files","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with LoRA network(s)","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"File or Folder with user-defined styles","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with user-defined wildcards","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with textual inversion embeddings","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with Control models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with Yolo models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with ESRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with BSRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with RealESRGAN models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with SCUNet models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with SwinIR models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with CLIP models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for disk offload","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for OpenVINO cache","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for ONNX cached models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder for ONNX conversion","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Folder with chaiNNer models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"File format","localized":"","hint":"Select file format for images","ui":"settings_saving-images"},
+ {"id":"","label":"Font file","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Font color","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Folder for text generate","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for image generate","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for control generate","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for processed images","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for manually saved images","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for videos","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for init images","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for txt2img grids","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for img2img grids","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Folder for control grids","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Font size","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Full VAE","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"Force offline mode","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"Fixed UNet precision","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Filename join string","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Filename word regex","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Force zeros for prompts when empty","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"fill","localized":"","hint":"Resize the image so that entirety of image is inside target resolution. Fill empty space with image's colors","ui":"settings_legacy_options"},
+ {"id":"","label":"For image processing do exact number of steps as specified","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Folder with LyCORIS network(s)","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Fuse strength","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"FreeInit","localized":"","hint":"","ui":"script_video"}
],
- "g":
- [
- {"id":"gallery_nav","label":"Gallery","localized":"","hint":"Image gallery"},
- {"id":"","label":"GitHub","localized":"","hint":""},
- {"id":"txt2img_guidance","label":"Guidance","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"GenerateGenerate","localized":"","hint":"","ui":"txt2img"},
- {"id":"control_loop","label":"Generate forever","localized":"","hint":"Start processing and continue until cancelled","ui":"control"},
- {"id":"video_generate_btn","label":"Generate","localized":"","hint":"Start processing","ui":"video"},
- {"id":"framepack_btn_get_model","label":"Get receipe","localized":"","hint":"","ui":"video"},
- {"id":"","label":"GPU Monitor","localized":"","hint":""},
- {"id":"get_changelog","label":"Get Changelog","localized":"","hint":"","ui":"system_tab_changelog"},
- {"id":"","label":"Generic","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Google GenAI","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Group Offload","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Grid Options","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Grids","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Guider","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Guidance scale","localized":"","hint":"Classifier Free Guidance scale: how strongly the image should conform to prompt. Lower values produce more creative results, higher values make it follow the prompt more strictly; recommended values between 5-10","ui":"txt2img"},
- {"id":"","label":"Guidance end","localized":"","hint":"Ends the effect of CFG and PAG early: A value of 1 acts as normal, 0.5 stops guidance at 50% of steps","ui":"txt2img"},
- {"id":"","label":"Guidance rescale","localized":"","hint":"Rescale guidance to avoid overexposed images at higher guidance values","ui":"txt2img"},
- {"id":"","label":"Gamma","localized":"","hint":"","ui":"script_hdr"},
- {"id":"","label":"Grid margins","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"Grid sections","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"Guidance strength","localized":"","hint":"","ui":"script_slg"},
- {"id":"","label":"Guidance start","localized":"","hint":"","ui":"script_slg"},
- {"id":"","label":"Guidance stop","localized":"","hint":"","ui":"script_slg"},
- {"id":"","label":"Gate step","localized":"","hint":"","ui":"script_t-gate"},
- {"id":"","label":"Guess mode","localized":"","hint":"Removes the requirement to supply a prompt to a ControlNet. It forces Controlnet encoder to do it's 'best guess' based on the contents of the input control map.","ui":"control"},
- {"id":"","label":"gradient","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Gamma corrected","localized":"","hint":"","ui":"control"},
- {"id":"","label":"General threshold","localized":"","hint":"Confidence threshold for general tags (e.g., objects, actions, settings). Only tags with confidence above this threshold are included in the output. Higher values are more selective (fewer tags), lower values include more tags.","ui":"caption"},
- {"id":"","label":"GPU","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Google cloud use VertexAI endpoints","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Google cloud API key","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Google Cloud project ID","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Google Cloud location ID","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"group","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Group size","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"GC threshold","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Grid max rows count","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Grid max columns count","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Grid background color","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Gallery auto-update on tab change","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"GPU monitor interval","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Gallery view columns","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Grid image size","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Global","localized":"","hint":"","ui":"control"}
+ "g": [
+ {"id":"gallery_nav","label":"Gallery","localized":"","hint":"Image gallery"},
+ {"id":"","label":"GitHub","localized":"","hint":""},
+ {"id":"txt2img_guidance","label":"Guidance","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"GenerateGenerate","localized":"","hint":"","ui":"txt2img"},
+ {"id":"control_loop","label":"Generate forever","localized":"","hint":"Start processing and continue until cancelled","ui":"control"},
+ {"id":"video_generate_btn","label":"Generate","localized":"","hint":"Start processing","ui":"video"},
+ {"id":"framepack_btn_get_model","label":"Get receipe","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"GPU Monitor","localized":"","hint":""},
+ {"id":"get_changelog","label":"Get Changelog","localized":"","hint":"","ui":"system_tab_changelog"},
+ {"id":"","label":"Generic","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Google GenAI","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Group Offload","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Grid Options","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Grids","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Guider","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Guidance scale","localized":"","hint":"Classifier Free Guidance scale: how strongly the image should conform to prompt. Lower values produce more creative results, higher values make it follow the prompt more strictly; recommended values between 5-10","ui":"txt2img"},
+ {"id":"","label":"Guidance end","localized":"","hint":"Ends the effect of CFG and PAG early: A value of 1 acts as normal, 0.5 stops guidance at 50% of steps","ui":"txt2img"},
+ {"id":"","label":"Guidance rescale","localized":"","hint":"Rescale guidance to avoid overexposed images at higher guidance values","ui":"txt2img"},
+ {"id":"","label":"Gamma","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Grain","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Grid margins","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"Grid sections","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"Guidance strength","localized":"","hint":"","ui":"script_slg"},
+ {"id":"","label":"Guidance start","localized":"","hint":"","ui":"script_slg"},
+ {"id":"","label":"Guidance stop","localized":"","hint":"","ui":"script_slg"},
+ {"id":"","label":"Gate step","localized":"","hint":"","ui":"script_t-gate"},
+ {"id":"","label":"Guess mode","localized":"","hint":"Removes the requirement to supply a prompt to a ControlNet. It forces Controlnet encoder to do it's 'best guess' based on the contents of the input control map.","ui":"control"},
+ {"id":"","label":"gradient","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Gamma corrected","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"General threshold","localized":"","hint":"Confidence threshold for general tags (e.g., objects, actions, settings). Only tags with confidence above this threshold are included in the output. Higher values are more selective (fewer tags), lower values include more tags.","ui":"caption"},
+ {"id":"","label":"GPU","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Google cloud use VertexAI endpoints","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Google cloud API key","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Google Cloud project ID","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Google Cloud location ID","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"group","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Group size","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"GC threshold","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"Grid max rows count","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Grid max columns count","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Grid background color","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Gallery auto-update on tab change","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"GPU monitor interval","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Gallery view columns","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Grid image size","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Global","localized":"","hint":"","ui":"control"}
],
- "h":
- [
- {"id":"btn_history","label":"History","localized":"","hint":"List of previous generations that can be further reprocessed"},
- {"id":"docs_md_btn","label":"html2md","localized":"","hint":"","ui":"system_tab_docs"},
- {"id":"","label":"Huggingface","localized":"","hint":"Settings related huggingface access"},
- {"id":"","label":"HiDream","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"HyperTile","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion","localized":"","hint":"HiDiffusion allows creation of high-resolution images using your standard models without duplicates/distortions and improved performance","ui":"settings_advanced"},
- {"id":"","label":"Height","localized":"","hint":"Image height","ui":"txt2img"},
- {"id":"","label":"HiRes steps","localized":"","hint":"Number of sampling steps for upscaled picture. If 0, uses same as for original","ui":"txt2img"},
- {"id":"","label":"HDR clamp","localized":"","hint":"Adjusts the level of nonsensical details by pruning values that deviate significantly from the distribution mean. It is particularly useful for enhancing generation at higher guidance scales, identifying outliers early in the process and applying mathematical adjustments based on the Range (Boundary) and Threshold settings. Think of it as setting the range within which you want your image values to be, and adjusting the threshold determines which values should be brought back into that range","ui":"txt2img"},
- {"id":"","label":"HDR maximize","localized":"","hint":"Calculates a 'normalization factor' by dividing the maximum tensor value by the specified range multiplied by 4. This factor is then used to shift the channels within the given boundary, ensuring maximum dynamic range for subsequent processing. The objective is to optimize dynamic range for external applications like Photoshop, particularly for adjusting levels, contrast, and brightness","ui":"txt2img"},
- {"id":"","label":"HDR range","localized":"","hint":"","ui":"script_hdr"},
- {"id":"","label":"Hue","localized":"","hint":"","ui":"script_lut_color_grading"},
- {"id":"","label":"HQ init latents","localized":"","hint":"","ui":"script_instantir"},
- {"id":"","label":"Height after","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Height mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Hires use control","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Hands","localized":"","hint":"","ui":"control"},
- {"id":"","label":"High threshold","localized":"","hint":"","ui":"control"},
- {"id":"","label":"high noise","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Hypertile UNet Enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile HiRes pass only","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile UNet max tile size","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile UNet min tile size","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile UNet swap size","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile UNet depth","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile VAE Enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile VAE tile size","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Hypertile VAE swap size","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion apply RAU-Net","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion apply MSW-MSA","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion aggressive at step","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion override T1 ratio","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"HiDiffusion override T2 ratio","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"hidet","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Hide legacy tabs","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Hide input range sliders","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Hide params headers","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"HuggingFace token","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"HuggingFace mirror","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"HED","localized":"","hint":"","ui":"control"}
+ "h": [
+ {"id":"btn_history","label":"History","localized":"","hint":"List of previous generations that can be further reprocessed"},
+ {"id":"docs_md_btn","label":"html2md","localized":"","hint":"","ui":"system_tab_docs"},
+ {"id":"","label":"Huggingface","localized":"","hint":"Settings related huggingface access"},
+ {"id":"","label":"HiDream","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"HyperTile","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion","localized":"","hint":"HiDiffusion allows creation of high-resolution images using your standard models without duplicates/distortions and improved performance","ui":"settings_advanced"},
+ {"id":"","label":"Height","localized":"","hint":"Image height","ui":"txt2img"},
+ {"id":"","label":"HiRes steps","localized":"","hint":"Number of sampling steps for upscaled picture. If 0, uses same as for original","ui":"txt2img"},
+ {"id":"","label":"Hue","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Highlights","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Highlights tint","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"HDR range","localized":"","hint":"","ui":"script_hdr"},
+ {"id":"","label":"HQ init latents","localized":"","hint":"","ui":"script_instantir"},
+ {"id":"","label":"Height after","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Height mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Hires use control","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Hands","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"High threshold","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"high noise","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Hypertile UNet Enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile HiRes pass only","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile UNet max tile size","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile UNet min tile size","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile UNet swap size","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile UNet depth","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile VAE Enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile VAE tile size","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Hypertile VAE swap size","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion apply RAU-Net","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion apply MSW-MSA","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion aggressive at step","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion override T1 ratio","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"HiDiffusion override T2 ratio","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"hidet","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Hide legacy tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Hide input range sliders","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Hide params headers","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"histogram","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"HuggingFace token","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"HuggingFace mirror","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"HED","localized":"","hint":"","ui":"control"}
],
- "i":
- [
- {"id":"control_nav","label":"Images","localized":"","hint":"Create images Unified interface Supports T2I and I2I With optional control guidance"},
- {"id":"img2img_nav","label":"I2I","localized":"","hint":"Create image from image Legacy interface that mimics original image-to-image interface and behavior"},
- {"id":"img2img_results_input_mobile","label":"Input","localized":"","hint":"Show/hide selection of input media used to guide generation","ui":"img2img"},
- {"id":"","label":"Image","localized":"","hint":"Create image from image","ui":"img2img"},
- {"id":"","label":"Inpaint","localized":"","hint":"","ui":"img2img"},
- {"id":"control_params_mask","label":"Inputs","localized":"","hint":"Settings related to Input images","ui":"control"},
- {"id":"","label":"Initial","localized":"","hint":"Set image resolution before processing","ui":"control"},
- {"id":"btn_info","label":"Info","localized":"","hint":""},
- {"id":"","label":"install","localized":"","hint":"","ui":"component-8571"},
- {"id":"","label":"Image Options","localized":"","hint":"Settings related to image format, metadata, and image grids"},
- {"id":"","label":"Image Paths","localized":"","hint":"Settings related to image filenames, and output directories"},
- {"id":"","label":"Image Metadata","localized":"","hint":"Settings related to handling of metadata that is created with generated images"},
- {"id":"","label":"IP Adapters","localized":"","hint":"IP adapters are plugin models that can guide generation towards desired outcome","ui":"txt2img"},
- {"id":"","label":"Input Media","localized":"","hint":"Add input image to be used for image-to-image, inpaint or control processing","ui":"control"},
- {"id":"","label":"Input Image","localized":"","hint":"","ui":"caption"},
- {"id":"","label":"IPEX","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Image Gallery","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Intermediate Image Saving","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Initial seed","localized":"","hint":"A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result","ui":"txt2img"},
- {"id":"","label":"Include detections","localized":"","hint":"Include original image with detected areas marked","ui":"txt2img"},
- {"id":"","label":"IY model","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"IY scale","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"IY start","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"IY end","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"Identity guidance","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"Include original image","localized":"","hint":"","ui":"script_lut_color_grading"},
- {"id":"","label":"Iterate seed per line","localized":"","hint":"","ui":"script_prompts_from_file"},
- {"id":"","label":"Iterations","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Interpolate frames","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Include main grid","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Include sub grids","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Include images","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"invert","localized":"","hint":"","ui":"img2img"},
- {"id":"","label":"Init image same as control","localized":"","hint":"Will additionally treat any image placed into the Control input window as a source for img2img type tasks, an image to modify for example.","ui":"control"},
- {"id":"","label":"Inpaint masked only","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Invert mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"IOU","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Init strength","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Input directory","localized":"","hint":"Folder where the images are that you want to process","ui":"extras"},
- {"id":"","label":"Intermediates","localized":"","hint":"Size of the intermediate candidate pool when matching image features to descriptive tags (flavours). From this pool, the final tags are selected based on Min/Max Flavors. Higher values may improve quality but are slower.","ui":"caption"},
- {"id":"","label":"Include rating","localized":"","hint":"Include content rating tags in the output (e.g., safe, questionable, explicit). Useful for filtering or categorizing images by their content rating.","ui":"caption"},
- {"id":"","label":"Image width","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"Image height","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"inference-mode","localized":"","hint":"Like no-grad but stricter. Ensures model runs only in inference mode for safety and speed.","ui":"settings_backends"},
- {"id":"","label":"inductor","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Image quality","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Include mask in outputs","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Include invisible watermark","localized":"","hint":"Add invisible watermark to image by altering some pixel values","ui":"settings_saving-images"},
- {"id":"","label":"Invisible watermark string","localized":"","hint":"Watermark string to add to image. Keep very short to avoid image corruption.","ui":"settings_saving-images"},
- {"id":"","label":"Image watermark position","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Image watermark file","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Images filename pattern","localized":"","hint":"Use following tags to define how filenames for images are chosen:seq, uuid date, datetime, job_timestamp generation_number, batch_number model, model_shortname model_hash, model_name sampler, seed, steps, cfg clip_skip, denoising hasprompt, prompt, styles prompt_hash, prompt_no_styles prompt_spaces, prompt_words height, width, image_hash ","ui":"settings_saving-paths"},
- {"id":"","label":"inline","localized":"","hint":"inline with all additional elements (scrollable)","ui":"settings_ui"},
- {"id":"","label":"Inpainting include greyscale mask in results","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Inpainting include masked composite in results","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Image transparent color fill","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Inpainting conditioning mask strength","localized":"","hint":"Determines how strongly to mask off the original image for inpainting and img2img. 1.0 means fully masked (default). 0.0 means a fully unmasked conditioning. Lower values will help preserve the overall composition of the image, but will struggle with large changes","ui":"settings_postprocessing"},
- {"id":"","label":"Image resize algorithm","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Image repeats per epoch","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Interpolation Method","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"In Blocks","localized":"","hint":"Downsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)","ui":"component-5574"},
- {"id":"","label":"Input model","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Info object","localized":"","hint":"","ui":"component-8625"}
+ "i": [
+ {"id":"control_nav","label":"Images","localized":"","hint":"Create images Unified interface Supports T2I and I2I With optional control guidance"},
+ {"id":"img2img_nav","label":"I2I","localized":"","hint":"Create image from image Legacy interface that mimics original image-to-image interface and behavior"},
+ {"id":"img2img_results_input_mobile","label":"Input","localized":"","hint":"Show/hide selection of input media used to guide generation","ui":"img2img"},
+ {"id":"","label":"Image","localized":"","hint":"Create image from image","ui":"img2img"},
+ {"id":"","label":"Inpaint","localized":"","hint":"","ui":"img2img"},
+ {"id":"control_params_mask","label":"Inputs","localized":"","hint":"Settings related to Input images","ui":"control"},
+ {"id":"","label":"Initial","localized":"","hint":"Set image resolution before processing","ui":"control"},
+ {"id":"btn_info","label":"Info","localized":"","hint":""},
+ {"id":"","label":"install","localized":"","hint":"","ui":"component-8724"},
+ {"id":"","label":"Image Options","localized":"","hint":"Settings related to image format, metadata, and image grids"},
+ {"id":"","label":"Image Paths","localized":"","hint":"Settings related to image filenames, and output directories"},
+ {"id":"","label":"Image Metadata","localized":"","hint":"Settings related to handling of metadata that is created with generated images"},
+ {"id":"","label":"IP Adapters","localized":"","hint":"IP adapters are plugin models that can guide generation towards desired outcome","ui":"txt2img"},
+ {"id":"","label":"Input Media","localized":"","hint":"Add input image to be used for image-to-image, inpaint or control processing","ui":"control"},
+ {"id":"","label":"Input Image","localized":"","hint":"","ui":"caption"},
+ {"id":"","label":"IPEX","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"Image Gallery","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Intermediate Image Saving","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Initial seed","localized":"","hint":"A value that determines the output of random number generator - if you create an image with same parameters and seed as another image, you'll get the same result","ui":"txt2img"},
+ {"id":"","label":"Include detections","localized":"","hint":"Include original image with detected areas marked","ui":"txt2img"},
+ {"id":"","label":"IY model","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"IY scale","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"IY start","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"IY end","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"Identity guidance","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"Iterate seed per line","localized":"","hint":"","ui":"script_prompts_from_file"},
+ {"id":"","label":"Iterations","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Interpolate frames","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Include main grid","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Include sub grids","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Include images","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"invert","localized":"","hint":"","ui":"img2img"},
+ {"id":"","label":"Init image same as control","localized":"","hint":"Will additionally treat any image placed into the Control input window as a source for img2img type tasks, an image to modify for example.","ui":"control"},
+ {"id":"","label":"Inpaint masked only","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Invert mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"IOU","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Init strength","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Input directory","localized":"","hint":"Folder where the images are that you want to process","ui":"extras"},
+ {"id":"","label":"Include rating","localized":"","hint":"Include content rating tags in the output (e.g., safe, questionable, explicit). Useful for filtering or categorizing images by their content rating.","ui":"caption"},
+ {"id":"","label":"inference-mode","localized":"","hint":"Like no-grad but stricter. Ensures model runs only in inference mode for safety and speed.","ui":"settings_backends"},
+ {"id":"","label":"inductor","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Image quality","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Include mask in outputs","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Include invisible watermark","localized":"","hint":"Add invisible watermark to image by altering some pixel values","ui":"settings_saving-images"},
+ {"id":"","label":"Invisible watermark string","localized":"","hint":"Watermark string to add to image. Keep very short to avoid image corruption.","ui":"settings_saving-images"},
+ {"id":"","label":"Image watermark position","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Image watermark file","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Images filename pattern","localized":"","hint":"Use following tags to define how filenames for images are chosen:seq, uuid date, datetime, job_timestamp generation_number, batch_number model, model_shortname model_hash, model_name sampler, seed, steps, cfg clip_skip, denoising hasprompt, prompt, styles prompt_hash, prompt_no_styles prompt_spaces, prompt_words height, width, image_hash ","ui":"settings_saving-paths"},
+ {"id":"","label":"inline","localized":"","hint":"inline with all additional elements (scrollable)","ui":"settings_ui"},
+ {"id":"","label":"Inpainting include greyscale mask in results","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Inpainting include masked composite in results","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Image transparent color fill","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Inpainting conditioning mask strength","localized":"","hint":"Determines how strongly to mask off the original image for inpainting and img2img. 1.0 means fully masked (default). 0.0 means a fully unmasked conditioning. Lower values will help preserve the overall composition of the image, but will struggle with large changes","ui":"settings_postprocessing"},
+ {"id":"","label":"Image resize algorithm","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Image repeats per epoch","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Interpolation Method","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"In Blocks","localized":"","hint":"Downsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)","ui":"component-5674"},
+ {"id":"","label":"Input model","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Info object","localized":"","hint":"","ui":"component-8779"}
],
- "k":
- [
- {"id":"kanvas-change-button","label":"Kanvas change","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Kanvas Settings","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Keep Thinking Trace","localized":"","hint":"Include the model's reasoning process in the final output. Useful for understanding how the model arrived at its answer. Only works with models that support thinking mode.","ui":"script_prompt_enhance"},
- {"id":"","label":"Keep Prefill","localized":"","hint":"Include the prefill text at the beginning of the final output. If disabled, the prefill text used to guide the model is removed from the result.","ui":"script_prompt_enhance"},
- {"id":"","label":"Keep aspect ratio","localized":"","hint":"","ui":"control"}
+ "k": [
+ {"id":"kanvas-change-button","label":"Kanvas change","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Kolors","localized":"","hint":"","ui":"component-106"},
+ {"id":"","label":"Kanvas Settings","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Keep Thinking Trace","localized":"","hint":"Include the model's reasoning process in the final output. Useful for understanding how the model arrived at its answer. Only works with models that support thinking mode.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Keep Prefill","localized":"","hint":"Include the prefill text at the beginning of the final output. If disabled, the prefill text used to guide the model is removed from the result.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Keep aspect ratio","localized":"","hint":"","ui":"control"}
],
- "l":
- [
- {"id":"prompt_enhance_load","label":"Load model","localized":"","hint":"","ui":"script_prompt_enhance"},
- {"id":"prompt_enhance_custom_load","label":"Load custom model","localized":"","hint":"Load a custom model with the specified configuration","ui":"script_prompt_enhance"},
- {"id":"control_mask_remove","label":"LaMa Remove","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Lite","localized":"","hint":"","ui":"control"},
- {"id":"video_params_ltx","label":"LTXVideo","localized":"","hint":"","ui":"video"},
- {"id":"vlm_load","label":"Load","localized":"","hint":"","ui":"caption"},
- {"id":"","label":"Live Previews","localized":"","hint":"Settings related to live previews, audio notification"},
- {"id":"","label":"Legacy options","localized":"","hint":"Settings related to legacy options - should not be used"},
- {"id":"","label":"List","localized":"","hint":"List all available models"},
- {"id":"","label":"Loader","localized":"","hint":"Allows to manually assemble a diffusion model from individual modules"},
- {"id":"component-5502","label":"List models","localized":"","hint":"","ui":"models_list_tab"},
- {"id":"component-5528","label":"Load receipe","localized":"","hint":"","ui":"models_loader_tab"},
- {"id":"","label":"Lora","localized":"","hint":"LoRA: Low-Rank Adaptation. Fine-tuned model that is applied on top of a loaded model"},
- {"id":"","label":"Local","localized":"","hint":"Models that are downlaoded and ready to use","ui":"component-98"},
- {"id":"","label":"LTX","localized":"","hint":"","ui":"tab_video"},
- {"id":"","label":"Layerwise Casting","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"LinFusion","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Log Display","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"List all locally available models","localized":"","hint":"","ui":"models_list_tab"},
- {"id":"","label":"Last Generate","localized":"","hint":""},
- {"id":"","label":"low order","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC layer indices","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC fully qualified name","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC skip attention blocks","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC skip feed-forward blocks","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC skip attention scores","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LSC dropout rate","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Layer options","localized":"","hint":"Manually specify IP adapter advanced layer options","ui":"txt2img"},
- {"id":"","label":"Layer scales","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Length","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
- {"id":"","label":"Loops","localized":"","hint":"How many times to process an image. Each output is used as the input of the next loop. If set to 1, behavior will be as if this script were not used","ui":"script_loopback"},
- {"id":"","label":"Level","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Latent mode","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Loop video","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"LLM model","localized":"","hint":"Select the language model to use for prompt enhancement. Models supporting vision are marked with icon. Models supporting thinking mode are marked with icon.","ui":"script_prompt_enhance"},
- {"id":"","label":"LBM Method","localized":"","hint":"","ui":"script_lbm"},
- {"id":"","label":"LBM Composite","localized":"","hint":"","ui":"script_lbm"},
- {"id":"","label":"LBM Steps","localized":"","hint":"","ui":"script_lbm"},
- {"id":"","label":"left","localized":"","hint":"","ui":"script_outpainting"},
- {"id":"","label":"Live update","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Low threshold","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Large","localized":"","hint":"","ui":"control"},
- {"id":"","label":"LTX model","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX frames number","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX frames skip","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX enable upsampling","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX upsample ratio","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX enable refine","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX refine strength","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX decode timestep","localized":"","hint":"","ui":"video"},
- {"id":"","label":"LTX enable audio","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Loop","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Local directory name","localized":"","hint":"Directory where to install extension, leave blank for default","ui":"component-8593"},
- {"id":"","label":"Libs","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Latent history size","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"LLama repo","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"low noise","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"leaf_level","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"LLM","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Layerwise casting storage","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Layerwise non-blocking operations","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Lumina: Use mask in transformers","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"LinFusion apply distillation on load","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Light","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Log view update period","localized":"","hint":"Log view update period, in milliseconds","ui":"settings_ui"},
- {"id":"","label":"Live preview display period","localized":"","hint":"Request preview image every n steps, set to 0 to disable","ui":"settings_live-preview"},
- {"id":"","label":"Load custom Diffusers pipeline","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"LoRA force reload always","localized":"","hint":"Forces LoRA networks to reload from storage on every generation, even if already cached. Useful for debugging or when LoRA files are being modified externally. Disable for normal use to benefit from caching.","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA load using Diffusers method","localized":"","hint":"Alternative method uses diffusers built-in LoRA capabilities instead of native SD.Next implementation (may reduce LoRA compatibility)","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA native apply to text encoder","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA native fuse with model","localized":"","hint":"Merge LoRA into the model for lower memory usage.Warning: After removing or switching a LoRA, you may still see its style in generated images. To get a clean model, reload it from the model selector.","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA diffusers fuse with model","localized":"","hint":"Merge LoRA into the model for lower memory usage and torch.compile compatibility.Warning: After removing or switching a LoRA, you may still see its style in generated images. To get a clean model, reload it from the model selector.","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA auto-apply tags","localized":"","hint":"Automatically add trigger words/tags from LoRA metadata to your prompt. Set to the number of tags to auto-apply, e.g., 3 = add top 3 trigger tags. Set to 0 to disable, -1 to add all available tags.","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA memory cache","localized":"","hint":"How many LoRAs to keep in network for future use before requiring reloading from storage","ui":"settings_extra_networks"},
- {"id":"","label":"LoRA add hash info to metadata","localized":"","hint":"Include LoRA file hashes in generated image metadata. Useful for reproducibility and tracking which exact LoRA versions were used.","ui":"settings_extra_networks"},
- {"id":"","label":"LDSR Path","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"LoRA load using legacy method","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Loaded LoRA","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"LoRA target filename","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"Layer skip guidance","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"LineArt","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Leres Depth","localized":"","hint":"","ui":"control"}
+ "l": [
+ {"id":"prompt_enhance_load","label":"Load model","localized":"","hint":"","ui":"script_prompt_enhance"},
+ {"id":"prompt_enhance_custom_load","label":"Load custom model","localized":"","hint":"Load a custom model with the specified configuration","ui":"script_prompt_enhance"},
+ {"id":"control_mask_remove","label":"LaMa Remove","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Lite","localized":"","hint":"","ui":"control"},
+ {"id":"video_params_ltx","label":"LTXVideo","localized":"","hint":"","ui":"video"},
+ {"id":"vlm_load","label":"Load","localized":"","hint":"","ui":"caption"},
+ {"id":"","label":"Live Previews","localized":"","hint":"Settings related to live previews, audio notification"},
+ {"id":"","label":"Legacy options","localized":"","hint":"Settings related to legacy options - should not be used"},
+ {"id":"","label":"List","localized":"","hint":"List all available models"},
+ {"id":"","label":"Loader","localized":"","hint":"Allows to manually assemble a diffusion model from individual modules"},
+ {"id":"component-5602","label":"List models","localized":"","hint":"","ui":"models_list_tab"},
+ {"id":"component-5628","label":"Load receipe","localized":"","hint":"","ui":"models_loader_tab"},
+ {"id":"","label":"Lora","localized":"","hint":"LoRA: Low-Rank Adaptation. Fine-tuned model that is applied on top of a loaded model"},
+ {"id":"","label":"Local","localized":"","hint":"Models that are downlaoded and ready to use","ui":"component-98"},
+ {"id":"","label":"LTX","localized":"","hint":"","ui":"tab_video"},
+ {"id":"","label":"Latent Corrections","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Layerwise Casting","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"LinFusion","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Log Display","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"List all locally available models","localized":"","hint":"","ui":"models_list_tab"},
+ {"id":"","label":"Last Generate","localized":"","hint":""},
+ {"id":"","label":"LUT","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"low order","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC layer indices","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC fully qualified name","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC skip attention blocks","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC skip feed-forward blocks","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC skip attention scores","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LSC dropout rate","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LUT strength","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Latent brightness","localized":"","hint":"Increase or deacrease brightness directly in latent space during generation","ui":"txt2img"},
+ {"id":"","label":"Latent sharpen","localized":"","hint":"Increase or decrease sharpness directly in latent space during generation","ui":"txt2img"},
+ {"id":"","label":"Latent color","localized":"","hint":"Adjust the color balance directly in latent space during generation","ui":"txt2img"},
+ {"id":"","label":"Latent clamp","localized":"","hint":"Adjusts the level of nonsensical details by pruning values that deviate significantly from the distribution mean. It is particularly useful for enhancing generation at higher guidance scales, identifying outliers early in the process and applying mathematical adjustments based on the Range (Boundary) and Threshold settings. Think of it as setting the range within which you want your image values to be, and adjusting the threshold determines which values should be brought back into that range","ui":"txt2img"},
+ {"id":"","label":"Latent range","localized":"","hint":"Set the range for latent values during generation","ui":"txt2img"},
+ {"id":"","label":"Latent threshold","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Latent maximize","localized":"","hint":"Calculates a 'normalization factor' by dividing the maximum tensor value by the specified range multiplied by 4. This factor is then used to shift the channels within the given boundary, ensuring maximum dynamic range for subsequent processing. The objective is to optimize dynamic range for external applications like Photoshop, particularly for adjusting levels, contrast, and brightness","ui":"txt2img"},
+ {"id":"","label":"Latent center","localized":"","hint":"Adjust the center of the latent space during generation","ui":"txt2img"},
+ {"id":"","label":"Latent max range","localized":"","hint":"Set the maximum range for latent values during generation","ui":"txt2img"},
+ {"id":"","label":"Latent tint","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Layer options","localized":"","hint":"Manually specify IP adapter advanced layer options","ui":"txt2img"},
+ {"id":"","label":"Layer scales","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Length","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
+ {"id":"","label":"Loops","localized":"","hint":"How many times to process an image. Each output is used as the input of the next loop. If set to 1, behavior will be as if this script were not used","ui":"script_loopback"},
+ {"id":"","label":"Level","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Latent mode","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Loop video","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"LLM model","localized":"","hint":"Select the language model to use for prompt enhancement. Models supporting vision are marked with icon. Models supporting thinking mode are marked with icon.","ui":"script_prompt_enhance"},
+ {"id":"","label":"LBM Method","localized":"","hint":"","ui":"script_lbm"},
+ {"id":"","label":"LBM Composite","localized":"","hint":"","ui":"script_lbm"},
+ {"id":"","label":"LBM Steps","localized":"","hint":"","ui":"script_lbm"},
+ {"id":"","label":"left","localized":"","hint":"","ui":"script_outpainting"},
+ {"id":"","label":"Live update","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Low threshold","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Large","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"LTX model","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX frames number","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX frames skip","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX enable upsampling","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX upsample ratio","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX enable refine","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX refine strength","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX decode timestep","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"LTX enable audio","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Loop","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Local directory name","localized":"","hint":"Directory where to install extension, leave blank for default","ui":"component-8746"},
+ {"id":"","label":"Libs","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Latent history size","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"LLama repo","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"low noise","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Load caption models direct to GPU","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"leaf_level","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"LLM","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Layerwise casting storage","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Layerwise non-blocking operations","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Lumina: Use mask in transformers","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Listen on all interfaces","localized":"","hint":"","ui":"settings_server"},
+ {"id":"","label":"LinFusion apply distillation on load","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Light","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Log view update period","localized":"","hint":"Log view update period, in milliseconds","ui":"settings_ui"},
+ {"id":"","label":"Live preview display period","localized":"","hint":"Request preview image every n steps, set to 0 to disable","ui":"settings_live-preview"},
+ {"id":"","label":"Load custom Diffusers pipeline","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"LoRA force reload always","localized":"","hint":"Forces LoRA networks to reload from storage on every generation, even if already cached. Useful for debugging or when LoRA files are being modified externally. Disable for normal use to benefit from caching.","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA load using Diffusers method","localized":"","hint":"Alternative method uses diffusers built-in LoRA capabilities instead of native SD.Next implementation (may reduce LoRA compatibility)","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA native apply to text encoder","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA native fuse with model","localized":"","hint":"Merge LoRA into the model for lower memory usage.Warning: After removing or switching a LoRA, you may still see its style in generated images. To get a clean model, reload it from the model selector.","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA diffusers fuse with model","localized":"","hint":"Merge LoRA into the model for lower memory usage and torch.compile compatibility.Warning: After removing or switching a LoRA, you may still see its style in generated images. To get a clean model, reload it from the model selector.","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA auto-apply tags","localized":"","hint":"Automatically add trigger words/tags from LoRA metadata to your prompt. Set to the number of tags to auto-apply, e.g., 3 = add top 3 trigger tags. Set to 0 to disable, -1 to add all available tags.","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA memory cache","localized":"","hint":"How many LoRAs to keep in network for future use before requiring reloading from storage","ui":"settings_extra_networks"},
+ {"id":"","label":"LoRA add hash info to metadata","localized":"","hint":"Include LoRA file hashes in generated image metadata. Useful for reproducibility and tracking which exact LoRA versions were used.","ui":"settings_extra_networks"},
+ {"id":"","label":"LDSR Path","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"LoRA load using legacy method","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Loaded LoRA","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"LoRA target filename","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"Layer skip guidance","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"LineArt","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Leres Depth","localized":"","hint":"","ui":"control"}
],
- "m":
- [
- {"id":"","label":"Mask","localized":"","hint":"Image masking and mask options","ui":"control"},
- {"id":"video_params_generic","label":"Models","localized":"","hint":"Download, convert or merge your models and manage models metadata","ui":"video"},
- {"id":"","label":"Manage extensions","localized":"","hint":""},
- {"id":"","label":"Manual install","localized":"","hint":"Manually install extension"},
- {"id":"","label":"Models & Networks","localized":"","hint":"View lists of all available models and networks"},
- {"id":"","label":"Model Loading","localized":"","hint":"Settings related to how model is loaded"},
- {"id":"","label":"Model Options","localized":"","hint":"Settings related to behavior of specific models"},
- {"id":"","label":"Model Offloading","localized":"","hint":"Settings related to model offloading and memory management"},
- {"id":"","label":"Model Quantization","localized":"","hint":"Settings related to model quantization which is used to reduce memory usage"},
- {"id":"","label":"Model Compile","localized":"","hint":"Settings related to different model compilation methods"},
- {"id":"","label":"Metadata","localized":"","hint":"Update metadata for all available models"},
- {"id":"","label":"Merge","localized":"","hint":"Merge two or more models into a new model"},
- {"id":"","label":"Manual Block Merge","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"component-5688","label":"Merge Modules","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Model","localized":"","hint":"Base model"},
- {"id":"","label":"Model metadata","localized":"","hint":""},
- {"id":"","label":"ModernUI","localized":"","hint":""},
- {"id":"","label":"Modular Pipelines","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Models Paths","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Mobile","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Merge multiple models","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Max shift","localized":"","hint":"Maximum shift value for high resolutions when using dynamic shifting.","ui":"txt2img"},
- {"id":"","label":"Merge detailers","localized":"","hint":"Merge results from multiple detailers into single mask before running detailing process","ui":"txt2img"},
- {"id":"","label":"Max detected","localized":"","hint":"Maximum number of detected objects to run detailer on","ui":"txt2img"},
- {"id":"","label":"Min confidence","localized":"","hint":"Minimum confidence in detected item","ui":"txt2img"},
- {"id":"","label":"Max overlap","localized":"","hint":"Maximum overlap between two detected items before one is discarded","ui":"txt2img"},
- {"id":"","label":"Min size","localized":"","hint":"Minimum size of detected object as percentage of overal image","ui":"txt2img"},
- {"id":"","label":"Max size","localized":"","hint":"Maximum size of detected object as percentage of overal image","ui":"txt2img"},
- {"id":"","label":"Max Range","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Momentum","localized":"","hint":"","ui":"script_apg"},
- {"id":"","label":"Mode x-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
- {"id":"","label":"Mode y-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
- {"id":"","label":"Mask Dropout","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Multi decoder","localized":"","hint":"","ui":"script_demofusion"},
- {"id":"","label":"Mode","localized":"","hint":"Interrogation mode.Fast : Quick caption with minimal flavor terms.Classic : Standard interrogation with balanced quality and speed.Best : Most thorough analysis, slowest but highest quality.Negative : Generate terms to use as negative prompt.","ui":"script_face"},
- {"id":"","label":"Method","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Model repo","localized":"","hint":"HuggingFace repository ID for the model","ui":"script_prompt_enhance"},
- {"id":"","label":"Model gguf","localized":"","hint":"Optional GGUF quantized model repository on HuggingFace","ui":"script_prompt_enhance"},
- {"id":"","label":"Model type","localized":"","hint":"Optional GGUF model quantization type","ui":"script_prompt_enhance"},
- {"id":"","label":"Model file","localized":"","hint":"Optional specific GGUF model file inside the repository","ui":"script_prompt_enhance"},
- {"id":"","label":"Max tokens","localized":"","hint":"Maximum number of tokens the model can generate in its response. The model is not aware of this limit during generation and it won't make the model try to generate more detailed or more concise responses, it simply sets the hard limit for the length, and will forcefully cut off the response when the limit is reached.","ui":"script_prompt_enhance"},
- {"id":"","label":"masked","localized":"","hint":"","ui":"img2img"},
- {"id":"","label":"Mask invert","localized":"","hint":"","ui":"script_differential_diffusion"},
- {"id":"","label":"Mask strength","localized":"","hint":"","ui":"script_differential_diffusion"},
- {"id":"","label":"Multistep restore","localized":"","hint":"","ui":"script_instantir"},
- {"id":"","label":"Mask blur","localized":"","hint":"How much to blur the mask before processing, in pixels","ui":"script_outpainting"},
- {"id":"","label":"Min guidance","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Max guidance","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Motion level","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Mode after","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Method after","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Mode mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Method mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Maximum units","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Max faces","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Medium","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Merge alpha","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Mask only","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Max Length","localized":"","hint":"Maximum number of tokens in the generated caption.","ui":"caption"},
- {"id":"","label":"Min Flavors","localized":"","hint":"Minimum number of descriptive tags (flavors) to keep in the final prompt.","ui":"caption"},
- {"id":"","label":"Max Flavors","localized":"","hint":"Maximum number of descriptive tags (flavors) to keep in the final prompt.","ui":"caption"},
- {"id":"","label":"Max tags","localized":"","hint":"Maximum number of tags to include in the output. Limits the result length when an image has many detected features. Tags are sorted by confidence, so the most relevant ones are kept.","ui":"caption"},
- {"id":"","label":"Memory","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Memory optimization","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Model Info","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Model pipeline","localized":"","hint":"If autodetect does not detect model automatically, select model type before loading a model","ui":"settings_sd"},
- {"id":"","label":"Model auto-load on start","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Model load using multiple threads","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Model auto-download on demand","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Model load using streams","localized":"","hint":"When loading models attempt stream loading optimized for slow or network storage","ui":"settings_sd"},
- {"id":"","label":"Model load model direct to GPU","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Model types not to offload","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Modules to always offload","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Modules to never offload","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Model types not to quantize","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Modules to not convert","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Modules dtype dict","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Math","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"Memory limit","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"migraphx","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"max-autotune","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"max-autotune-no-cudagraphs","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Maximum image size (MP)","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Max words","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Modern","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Mount URL subpath","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Mobile scale","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Move detailer model to CPU when complete","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Move base model to CPU when using refiner","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Move base model to CPU when using VAE","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Move refiner model to CPU when not in use","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Move VAE and CLIP to RAM when training","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Model name","localized":"","hint":"","ui":"models_current_tab"},
- {"id":"","label":"Model base path","localized":"","hint":"","ui":"models_current_tab"},
- {"id":"","label":"Max shard size","localized":"","hint":"","ui":"models_current_tab"},
- {"id":"","label":"Model class","localized":"","hint":"","ui":"models_loader_tab"},
- {"id":"","label":"Mid Block","localized":"","hint":"Central Block of the UNet (1 value)","ui":"component-5574"},
- {"id":"","label":"Model precision","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Maximum rank","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"Midas depth","localized":"","hint":"","ui":"control"},
- {"id":"","label":"MLSD","localized":"","hint":"","ui":"control"},
- {"id":"","label":"MediaPipe Face","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Marigold Depth","localized":"","hint":"","ui":"control"}
+ "m": [
+ {"id":"","label":"Mask","localized":"","hint":"Image masking and mask options","ui":"control"},
+ {"id":"video_params_generic","label":"Models","localized":"","hint":"Download, convert or merge your models and manage models metadata","ui":"video"},
+ {"id":"","label":"Manage extensions","localized":"","hint":""},
+ {"id":"","label":"Manual install","localized":"","hint":"Manually install extension"},
+ {"id":"","label":"Models & Networks","localized":"","hint":"View lists of all available models and networks"},
+ {"id":"","label":"Model Loading","localized":"","hint":"Settings related to how model is loaded"},
+ {"id":"","label":"Model Options","localized":"","hint":"Settings related to behavior of specific models"},
+ {"id":"","label":"Model Offloading","localized":"","hint":"Settings related to model offloading and memory management"},
+ {"id":"","label":"Model Quantization","localized":"","hint":"Settings related to model quantization which is used to reduce memory usage"},
+ {"id":"","label":"Model Compile","localized":"","hint":"Settings related to different model compilation methods"},
+ {"id":"","label":"Metadata","localized":"","hint":"Update metadata for all available models"},
+ {"id":"","label":"Merge","localized":"","hint":"Merge two or more models into a new model"},
+ {"id":"","label":"Manual Block Merge","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"component-5788","label":"Merge Modules","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Model","localized":"","hint":"Base model"},
+ {"id":"","label":"Model metadata","localized":"","hint":""},
+ {"id":"","label":"ModernUI","localized":"","hint":""},
+ {"id":"","label":"Modular Pipelines","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Models Paths","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Mobile","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Merge multiple models","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Max shift","localized":"","hint":"Maximum shift value for high resolutions when using dynamic shifting.","ui":"txt2img"},
+ {"id":"","label":"Merge detailers","localized":"","hint":"Merge results from multiple detailers into single mask before running detailing process","ui":"txt2img"},
+ {"id":"","label":"Max detected","localized":"","hint":"Maximum number of detected objects to run detailer on","ui":"txt2img"},
+ {"id":"","label":"Min confidence","localized":"","hint":"Minimum confidence in detected item","ui":"txt2img"},
+ {"id":"","label":"Max overlap","localized":"","hint":"Maximum overlap between two detected items before one is discarded","ui":"txt2img"},
+ {"id":"","label":"Min size","localized":"","hint":"Minimum size of detected object as percentage of overal image","ui":"txt2img"},
+ {"id":"","label":"Max size","localized":"","hint":"Maximum size of detected object as percentage of overal image","ui":"txt2img"},
+ {"id":"","label":"Midtones","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Momentum","localized":"","hint":"","ui":"script_apg"},
+ {"id":"","label":"Mode x-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
+ {"id":"","label":"Mode y-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
+ {"id":"","label":"Mask Dropout","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Multi decoder","localized":"","hint":"","ui":"script_demofusion"},
+ {"id":"","label":"Mode","localized":"","hint":"Interrogation mode.Fast : Quick caption with minimal flavor terms.Classic : Standard interrogation with balanced quality and speed.Best : Most thorough analysis, slowest but highest quality.Negative : Generate terms to use as negative prompt.","ui":"script_face"},
+ {"id":"","label":"Method","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Model repo","localized":"","hint":"HuggingFace repository ID for the model","ui":"script_prompt_enhance"},
+ {"id":"","label":"Model gguf","localized":"","hint":"Optional GGUF quantized model repository on HuggingFace","ui":"script_prompt_enhance"},
+ {"id":"","label":"Model type","localized":"","hint":"Optional GGUF model quantization type","ui":"script_prompt_enhance"},
+ {"id":"","label":"Model file","localized":"","hint":"Optional specific GGUF model file inside the repository","ui":"script_prompt_enhance"},
+ {"id":"","label":"Max tokens","localized":"","hint":"Maximum number of tokens the model can generate in its response. The model is not aware of this limit during generation and it won't make the model try to generate more detailed or more concise responses, it simply sets the hard limit for the length, and will forcefully cut off the response when the limit is reached.","ui":"script_prompt_enhance"},
+ {"id":"","label":"masked","localized":"","hint":"","ui":"img2img"},
+ {"id":"","label":"Mask invert","localized":"","hint":"","ui":"script_differential_diffusion"},
+ {"id":"","label":"Mask strength","localized":"","hint":"","ui":"script_differential_diffusion"},
+ {"id":"","label":"Multistep restore","localized":"","hint":"","ui":"script_instantir"},
+ {"id":"","label":"Mask blur","localized":"","hint":"How much to blur the mask before processing, in pixels","ui":"script_outpainting"},
+ {"id":"","label":"Min guidance","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Max guidance","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Motion level","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Mode after","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Method after","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Mode mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Method mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Maximum units","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Max faces","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Medium","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Merge alpha","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Mask only","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Max tags","localized":"","hint":"Maximum number of tags to include in the output. Limits the result length when an image has many detected features. Tags are sorted by confidence, so the most relevant ones are kept.","ui":"caption"},
+ {"id":"","label":"Memory","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Memory optimization","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Model Info","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Model pipeline","localized":"","hint":"If autodetect does not detect model automatically, select model type before loading a model","ui":"settings_sd"},
+ {"id":"","label":"Model auto-load on start","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Model load using multiple threads","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Model auto-download on demand","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Model load using streams","localized":"","hint":"When loading models attempt stream loading optimized for slow or network storage","ui":"settings_sd"},
+ {"id":"","label":"Model load model direct to GPU","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Model types not to offload","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Modules to always offload","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Modules to never offload","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Model types not to quantize","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Modules to not convert","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Modules dtype dict","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Math","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"Memory limit","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"migraphx","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"max-autotune","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"max-autotune-no-cudagraphs","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Maximum image size (MP)","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Max words","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Modern","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Mount URL subpath","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Mobile scale","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Move detailer model to CPU when complete","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Move base model to CPU when using refiner","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Move base model to CPU when using VAE","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Move refiner model to CPU when not in use","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Move VAE and CLIP to RAM when training","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Model name","localized":"","hint":"","ui":"models_current_tab"},
+ {"id":"","label":"Model base path","localized":"","hint":"","ui":"models_current_tab"},
+ {"id":"","label":"Max shard size","localized":"","hint":"","ui":"models_current_tab"},
+ {"id":"","label":"Model class","localized":"","hint":"","ui":"models_loader_tab"},
+ {"id":"","label":"Mid Block","localized":"","hint":"Central Block of the UNet (1 value)","ui":"component-5674"},
+ {"id":"","label":"Model precision","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Maximum rank","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"Midas depth","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"MLSD","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"MediaPipe Face","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Marigold Depth","localized":"","hint":"","ui":"control"}
],
- "n":
- [
- {"id":"btn_extra_networks","label":"Networks","localized":"","hint":"Networks user interface"},
- {"id":"","label":"New row","localized":"","hint":"","ui":"models_loader_tab"},
- {"id":"","label":"New column","localized":"","hint":"","ui":"models_loader_tab"},
- {"id":"","label":"Nunchaku","localized":"","hint":"","ui":"component-98"},
- {"id":"","label":"nsfw","localized":"","hint":"","ui":"component-104"},
- {"id":"","label":"NudeNet","localized":"","hint":"Flexible extension that can detect and obfustate nudity in images","ui":"extras"},
- {"id":"","label":"Nunchaku Engine","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"NNCF: Neural Network Compression Framework","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Noise Options","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"Networks panel","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Networks UI","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Networks Scan","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Negative prompt","localized":"","hint":"Describe what you don't want to see in generated image","ui":"txt2img"},
- {"id":"","label":"Number","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"negative","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"None","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"NSFW allowed","localized":"","hint":"Allow the model to generate adult content in enhanced prompts","ui":"script_prompt_enhance"},
- {"id":"","label":"Noise strength","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"NMS","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Near threshold","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Noise scale","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Note","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"Non-blocking move operations","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Nunchaku attention","localized":"","hint":"Replaces default attention with Nunchaku's custom FP16 attention kernel for faster inference on consumer NVIDIA GPUs. Might provide performance improvement on GPUs which have higher FP16 tensor cores throughput than BF16. Currently only affects Flux-based models (Dev, Schnell, Kontext, Fill, Depth, etc.). Has no effect on Qwen, SDXL, Sana, or other architectures. Disabled by default.","ui":"settings_quantization"},
- {"id":"","label":"Nunchaku offloading","localized":"","hint":"Enables Nunchaku's own per-block CPU offloading with asynchronous CUDA streams to reduce VRAM usage. Uses a ping-pong buffer strategy: while one transformer block computes on GPU, the next block preloads from CPU in the background, hiding most of the transfer latency. Can reduce VRAM usage at the cost of slower inference. This replaces SD.Next's pipeline offloading for the transformer component. Only useful on low-VRAM GPUs. If your GPU has enough memory to hold the quantized model (16+ GB), keep this disabled for maximum speed. Supports Flux and Qwen models. Not supported for SDXL where this setting is ignored. Disabled by default.","ui":"settings_quantization"},
- {"id":"","label":"native","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"no-grad","localized":"","hint":"Disables gradient tracking with torch.no_grad. Reduces memory usage and speeds up inference.","ui":"settings_backends"},
- {"id":"","label":"Numbered filenames","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Network card size (px)","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Noise multiplier for image processing","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"New model name","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Number of ReBasin Iterations","localized":"","hint":"Number of times to merge and permute the model before saving","ui":"models_merge_tab"},
- {"id":"","label":"Network prompt","localized":"","hint":""},
- {"id":"","label":"Network negative prompt","localized":"","hint":""},
- {"id":"","label":"Network parameters","localized":"","hint":""}
+ "n": [
+ {"id":"btn_extra_networks","label":"Networks","localized":"","hint":"Networks user interface"},
+ {"id":"","label":"New row","localized":"","hint":"","ui":"models_loader_tab"},
+ {"id":"","label":"New column","localized":"","hint":"","ui":"models_loader_tab"},
+ {"id":"","label":"Nunchaku","localized":"","hint":"","ui":"component-98"},
+ {"id":"","label":"NudeNet","localized":"","hint":"Flexible extension that can detect and obfustate nudity in images","ui":"extras"},
+ {"id":"","label":"Nunchaku Engine","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"NNCF: Neural Network Compression Framework","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Noise Options","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"Networks panel","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Networks UI","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Networks Scan","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Negative prompt","localized":"","hint":"Describe what you don't want to see in generated image","ui":"txt2img"},
+ {"id":"","label":"Number","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"negative","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"None","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"NSFW allowed","localized":"","hint":"Allow the model to generate adult content in enhanced prompts","ui":"script_prompt_enhance"},
+ {"id":"","label":"Noise strength","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"NMS","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Near threshold","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Noise scale","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Note","localized":"","hint":"","ui":"component-8823"},
+ {"id":"","label":"Non-blocking move operations","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Nunchaku attention","localized":"","hint":"Replaces default attention with Nunchaku's custom FP16 attention kernel for faster inference on consumer NVIDIA GPUs. Might provide performance improvement on GPUs which have higher FP16 tensor cores throughput than BF16. Currently only affects Flux-based models (Dev, Schnell, Kontext, Fill, Depth, etc.). Has no effect on Qwen, SDXL, Sana, or other architectures. Disabled by default.","ui":"settings_quantization"},
+ {"id":"","label":"Nunchaku offloading","localized":"","hint":"Enables Nunchaku's own per-block CPU offloading with asynchronous CUDA streams to reduce VRAM usage. Uses a ping-pong buffer strategy: while one transformer block computes on GPU, the next block preloads from CPU in the background, hiding most of the transfer latency. Can reduce VRAM usage at the cost of slower inference. This replaces SD.Next's pipeline offloading for the transformer component. Only useful on low-VRAM GPUs. If your GPU has enough memory to hold the quantized model (16+ GB), keep this disabled for maximum speed. Supports Flux and Qwen models. Not supported for SDXL where this setting is ignored. Disabled by default.","ui":"settings_quantization"},
+ {"id":"","label":"native","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"no-grad","localized":"","hint":"Disables gradient tracking with torch.no_grad. Reduces memory usage and speeds up inference.","ui":"settings_backends"},
+ {"id":"","label":"Numbered filenames","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Network card size (px)","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Noise multiplier for image processing","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"New model name","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Number of ReBasin Iterations","localized":"","hint":"Number of times to merge and permute the model before saving","ui":"models_merge_tab"},
+ {"id":"","label":"Network prompt","localized":"","hint":""},
+ {"id":"","label":"Network negative prompt","localized":"","hint":""},
+ {"id":"","label":"Network parameters","localized":"","hint":""}
],
- "o":
- [
- {"id":"txt2img_results_mobile","label":"Output","localized":"","hint":"Show/hide selection of output media: generation resuls and live previews during generation process","ui":"txt2img"},
- {"id":"","label":"OpenCLiP","localized":"","hint":"Analyze image using CLiP model via OpenCLiP","ui":"caption"},
- {"id":"","label":"ONNX","localized":"","hint":""},
- {"id":"","label":"Override","localized":"","hint":"Override settings that can change server behavior and are typically applied from imported image metadata","ui":"txt2img"},
- {"id":"","label":"Optimum Quanto","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Optimum Quanto: post-load","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Optional","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Olive","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"OpenVINO","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Other...","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Outputs & Images","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Override settings","localized":"","hint":"If generation parameters deviate from your system settings override settings populated with those settings to override your system configuration for this workflow","ui":"txt2img"},
- {"id":"","label":"Override sampler","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Override steps","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Ortho","localized":"","hint":"","ui":"script_pulid"},
- {"id":"","label":"Offload face module","localized":"","hint":"","ui":"script_pulid"},
- {"id":"","label":"Override scheduler","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Optional image description","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Order","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Overlay","localized":"","hint":"","ui":"script_nudenet"},
- {"id":"","label":"Override resolution","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Offload processor","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Output directory","localized":"","hint":"Folder where the processed images should be saved to","ui":"extras"},
- {"id":"","label":"original","localized":"","hint":"Original LDM backend","ui":"settings_sd"},
- {"id":"","label":"Offload caption models","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload during pre-forward","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload using streams","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload low watermark","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload GPU high watermark","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload CPU high watermark","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Offload blocks","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"OpenVINO activations mode","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"ONNX Execution Provider","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"ONNX allow fallback to CPU","localized":"","hint":"Allow fallback to CPU when selected execution provider failed","ui":"settings_backends"},
- {"id":"","label":"ONNX cache converted models","localized":"","hint":"Save the models that are converted to ONNX format as a cache. You can manage them in ONNX tab","ui":"settings_backends"},
- {"id":"","label":"ONNX unload base model when processing refiner","localized":"","hint":"Unload base model when the refiner is being converted/optimized/processed","ui":"settings_backends"},
- {"id":"","label":"Olive use FP16 on optimization","localized":"","hint":"Use 16-bit floating point precision for the output model of Olive optimization process. Use 32-bit floating point precision if disabled","ui":"settings_backends"},
- {"id":"","label":"Olive force FP32 for VAE Encoder","localized":"","hint":"Use 32-bit floating point precision for VAE Encoder of the output model. This overrides 'use FP16 on optimization' option. If you are getting NaN or black blank images from Img2Img, enable this option and remove cache","ui":"settings_backends"},
- {"id":"","label":"Olive use static dimensions","localized":"","hint":"Make the inference with Olive optimized models much faster. (OrtTransformersOptimization)","ui":"settings_backends"},
- {"id":"","label":"Olive cache optimized models","localized":"","hint":"Save Olive processed models as a cache. You can manage them in ONNX tab","ui":"settings_backends"},
- {"id":"","label":"OpenVINO disable model caching","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"OpenVINO disable memory cleanup after compile","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"onediff","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"olive-ai","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"openvino_fx","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Overwrite existing","localized":"","hint":"","ui":"models_current_tab"},
- {"id":"","label":"Out Block","localized":"","hint":"Upsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)","ui":"component-5574"},
- {"id":"","label":"Overwrite model","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Output model","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Overwrite existing file","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"Options","localized":"","hint":"","ui":"script_prompt_enhance"},
- {"id":"","label":"OpenBody","localized":"","hint":"","ui":"control"}
+ "o": [
+ {"id":"txt2img_results_mobile","label":"Output","localized":"","hint":"Show/hide selection of output media: generation resuls and live previews during generation process","ui":"txt2img"},
+ {"id":"","label":"OpenCLiP","localized":"","hint":"Analyze image using CLiP model via OpenCLiP","ui":"caption"},
+ {"id":"","label":"ONNX","localized":"","hint":""},
+ {"id":"","label":"Override","localized":"","hint":"Override settings that can change server behavior and are typically applied from imported image metadata","ui":"txt2img"},
+ {"id":"","label":"Optimum Quanto","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Optimum Quanto: post-load","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Optional","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Olive","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"OpenVINO","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"Other...","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Outputs & Images","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Override settings","localized":"","hint":"If generation parameters deviate from your system settings override settings populated with those settings to override your system configuration for this workflow","ui":"txt2img"},
+ {"id":"","label":"Override sampler","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Override steps","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Ortho","localized":"","hint":"","ui":"script_pulid"},
+ {"id":"","label":"Offload face module","localized":"","hint":"","ui":"script_pulid"},
+ {"id":"","label":"Override scheduler","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Optional image description","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Order","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Overlay","localized":"","hint":"","ui":"script_nudenet"},
+ {"id":"","label":"Override resolution","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Offload processor","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Output directory","localized":"","hint":"Folder where the processed images should be saved to","ui":"extras"},
+ {"id":"","label":"original","localized":"","hint":"Original LDM backend","ui":"settings_sd"},
+ {"id":"","label":"Offload caption models","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload during pre-forward","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload using streams","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload low watermark","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload GPU high watermark","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload CPU high watermark","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Offload blocks","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"OpenVINO activations mode","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"ONNX Execution Provider","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"ONNX allow fallback to CPU","localized":"","hint":"Allow fallback to CPU when selected execution provider failed","ui":"settings_backends"},
+ {"id":"","label":"ONNX cache converted models","localized":"","hint":"Save the models that are converted to ONNX format as a cache. You can manage them in ONNX tab","ui":"settings_backends"},
+ {"id":"","label":"ONNX unload base model when processing refiner","localized":"","hint":"Unload base model when the refiner is being converted/optimized/processed","ui":"settings_backends"},
+ {"id":"","label":"Olive use FP16 on optimization","localized":"","hint":"Use 16-bit floating point precision for the output model of Olive optimization process. Use 32-bit floating point precision if disabled","ui":"settings_backends"},
+ {"id":"","label":"Olive force FP32 for VAE Encoder","localized":"","hint":"Use 32-bit floating point precision for VAE Encoder of the output model. This overrides 'use FP16 on optimization' option. If you are getting NaN or black blank images from Img2Img, enable this option and remove cache","ui":"settings_backends"},
+ {"id":"","label":"Olive use static dimensions","localized":"","hint":"Make the inference with Olive optimized models much faster. (OrtTransformersOptimization)","ui":"settings_backends"},
+ {"id":"","label":"Olive cache optimized models","localized":"","hint":"Save Olive processed models as a cache. You can manage them in ONNX tab","ui":"settings_backends"},
+ {"id":"","label":"OpenVINO disable model caching","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"OpenVINO disable memory cleanup after compile","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"onediff","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"olive-ai","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"openvino_fx","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Overwrite existing","localized":"","hint":"","ui":"models_current_tab"},
+ {"id":"","label":"Out Block","localized":"","hint":"Upsampling Blocks of the UNet (12 values for SD1.5, 9 values for SDXL)","ui":"component-5674"},
+ {"id":"","label":"Overwrite model","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Output model","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Overwrite existing file","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"Options","localized":"","hint":"","ui":"script_prompt_enhance"},
+ {"id":"","label":"OpenBody","localized":"","hint":"","ui":"control"}
],
- "p":
- [
- {"id":"extras_nav","label":"Process","localized":"","hint":"Process existing image Can be used to upscale images, remove backgrounds, obfuscate NSFW content, apply various filters and effects"},
- {"id":"txt2img_prompts","label":"Prompts","localized":"","hint":"Image prompt and negative prompt","ui":"txt2img"},
- {"id":"txt2img_pause","label":"Pause","localized":"","hint":"Pause processing","ui":"txt2img"},
- {"id":"","label":"Post","localized":"","hint":"Resize image after processing","ui":"control"},
- {"id":"","label":"Preview","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Process Image","localized":"","hint":"Process single image","ui":"extras"},
- {"id":"","label":"Process Batch","localized":"","hint":"Process batch of images","ui":"extras"},
- {"id":"","label":"Process Folder","localized":"","hint":"Process all images in a folder","ui":"extras"},
- {"id":"","label":"Provider","localized":"","hint":"","ui":"tab_onnx"},
- {"id":"","label":"Pipeline Modifiers","localized":"","hint":"Additional functionality that can be enabled during generate"},
- {"id":"","label":"Postprocessing","localized":"","hint":"Settings related to post image generation processing and upscaling"},
- {"id":"","label":"Preset Block Merge","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Pony","localized":"","hint":"","ui":"component-100"},
- {"id":"","label":"Preview metadata","localized":"","hint":""},
- {"id":"","label":"Prompt","localized":"","hint":"Describe image you want to generate","ui":"txt2img"},
- {"id":"","label":"Processed Preview","localized":"","hint":"Show/hide section from pre-processing of input images before actual generate","ui":"control"},
- {"id":"","label":"PixelArt","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"PAG: Perturbed attention guidance","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"PAB: Pyramid attention broadcast","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Para-attention","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Paths for specific models","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Prediction method","localized":"","hint":"Defines what the model predicts at each step. Options: - default: the model default - epsilon: noise (most common for Stable Diffusion) - sample: direct denoised image prediction, also called as x0 prediction - v_prediction: velocity prediction, used by CosXL and NoobAI VPred models - flow_prediction: used with newer flow-matching models like SD3 and Flux","ui":"txt2img"},
- {"id":"","label":"PAG scale","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"PAG start","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"PAG stop","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"PAG layers","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"PAG config","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Perform SDSA","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Perform Injection","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"PhotoMaker Model","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Penalty","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
- {"id":"","label":"positive","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"Prompt EX","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"Power","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"Prompt thresholds","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"Preset","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Pad frames","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Prefill text","localized":"","hint":"Pre-fills the start of the model's response to guide its output format or content by forcing it to continue the prefill text. Prefill is filtered out and does not appear in the final response. Leave empty to let the model generate its own response from scratch.","ui":"script_prompt_enhance"},
- {"id":"","label":"Prompt prefix","localized":"","hint":"Text prepended at the beginning of the enhanced prompt result. Useful for adding prompt elements which need to be copied to the image prompt unchanged, like quality tags 'masterpiece, best quality' or artist names, which would otherwise be rewritten by the LLM.","ui":"script_prompt_enhance"},
- {"id":"","label":"Prompt suffix","localized":"","hint":"Text appended to the end of the enhanced prompt result. Useful for adding prompt elements which need to be copied to the image prompt unchanged, which would otherwise be rewritten by the LLM.","ui":"script_prompt_enhance"},
- {"id":"","label":"Padding","localized":"","hint":"","ui":"img2img"},
- {"id":"","label":"Prompt strength","localized":"","hint":"","ui":"script_blip_diffusion"},
- {"id":"","label":"Preview start","localized":"","hint":"","ui":"script_instantir"},
- {"id":"","label":"Preview end","localized":"","hint":"","ui":"script_instantir"},
- {"id":"","label":"Pixels to expand","localized":"","hint":"","ui":"script_outpainting"},
- {"id":"","label":"Processor","localized":"","hint":"Processor type to use to preprocess image used for ControlNet","ui":"control"},
- {"id":"","label":"Pose confidence","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Parameter free","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Processed","localized":"","hint":"Show/hide section with processed images","ui":"control"},
- {"id":"","label":"Postprocess mask","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"PixelArt block size","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"PixelArt sharpen","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Platform","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Pipeline","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Perform warmup","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"Prompt attention normalization","localized":"","hint":"Balances prompt token weights to avoid overly strong/weak influence. Helps stabilize outputs.","ui":"settings_text_encoder"},
- {"id":"","label":"performance","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Performance Counter","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"PAG layer names","localized":"","hint":"Space separated list of layers Available: d[0-5], m[0], u[0-8] Default: m0","ui":"settings_advanced"},
- {"id":"","label":"PAB cache enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"PAB spacial skip range","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"PAB spacial skip start","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"PAB spacial skip end","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"ParaAttention first-block cache enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"ParaAttention residual diff threshold","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Parallel process images in batch","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"precompile","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Panel minimum width","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Persist UI layout","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Progress update period","localized":"","hint":"Update period for UI progress bar and preview checks, in milliseconds","ui":"settings_live-preview"},
- {"id":"","label":"Play a notification upon completion","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"Path to notification sound","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"Postprocessing operation order","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Prompt padding","localized":"","hint":"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens","ui":"settings_legacy_options"},
- {"id":"","label":"Pad prompt and negative prompt to be same length","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Pin training dataset to memory","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Primary model","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Preset Interpolation Ratio","localized":"","hint":"If two presets are selected, interpolate between them","ui":"component-5560"},
- {"id":"","label":"Prune","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Prediction type","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Prompt enhance","localized":"","hint":"Extension that can use different LLMs to rewrite prompt for improved results","ui":"script_prompt_enhance"},
- {"id":"","label":"PidiNet","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Parameters","localized":"","hint":"Base parameters used during image generation","ui":"video"},
- {"id":"","label":"Postprocess upscale","localized":"","hint":"","ui":"tab_process"}
+ "p": [
+ {"id":"extras_nav","label":"Process","localized":"","hint":"Process existing image Can be used to upscale images, remove backgrounds, obfuscate NSFW content, apply various filters and effects"},
+ {"id":"txt2img_prompts","label":"Prompts","localized":"","hint":"Image prompt and negative prompt","ui":"txt2img"},
+ {"id":"txt2img_pause","label":"Pause","localized":"","hint":"Pause processing","ui":"txt2img"},
+ {"id":"","label":"Post","localized":"","hint":"Resize image after processing","ui":"control"},
+ {"id":"","label":"Preview","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Process Image","localized":"","hint":"Process single image","ui":"extras"},
+ {"id":"","label":"Process Batch","localized":"","hint":"Process batch of images","ui":"extras"},
+ {"id":"","label":"Process Folder","localized":"","hint":"Process all images in a folder","ui":"extras"},
+ {"id":"","label":"Provider","localized":"","hint":"","ui":"tab_onnx"},
+ {"id":"","label":"Pipeline Modifiers","localized":"","hint":"Additional functionality that can be enabled during generate"},
+ {"id":"","label":"Postprocessing","localized":"","hint":"Settings related to post image generation processing and upscaling"},
+ {"id":"","label":"Preset Block Merge","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Preview metadata","localized":"","hint":""},
+ {"id":"","label":"Prompt","localized":"","hint":"Describe image you want to generate","ui":"txt2img"},
+ {"id":"","label":"Processed Preview","localized":"","hint":"Show/hide section from pre-processing of input images before actual generate","ui":"control"},
+ {"id":"","label":"PixelArt","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"PAG: Perturbed attention guidance","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"PAB: Pyramid attention broadcast","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Para-attention","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Paths for specific models","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Prediction method","localized":"","hint":"Defines what the model predicts at each step. Options: - default: the model default - epsilon: noise (most common for Stable Diffusion) - sample: direct denoised image prediction, also called as x0 prediction - v_prediction: velocity prediction, used by CosXL and NoobAI VPred models - flow_prediction: used with newer flow-matching models like SD3 and Flux","ui":"txt2img"},
+ {"id":"","label":"PAG scale","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"PAG start","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"PAG stop","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"PAG layers","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"PAG config","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Perform SDSA","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Perform Injection","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"PhotoMaker Model","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Penalty","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
+ {"id":"","label":"positive","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"Prompt EX","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"Power","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"Prompt thresholds","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"Preset","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Pad frames","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Prefill text","localized":"","hint":"Pre-fills the start of the model's response to guide its output format or content by forcing it to continue the prefill text. Prefill is filtered out and does not appear in the final response. Leave empty to let the model generate its own response from scratch.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Prompt prefix","localized":"","hint":"Text prepended at the beginning of the enhanced prompt result. Useful for adding prompt elements which need to be copied to the image prompt unchanged, like quality tags 'masterpiece, best quality' or artist names, which would otherwise be rewritten by the LLM.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Prompt suffix","localized":"","hint":"Text appended to the end of the enhanced prompt result. Useful for adding prompt elements which need to be copied to the image prompt unchanged, which would otherwise be rewritten by the LLM.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Padding","localized":"","hint":"","ui":"img2img"},
+ {"id":"","label":"Prompt strength","localized":"","hint":"","ui":"script_blip_diffusion"},
+ {"id":"","label":"Preview start","localized":"","hint":"","ui":"script_instantir"},
+ {"id":"","label":"Preview end","localized":"","hint":"","ui":"script_instantir"},
+ {"id":"","label":"Pixels to expand","localized":"","hint":"","ui":"script_outpainting"},
+ {"id":"","label":"Processor","localized":"","hint":"Processor type to use to preprocess image used for ControlNet","ui":"control"},
+ {"id":"","label":"Pose confidence","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Parameter free","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Processed","localized":"","hint":"Show/hide section with processed images","ui":"control"},
+ {"id":"","label":"Postprocess mask","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"PixelArt block size","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"PixelArt sharpen","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Platform","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Pipeline","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Perform warmup","localized":"","hint":"","ui":"component-8823"},
+ {"id":"","label":"Prompt attention normalization","localized":"","hint":"Balances prompt token weights to avoid overly strong/weak influence. Helps stabilize outputs.","ui":"settings_text_encoder"},
+ {"id":"","label":"performance","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"PAG layer names","localized":"","hint":"Space separated list of layers Available: d[0-5], m[0], u[0-8] Default: m0","ui":"settings_advanced"},
+ {"id":"","label":"PAB cache enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"PAB spacial skip range","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"PAB spacial skip start","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"PAB spacial skip end","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"ParaAttention first-block cache enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"ParaAttention residual diff threshold","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Parallel process images in batch","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"precompile","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Panel minimum width","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Persist UI layout","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Progress update period","localized":"","hint":"Update period for UI progress bar and preview checks, in milliseconds","ui":"settings_live-preview"},
+ {"id":"","label":"Play a notification upon completion","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"Path to notification sound","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"Postprocessing operation order","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Prompt padding","localized":"","hint":"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens","ui":"settings_legacy_options"},
+ {"id":"","label":"Pad prompt and negative prompt to be same length","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Pin training dataset to memory","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Primary model","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Preset Interpolation Ratio","localized":"","hint":"If two presets are selected, interpolate between them","ui":"component-5660"},
+ {"id":"","label":"Prune","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Prediction type","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Prompt enhance","localized":"","hint":"Extension that can use different LLMs to rewrite prompt for improved results","ui":"script_prompt_enhance"},
+ {"id":"","label":"PidiNet","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Parameters","localized":"","hint":"Base parameters used during image generation","ui":"video"},
+ {"id":"","label":"Postprocess upscale","localized":"","hint":"","ui":"tab_process"}
],
- "q":
- [
- {"id":"btn_quick_settings","label":"Quick Settings","localized":"","hint":"Favorited items from different settings sections for quick access"},
- {"id":"","label":"Quantized","localized":"","hint":"","ui":"component-98"},
- {"id":"","label":"Qwen layered","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Quicksettings","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Qwen layered number of layers","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Quantization mode","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantization type","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantized MatMul type","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantization type for Text Encoders","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantized MatMul type for Text Encoders","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantize convolutional layers","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantize using GPU","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantization weights type","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quantization activations type","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Quicksettings list","localized":"","hint":"List of setting names, separated by commas, for settings that should go to the quick access bar at the top instead the setting tab","ui":"settings_ui"}
+ "q": [
+ {"id":"btn_quick_settings","label":"Quick Settings","localized":"","hint":"Favorited items from different settings sections for quick access"},
+ {"id":"","label":"Quantized","localized":"","hint":"","ui":"component-98"},
+ {"id":"","label":"Qwen layered","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Quicksettings","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Qwen layered number of layers","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Quantization mode","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantization type","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantized MatMul type","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantization type for Text Encoders","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantized MatMul type for Text Encoders","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantize convolutional layers","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantize using GPU","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantization weights type","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quantization activations type","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Quicksettings list","localized":"","hint":"List of setting names, separated by commas, for settings that should go to the quick access bar at the top instead the setting tab","ui":"settings_ui"}
],
- "r":
- [
- {"id":"txt2img_refine","label":"Refine","localized":"","hint":"Refine runs additonal processing after initial processing has completed and can be used to upscale image and run optionally process it again to increase quality and details","ui":"txt2img"},
- {"id":"txt2img_paste","label":"Restore","localized":"","hint":"Restore parameters from current prompt or last known generated image","ui":"txt2img"},
- {"id":"component-714","label":"Reset anchors","localized":"","hint":"","ui":"script_consistory"},
- {"id":"component-942","label":"Reload model","localized":"","hint":"Reload currently selected model","ui":"script_layerdiffuse"},
- {"id":"txt2img_reprocess","label":"Reprocess","localized":"","hint":"Reprocess previous generations using different parameters","ui":"txt2img"},
- {"id":"","label":"Resize to","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Resize\n by","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Resize\n to","localized":"","hint":"","ui":"control"},
- {"id":"control_mask_refresh","label":"Run Preview","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Reference","localized":"","hint":"List of reference models that can be automatically downloaded on first use","ui":"control"},
- {"id":"framepack_btn_reset_model","label":"Reset receipe","localized":"","hint":"","ui":"video"},
- {"id":"video_generation_info_button","label":"Run","localized":"","hint":"","ui":"video"},
- {"id":"component-8585","label":"Refresh extension list","localized":"","hint":"Refresh list of available extensions","ui":"component-8571"},
- {"id":"restart_submit","label":"Restart server","localized":"","hint":""},
- {"id":"request_notifications","label":"Request browser notifications","localized":"","hint":"","ui":"tab_settings"},
- {"id":"ui_defaults_restore","label":"Restore UI defaults","localized":"","hint":"Restore default user interface values","ui":"tab_config"},
- {"id":"ui_defaults_view","label":"Refresh UI values","localized":"","hint":"","ui":"tab_config"},
- {"id":"component-8532","label":"Reinstall","localized":"","hint":"","ui":"component-8529"},
- {"id":"system_info_tab_refresh_btn","label":"Refresh state","localized":"","hint":"","ui":"component-8625"},
- {"id":"system_info_tab_refresh_full_btn","label":"Refresh data","localized":"","hint":"","ui":"component-8625"},
- {"id":"system_info_tab_benchmark_btn","label":"Run benchmark","localized":"","hint":"","ui":"component-8669"},
- {"id":"system_info_tab_refresh_bench_btn","label":"Refresh bench","localized":"","hint":"","ui":"component-8669"},
- {"id":"defaults_submit","label":"Restore defaults","localized":"","hint":"Restore default server settings"},
- {"id":"","label":"Replace","localized":"","hint":"Replace image"},
- {"id":"btn_history_refresh","label":"Refresh","localized":"","hint":""},
- {"id":"txt2img_reprocess_decode","label":"Reprocess decode","localized":"","hint":"","ui":"tab_txt2img"},
- {"id":"txt2img_reprocess_refine","label":"Reprocess refine","localized":"","hint":"","ui":"tab_txt2img"},
- {"id":"txt2img_reprocess_detail","label":"Reprocess face","localized":"","hint":"","ui":"tab_txt2img"},
- {"id":"","label":"Remove background","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"RAS: Region-Adaptive Sampling","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Resize","localized":"","hint":"Image resizing, can be using fixed resolution on based on scale","ui":"settings_postprocessing"},
- {"id":"","label":"Rerefence models","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Replace model components","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"rescale","localized":"","hint":"rescale betas with zero terminal snr","ui":"txt2img"},
- {"id":"","label":"Resize seed from width","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution","ui":"txt2img"},
- {"id":"","label":"Resize seed from height","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution","ui":"txt2img"},
- {"id":"","label":"Refine guidance","localized":"","hint":"CFG scale used for refiner pass","ui":"txt2img"},
- {"id":"","label":"Resize mode","localized":"","hint":"Defines how the input is resized or adapted in second-pass refinement: - none: no resizing, keep original resolution - fixed: force resize to target resolution (may distort) - crop: center-crop to fit target while keeping aspect ratio - fill: resize to fit and pad empty space with borders - outpaint: extend canvas beyond image borders - context aware: smart resize that blends or adapts surrounding areas","ui":"txt2img"},
- {"id":"","label":"Resize method","localized":"","hint":"Method used to resize the image: can be simple resize, upscaling model, latent resize or asymmetric decode","ui":"txt2img"},
- {"id":"","label":"Resize width","localized":"","hint":"Resizes image to this width. If 0, width is inferred from either of two nearby sliders","ui":"txt2img"},
- {"id":"","label":"Resize height","localized":"","hint":"Resizes image to this height. If 0, height is inferred from either of two nearby sliders","ui":"txt2img"},
- {"id":"","label":"Resize scale","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Refine sampler","localized":"","hint":"Use specific sampler as fallback sampler if primary is not supported for specific operation","ui":"txt2img"},
- {"id":"","label":"Refiner start","localized":"","hint":"Refiner pass will start when base model is this much complete (set to larger than 0 and smaller than 1 to run after full base model run)","ui":"txt2img"},
- {"id":"","label":"Refiner steps","localized":"","hint":"Number of steps to use for refiner pass","ui":"txt2img"},
- {"id":"","label":"Refine prompt","localized":"","hint":"Prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)","ui":"txt2img"},
- {"id":"","label":"Refine negative prompt","localized":"","hint":"Negative prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)","ui":"txt2img"},
- {"id":"","label":"Renoise","localized":"","hint":"Apply additional noise during detailing","ui":"txt2img"},
- {"id":"","label":"Renoise end","localized":"","hint":"Final step when renoise is applied","ui":"txt2img"},
- {"id":"","label":"Range","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Repeat x-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
- {"id":"","label":"Repeat y-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
- {"id":"","label":"ReSwapper Model","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Return original images","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Restart step","localized":"","hint":"","ui":"script_freescale"},
- {"id":"","label":"Restore pipeline on end","localized":"","hint":"","ui":"script_infiniteyou"},
- {"id":"","label":"Randomize seed after each loop iteration","localized":"","hint":"","ui":"script_loopback"},
- {"id":"","label":"Random seeds","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"Restore pipe on end","localized":"","hint":"","ui":"script_pulid"},
- {"id":"","label":"Rows","localized":"","hint":"","ui":"script_regional_prompting"},
- {"id":"","label":"Repetition penalty","localized":"","hint":"Discourages reusing tokens that already appear in the prompt or output by penalizing their probabilities. Like adding friction to revisiting previous choices. Helps break repetitive loops but may reduce coherence at aggressive values. Set to 1 to disable.","ui":"script_prompt_enhance"},
- {"id":"","label":"Redux prompt strength","localized":"","hint":"","ui":"script_flux_tools"},
- {"id":"","label":"right","localized":"","hint":"","ui":"script_outpainting"},
- {"id":"","label":"Reference query weight","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Reference adain weight","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Refine upscaler","localized":"","hint":"Select secondary upscaler to run after initial upscaler","ui":"extras"},
- {"id":"","label":"Refine foreground","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Recursive","localized":"","hint":"Process images in subfolders recursively. When enabled, searches all nested subdirectories for images to process.","ui":"caption"},
- {"id":"","label":"Rebase","localized":"","hint":"","ui":"tab_update"},
- {"id":"","label":"Repos","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Refiner model","localized":"","hint":"Refiner model used for second-pass operations","ui":"settings_sd"},
- {"id":"","label":"Record torch streams","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Remote VAE image type","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"Remote VAE for encode","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"RAS enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"reduce-overhead","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"repeated","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Root model folder","localized":"","hint":"","ui":"settings_system-paths"},
- {"id":"","label":"Resize background color","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Restore from metadata: skip params","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"Restore from metadata: skip settings","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"requests","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"rust","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"Restore unparsed prompt","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Reuse loaded model dictionary","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"ReBasin","localized":"","hint":"Performs multiple merges with permutations in order to keep more features from both models","ui":"models_merge_tab"},
- {"id":"","label":"Replace VAE","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Reference unit 1","localized":"","hint":"","ui":"control"}
+ "r": [
+ {"id":"txt2img_refine","label":"Refine","localized":"","hint":"Refine runs additonal processing after initial processing has completed and can be used to upscale image and run optionally process it again to increase quality and details","ui":"txt2img"},
+ {"id":"txt2img_paste","label":"Restore","localized":"","hint":"Restore parameters from current prompt or last known generated image","ui":"txt2img"},
+ {"id":"component-754","label":"Reset anchors","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"component-982","label":"Reload model","localized":"","hint":"Reload currently selected model","ui":"script_layerdiffuse"},
+ {"id":"txt2img_reprocess","label":"Reprocess","localized":"","hint":"Reprocess previous generations using different parameters","ui":"txt2img"},
+ {"id":"","label":"Resize to","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Resize\n by","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Resize\n to","localized":"","hint":"","ui":"control"},
+ {"id":"control_mask_refresh","label":"Run Preview","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Reference","localized":"","hint":"List of reference models that can be automatically downloaded on first use","ui":"control"},
+ {"id":"framepack_btn_reset_model","label":"Reset receipe","localized":"","hint":"","ui":"video"},
+ {"id":"video_generation_info_button","label":"Run","localized":"","hint":"","ui":"video"},
+ {"id":"component-8738","label":"Refresh extension list","localized":"","hint":"Refresh list of available extensions","ui":"component-8724"},
+ {"id":"restart_submit","label":"Restart server","localized":"","hint":""},
+ {"id":"request_notifications","label":"Request browser notifications","localized":"","hint":"","ui":"tab_settings"},
+ {"id":"ui_defaults_restore","label":"Restore UI defaults","localized":"","hint":"Restore default user interface values","ui":"tab_config"},
+ {"id":"ui_defaults_view","label":"Refresh UI values","localized":"","hint":"","ui":"tab_config"},
+ {"id":"component-8685","label":"Reinstall","localized":"","hint":"","ui":"component-8682"},
+ {"id":"system_info_tab_refresh_btn","label":"Refresh state","localized":"","hint":"","ui":"component-8779"},
+ {"id":"system_info_tab_refresh_full_btn","label":"Refresh data","localized":"","hint":"","ui":"component-8779"},
+ {"id":"system_info_tab_benchmark_btn","label":"Run benchmark","localized":"","hint":"","ui":"component-8823"},
+ {"id":"system_info_tab_refresh_bench_btn","label":"Refresh bench","localized":"","hint":"","ui":"component-8823"},
+ {"id":"defaults_submit","label":"Restore defaults","localized":"","hint":"Restore default server settings"},
+ {"id":"","label":"Replace","localized":"","hint":"Replace image"},
+ {"id":"btn_history_refresh","label":"Refresh","localized":"","hint":""},
+ {"id":"txt2img_reprocess_decode","label":"Reprocess decode","localized":"","hint":"","ui":"tab_txt2img"},
+ {"id":"txt2img_reprocess_refine","label":"Reprocess refine","localized":"","hint":"","ui":"tab_txt2img"},
+ {"id":"txt2img_reprocess_detail","label":"Reprocess face","localized":"","hint":"","ui":"tab_txt2img"},
+ {"id":"","label":"Remove background","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"RAS: Region-Adaptive Sampling","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Resize","localized":"","hint":"Image resizing, can be using fixed resolution on based on scale","ui":"settings_postprocessing"},
+ {"id":"","label":"Rerefence models","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Replace model components","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"rescale","localized":"","hint":"rescale betas with zero terminal snr","ui":"txt2img"},
+ {"id":"","label":"Resize seed from width","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution","ui":"txt2img"},
+ {"id":"","label":"Resize seed from height","localized":"","hint":"Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution","ui":"txt2img"},
+ {"id":"","label":"Refine guidance","localized":"","hint":"CFG scale used for refiner pass","ui":"txt2img"},
+ {"id":"","label":"Resize mode","localized":"","hint":"Defines how the input is resized or adapted in second-pass refinement: - none: no resizing, keep original resolution - fixed: force resize to target resolution (may distort) - crop: center-crop to fit target while keeping aspect ratio - fill: resize to fit and pad empty space with borders - outpaint: extend canvas beyond image borders - context aware: smart resize that blends or adapts surrounding areas","ui":"txt2img"},
+ {"id":"","label":"Resize method","localized":"","hint":"Method used to resize the image: can be simple resize, upscaling model, latent resize or asymmetric decode","ui":"txt2img"},
+ {"id":"","label":"Resize width","localized":"","hint":"Resizes image to this width. If 0, width is inferred from either of two nearby sliders","ui":"txt2img"},
+ {"id":"","label":"Resize height","localized":"","hint":"Resizes image to this height. If 0, height is inferred from either of two nearby sliders","ui":"txt2img"},
+ {"id":"","label":"Resize scale","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Refine sampler","localized":"","hint":"Use specific sampler as fallback sampler if primary is not supported for specific operation","ui":"txt2img"},
+ {"id":"","label":"Refiner start","localized":"","hint":"Refiner pass will start when base model is this much complete (set to larger than 0 and smaller than 1 to run after full base model run)","ui":"txt2img"},
+ {"id":"","label":"Refiner steps","localized":"","hint":"Number of steps to use for refiner pass","ui":"txt2img"},
+ {"id":"","label":"Refine prompt","localized":"","hint":"Prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)","ui":"txt2img"},
+ {"id":"","label":"Refine negative prompt","localized":"","hint":"Negative prompt used for both second encoder in base model (if it exists) and for refiner pass (if enabled)","ui":"txt2img"},
+ {"id":"","label":"Renoise","localized":"","hint":"Apply additional noise during detailing","ui":"txt2img"},
+ {"id":"","label":"Renoise end","localized":"","hint":"Final step when renoise is applied","ui":"txt2img"},
+ {"id":"","label":"Repeat x-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
+ {"id":"","label":"Repeat y-axis","localized":"","hint":"","ui":"script_asymmetric_tiling"},
+ {"id":"","label":"ReSwapper Model","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Return original images","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Restart step","localized":"","hint":"","ui":"script_freescale"},
+ {"id":"","label":"Restore pipeline on end","localized":"","hint":"","ui":"script_infiniteyou"},
+ {"id":"","label":"Randomize seed after each loop iteration","localized":"","hint":"","ui":"script_loopback"},
+ {"id":"","label":"Random seeds","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"Restore pipe on end","localized":"","hint":"","ui":"script_pulid"},
+ {"id":"","label":"Rows","localized":"","hint":"","ui":"script_regional_prompting"},
+ {"id":"","label":"Repetition penalty","localized":"","hint":"Discourages reusing tokens that already appear in the prompt or output by penalizing their probabilities. Like adding friction to revisiting previous choices. Helps break repetitive loops but may reduce coherence at aggressive values. Set to 1 to disable.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Redux prompt strength","localized":"","hint":"","ui":"script_flux_tools"},
+ {"id":"","label":"right","localized":"","hint":"","ui":"script_outpainting"},
+ {"id":"","label":"Reference query weight","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Reference adain weight","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Refine upscaler","localized":"","hint":"Select secondary upscaler to run after initial upscaler","ui":"extras"},
+ {"id":"","label":"Refine foreground","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Recursive","localized":"","hint":"Process images in subfolders recursively. When enabled, searches all nested subdirectories for images to process.","ui":"caption"},
+ {"id":"","label":"Rebase","localized":"","hint":"","ui":"tab_update"},
+ {"id":"","label":"Repos","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Refiner model","localized":"","hint":"Refiner model used for second-pass operations","ui":"settings_sd"},
+ {"id":"","label":"Record torch streams","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Remote VAE image type","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"Remote VAE for encode","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"RAS enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"reduce-overhead","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"repeated","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Root model folder","localized":"","hint":"","ui":"settings_system-paths"},
+ {"id":"","label":"Resize background color","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Restore from metadata: skip params","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"Restore from metadata: skip settings","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"requests","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"rust","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"Restore unparsed prompt","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Reuse loaded model dictionary","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"ReBasin","localized":"","hint":"Performs multiple merges with permutations in order to keep more features from both models","ui":"models_merge_tab"},
+ {"id":"","label":"Replace VAE","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Reference unit 1","localized":"","hint":"","ui":"control"}
],
- "s":
- [
- {"id":"txt2img_sampler","label":"Sampler","localized":"","hint":"Settings related to sampler and seed selection and configuration. Samplers guide the process of turning noise into an image over multiple steps.","ui":"txt2img"},
- {"id":"txt2img_scripts","label":"Scripts","localized":"","hint":"Enable additional features by using selected scripts during generate process","ui":"txt2img"},
- {"id":"","label":"Scale","localized":"","hint":"Resize image to target scale. If resize fixed width/height are set this option is ignored","ui":"txt2img"},
- {"id":"xy_grid_swap_axes_button","label":"Swap X/Y","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"yz_grid_swap_axes_button","label":"Swap Y/Z","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"xz_grid_swap_axes_button","label":"Swap X/Z","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"prompt_enhance_copy","label":"Set prompt","localized":"","hint":"Copy the enhanced prompt to the main prompt input","ui":"script_prompt_enhance"},
- {"id":"txt2img_skip","label":"Skip","localized":"","hint":"Stop processing current job and continue processing","ui":"txt2img"},
- {"id":"txt2img_interrupt","label":"Stop","localized":"","hint":"Stop processing","ui":"txt2img"},
- {"id":"","label":"Show","localized":"","hint":"Show image location","ui":"txt2img"},
- {"id":"","label":"Save","localized":"","hint":"Save image","ui":"txt2img"},
- {"id":"","label":"Sketch","localized":"","hint":"","ui":"img2img"},
- {"id":"video_params_size","label":"Size & Inputs","localized":"","hint":"Settings related to generation resolution and additional input media","ui":"video"},
- {"id":"framepack_btn_set_model","label":"Set receipe","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Scale by","localized":"","hint":"Use this tab to resize the source image(s) by a chosen factor","ui":"extras"},
- {"id":"","label":"Scale to","localized":"","hint":"Use this tab to resize the source image(s) to a chosen target size","ui":"extras"},
- {"id":"btn_settings","label":"Settings","localized":"","hint":"Application settings"},
- {"id":"btn_system","label":"System","localized":"","hint":"System settings and information"},
- {"id":"shutdown_submit","label":"Shutdown server","localized":"","hint":""},
- {"id":"enable_profiling","label":"Start profiling","localized":"","hint":""},
- {"id":"","label":"System Info","localized":"","hint":"System information"},
- {"id":"ui_defaults_apply","label":"Set UI defaults","localized":"","hint":"Set current values as default values for the user interface","ui":"tab_config"},
- {"id":"ui_submenu_apply","label":"Set UI menu states","localized":"","hint":"","ui":"tab_config"},
- {"id":"system_info_tab_interrupt_btn","label":"Send interrupt","localized":"","hint":"","ui":"component-8625"},
- {"id":"system_info_tab_submit_btn","label":"Submit results","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"System Paths","localized":"","hint":"Settings related to location of various model directories"},
- {"id":"","label":"Show all pages","localized":"","hint":"Show all settings pages"},
- {"id":"component-5495","label":"Save model","localized":"","hint":"","ui":"models_current_tab"},
- {"id":"component-5510","label":"Scan missing","localized":"","hint":"","ui":"models_metadata_tab"},
- {"id":"component-5529","label":"Save receipe","localized":"","hint":"","ui":"models_loader_tab"},
- {"id":"","label":"Simple Merge","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Style","localized":"","hint":"Additional styles to be applied on selected generation parameters"},
- {"id":"","label":"SD 1.5","localized":"","hint":"","ui":"component-98"},
- {"id":"","label":"SD XL","localized":"","hint":"","ui":"component-98"},
- {"id":"","label":"SD1.5","localized":"","hint":"","ui":"component-100"},
- {"id":"","label":"SDXL","localized":"","hint":"StableDiffusion XL","ui":"component-100"},
- {"id":"gpu_start","label":"Start","localized":"","hint":""},
- {"id":"txt2img_styles_select","label":"Select","localized":"","hint":"","ui":"tab_txt2img"},
- {"id":"","label":"Size","localized":"","hint":"","ui":"tab_video"},
- {"id":"","label":"Size & Batch","localized":"","hint":"Image size and batch","ui":"txt2img"},
- {"id":"","label":"Seed","localized":"","hint":"Initial seed and variation","ui":"txt2img"},
- {"id":"","label":"Script","localized":"","hint":"Additional scripts to be used","ui":"txt2img"},
- {"id":"","label":"Stable Diffusion 3.x","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"SDNQ: SD.Next Quantization","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Save Options","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Startup & Server Options","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"SeedVR","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Styles","localized":"","hint":"Additional styles to be applied on selected generation parameters","ui":"settings_extra_networks"},
- {"id":"","label":"Search & Download","localized":"","hint":"","ui":"models_civitai_tab"},
- {"id":"","label":"Server log","localized":"","hint":""},
- {"id":"","label":"Steps","localized":"","hint":"How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results","ui":"txt2img"},
- {"id":"","label":"Sampling method","localized":"","hint":"Which algorithm to use to produce the image","ui":"txt2img"},
- {"id":"","label":"Sigma method","localized":"","hint":"Controls how noise levels (sigmas) are distributed across diffusion steps. Options: - default: the model default - karras: smoother noise schedule, higher quality with fewer steps - beta: based on beta schedule values - exponential: exponential decay of noise - lambdas: experimental, balances signal-to-noise - flowmatch: tuned for flow-matching models","ui":"txt2img"},
- {"id":"","label":"Sigma adjust","localized":"","hint":"Adjust sampler sigma value","ui":"txt2img"},
- {"id":"","label":"Sampler order","localized":"","hint":"Order of solver updates in the sampler. Higher order improves stability/accuracy but increases compute cost.","ui":"txt2img"},
- {"id":"","label":"SLG scale","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SLG start","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SLG stop","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SLG layers","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SLG config","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG scale","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG blur sigma","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG blur threshold inf","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG start","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG stop","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG layers","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"SEG config","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Strength","localized":"","hint":"Denoising strength of during image operation controls how much of original image is allowed to change during generate","ui":"txt2img"},
- {"id":"","label":"Sort detections","localized":"","hint":"Sort detected areas by from left to right instead of detection score","ui":"txt2img"},
- {"id":"","label":"Sharpen","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Subject","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Same latent","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Share queries","localized":"","hint":"","ui":"script_consistory"},
- {"id":"","label":"Sigma","localized":"","hint":"","ui":"script_demofusion"},
- {"id":"","label":"Stride","localized":"","hint":"","ui":"script_demofusion"},
- {"id":"","label":"Structure","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Save HDR image","localized":"","hint":"","ui":"script_hdr"},
- {"id":"","label":"Saturation","localized":"","hint":"","ui":"script_hdr"},
- {"id":"","label":"Scale factor","localized":"","hint":"","ui":"script_kohya_hires_fix"},
- {"id":"","label":"Strength curve","localized":"","hint":"","ui":"script_loopback"},
- {"id":"","label":"Slider","localized":"","hint":"","ui":"script_pixelsmith"},
- {"id":"","label":"Set at prompt start","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"space","localized":"","hint":"","ui":"script_prompt_matrix"},
- {"id":"","label":"Skip guidance layers","localized":"","hint":"","ui":"script_slg"},
- {"id":"","label":"Shared options","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Shift","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
- {"id":"","label":"Spatial frequency","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Save as copy","localized":"","hint":"","ui":"script_nudenet"},
- {"id":"","label":"Sensitivity","localized":"","hint":"","ui":"script_nudenet"},
- {"id":"","label":"System prompt","localized":"","hint":"System prompt controls behavior of the LLM. Processed first and persists throughout conversation. Has highest priority weighting and is always appended at the beginning of the sequence. Use for: Response formatting rules, role definition, style.","ui":"script_prompt_enhance"},
- {"id":"","label":"Source subject","localized":"","hint":"","ui":"script_blip_diffusion"},
- {"id":"","label":"Smooth mask","localized":"","hint":"","ui":"script_ledits"},
- {"id":"","label":"Scale after","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Scale mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Show input","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Show preview","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Separate init image","localized":"","hint":"Creates an additional window next to Control input labeled Init input, so you can have a separate image for both Control operations and an init source.","ui":"control"},
- {"id":"","label":"Skip input frames","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Style fidelity","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Scribble","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Score threshold","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Sampler shift","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Save output","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"Show result images","localized":"","hint":"Enable to show the processed images in the image pane","ui":"extras"},
- {"id":"","label":"Save Caption Files","localized":"","hint":"Save generated captions to .txt files alongside the images. Each image gets a matching caption file with the same base name.","ui":"caption"},
- {"id":"","label":"Sort alphabetically","localized":"","hint":"Sort tags alphabetically instead of by confidence score. When disabled, tags are sorted by confidence (highest first). Alphabetical sorting makes it easier to find specific tags.","ui":"caption"},
- {"id":"","label":"Show confidence scores","localized":"","hint":"Display confidence scores alongside each tag. Shows how certain the model is about each tag (0.0 to 1.0). Useful for understanding which tags are most reliable.","ui":"caption"},
- {"id":"","label":"Search","localized":"","hint":"","ui":"component-8571"},
- {"id":"","label":"Sort by","localized":"","hint":"","ui":"component-8571"},
- {"id":"","label":"Specific branch name","localized":"","hint":"Specify extension branch name, leave blank for default","ui":"component-8593"},
- {"id":"","label":"Submodules","localized":"","hint":"","ui":"tab_update"},
- {"id":"","label":"Server start time","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"State","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Search Docs","localized":"","hint":"","ui":"system_tab_docs"},
- {"id":"","label":"Search GitHub Wiki Pages","localized":"","hint":"","ui":"system_tab_wiki"},
- {"id":"","label":"Search Changelog","localized":"","hint":"","ui":"system_tab_changelog"},
- {"id":"","label":"Stage boundary ratio","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"sequential","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"SVD rank size","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"SVD steps","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Shuffle weights in post mode","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"SDXL: Use weighted pooled embeds","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Sana: Use complex human instructions","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Scaled-Dot-Product","localized":"","hint":"Memory optimization. Non-Deterministic unless SDP memory attention is disabled.","ui":"settings_cuda"},
- {"id":"","label":"Sage attention","localized":"","hint":"Experimental attention optimization method. May improve speed but less tested and can cause bugs.","ui":"settings_cuda"},
- {"id":"","label":"stable-fast","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"Save all generated images","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save interrupted images","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save all generated image grids","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Show metadata in full screen image browser","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save init images","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save image before hires","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save image before refiner","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save image before detailer","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save image before color correction","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save inpainting mask","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save inpainting masked composite","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Save images to a subdirectory","localized":"","hint":"","ui":"settings_saving-paths"},
- {"id":"","label":"Save metadata in image","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"Save metadata to text file","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"Save metadata to JSON file","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"System information to include in metadata","localized":"","hint":"","ui":"settings_image-metadata"},
- {"id":"","label":"Standard","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show MOTD","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"sidebar","localized":"","hint":"sidebar on the right side of the screen","ui":"settings_ui"},
- {"id":"","label":"Show log view","localized":"","hint":"Show log view at the bottom of the main window","ui":"settings_ui"},
- {"id":"","label":"Show grid in results","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Send seed when sending prompt or image to other interface","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Send size when sending prompt or image to another interface","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show labels for aside tabs","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show labels for main tabs","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show labels for page tabs","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show ticks for input range slider","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Show parameter outline","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Simple","localized":"","hint":"Very cheap approximation. Very fast compared to VAE, but produces pictures with 8 times smaller horizontal/vertical resolution and extremely low quality","ui":"settings_live-preview"},
- {"id":"","label":"SeedVR CFG Scale","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Sort order","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Skip CivitAI scan for regex pattern(s)","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Show reference styles","localized":"","hint":"Show or hide build-it styles","ui":"settings_extra_networks"},
- {"id":"","label":"Skip Generation if NaN found in latents","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save grids to a subdirectory","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Show live previews","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save resumable optimizer state when training","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save training settings to a text file","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Show previews as a grid","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Show progressbar","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save generated images within tensorboard","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save loss CSV file every n steps","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Save images to a subdirectory when using Save button","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Secondary model","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Save metadata","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"safetensors","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"shuffle","localized":"","hint":"Loads full model in RAM and calculates on VRAM: Less speedup, suggested for SDXL merges","ui":"models_merge_tab"},
- {"id":"","label":"Save diffusers","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Save safetensors","localized":"","hint":"","ui":"models_replace_tab"},
- {"id":"","label":"Search models","localized":"","hint":"","ui":"models_huggingface_tab"},
- {"id":"","label":"Select model","localized":"","hint":"","ui":"models_huggingface_tab"},
- {"id":"","label":"Specify model variant","localized":"","hint":"","ui":"models_huggingface_tab"},
- {"id":"","label":"Specify model revision","localized":"","hint":"","ui":"models_huggingface_tab"},
- {"id":"","label":"SegmentAnything","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Sections","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Samplers","localized":"","hint":"Samplers/schedulers advanced settings","ui":"tab_txt2img"}
+ "s": [
+ {"id":"txt2img_sampler","label":"Sampler","localized":"","hint":"Settings related to sampler and seed selection and configuration. Samplers guide the process of turning noise into an image over multiple steps.","ui":"txt2img"},
+ {"id":"txt2img_scripts","label":"Scripts","localized":"","hint":"Enable additional features by using selected scripts during generate process","ui":"txt2img"},
+ {"id":"","label":"Scale","localized":"","hint":"Resize image to target scale. If resize fixed width/height are set this option is ignored","ui":"txt2img"},
+ {"id":"xy_grid_swap_axes_button","label":"Swap X/Y","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"yz_grid_swap_axes_button","label":"Swap Y/Z","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"xz_grid_swap_axes_button","label":"Swap X/Z","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"prompt_enhance_copy","label":"Set prompt","localized":"","hint":"Copy the enhanced prompt to the main prompt input","ui":"script_prompt_enhance"},
+ {"id":"txt2img_skip","label":"Skip","localized":"","hint":"Stop processing current job and continue processing","ui":"txt2img"},
+ {"id":"txt2img_interrupt","label":"Stop","localized":"","hint":"Stop processing","ui":"txt2img"},
+ {"id":"","label":"Save","localized":"","hint":"Save image","ui":"txt2img"},
+ {"id":"","label":"Sketch","localized":"","hint":"","ui":"img2img"},
+ {"id":"video_params_size","label":"Size & Inputs","localized":"","hint":"Settings related to generation resolution and additional input media","ui":"video"},
+ {"id":"framepack_btn_set_model","label":"Set receipe","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Scale by","localized":"","hint":"Use this tab to resize the source image(s) by a chosen factor","ui":"extras"},
+ {"id":"","label":"Scale to","localized":"","hint":"Use this tab to resize the source image(s) to a chosen target size","ui":"extras"},
+ {"id":"btn_server_info","label":"Server Info","localized":"","hint":""},
+ {"id":"btn_settings","label":"Settings","localized":"","hint":"Application settings"},
+ {"id":"btn_system","label":"System","localized":"","hint":"System settings and information"},
+ {"id":"shutdown_submit","label":"Shutdown server","localized":"","hint":""},
+ {"id":"enable_profiling","label":"Start profiling","localized":"","hint":""},
+ {"id":"","label":"System Info","localized":"","hint":"System information"},
+ {"id":"ui_defaults_apply","label":"Set UI defaults","localized":"","hint":"Set current values as default values for the user interface","ui":"tab_config"},
+ {"id":"ui_submenu_apply","label":"Set UI menu states","localized":"","hint":"","ui":"tab_config"},
+ {"id":"system_info_tab_interrupt_btn","label":"Send interrupt","localized":"","hint":"","ui":"component-8779"},
+ {"id":"system_info_tab_submit_btn","label":"Submit results","localized":"","hint":"","ui":"component-8823"},
+ {"id":"","label":"Server Settings","localized":"","hint":""},
+ {"id":"","label":"System Paths","localized":"","hint":"Settings related to location of various model directories"},
+ {"id":"","label":"Show all pages","localized":"","hint":"Show all settings pages"},
+ {"id":"component-5595","label":"Save model","localized":"","hint":"","ui":"models_current_tab"},
+ {"id":"component-5610","label":"Scan missing","localized":"","hint":"","ui":"models_metadata_tab"},
+ {"id":"component-5629","label":"Save receipe","localized":"","hint":"","ui":"models_loader_tab"},
+ {"id":"","label":"Simple Merge","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Style","localized":"","hint":"Additional styles to be applied on selected generation parameters"},
+ {"id":"","label":"SD 1.5","localized":"","hint":"","ui":"component-98"},
+ {"id":"","label":"SD XL","localized":"","hint":"","ui":"component-98"},
+ {"id":"gpu_start","label":"Start","localized":"","hint":""},
+ {"id":"txt2img_styles_select","label":"Select","localized":"","hint":"","ui":"tab_txt2img"},
+ {"id":"","label":"Size","localized":"","hint":"","ui":"tab_video"},
+ {"id":"","label":"Size & Batch","localized":"","hint":"Image size and batch","ui":"txt2img"},
+ {"id":"","label":"Seed","localized":"","hint":"Initial seed and variation","ui":"txt2img"},
+ {"id":"","label":"Script","localized":"","hint":"Additional scripts to be used","ui":"txt2img"},
+ {"id":"","label":"Stable Diffusion 3.x","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"SDNQ: SD.Next Quantization","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Save Options","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Startup & Server Options","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"SeedVR","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Styles","localized":"","hint":"Additional styles to be applied on selected generation parameters","ui":"settings_extra_networks"},
+ {"id":"","label":"Search & Download","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"Server log","localized":"","hint":""},
+ {"id":"","label":"Steps","localized":"","hint":"How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results","ui":"txt2img"},
+ {"id":"","label":"Sampling method","localized":"","hint":"Which algorithm to use to produce the image","ui":"txt2img"},
+ {"id":"","label":"Sigma method","localized":"","hint":"Controls how noise levels (sigmas) are distributed across diffusion steps. Options: - default: the model default - karras: smoother noise schedule, higher quality with fewer steps - beta: based on beta schedule values - exponential: exponential decay of noise - lambdas: experimental, balances signal-to-noise - flowmatch: tuned for flow-matching models","ui":"txt2img"},
+ {"id":"","label":"Sigma adjust","localized":"","hint":"Adjust sampler sigma value","ui":"txt2img"},
+ {"id":"","label":"Sampler order","localized":"","hint":"Order of solver updates in the sampler. Higher order improves stability/accuracy but increases compute cost.","ui":"txt2img"},
+ {"id":"","label":"SLG scale","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SLG start","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SLG stop","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SLG layers","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SLG config","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG scale","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG blur sigma","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG blur threshold inf","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG start","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG stop","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG layers","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"SEG config","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Strength","localized":"","hint":"Denoising strength of during image operation controls how much of original image is allowed to change during generate","ui":"txt2img"},
+ {"id":"","label":"Sort detections","localized":"","hint":"Sort detected areas by from left to right instead of detection score","ui":"txt2img"},
+ {"id":"","label":"Saturation","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Sharpness","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Shadows","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Shadows tint","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Split tone balance","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Subject","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Same latent","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Share queries","localized":"","hint":"","ui":"script_consistory"},
+ {"id":"","label":"Sigma","localized":"","hint":"","ui":"script_demofusion"},
+ {"id":"","label":"Stride","localized":"","hint":"","ui":"script_demofusion"},
+ {"id":"","label":"Structure","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Save HDR image","localized":"","hint":"","ui":"script_hdr"},
+ {"id":"","label":"Scale factor","localized":"","hint":"","ui":"script_kohya_hires_fix"},
+ {"id":"","label":"Strength curve","localized":"","hint":"","ui":"script_loopback"},
+ {"id":"","label":"Slider","localized":"","hint":"","ui":"script_pixelsmith"},
+ {"id":"","label":"Set at prompt start","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"space","localized":"","hint":"","ui":"script_prompt_matrix"},
+ {"id":"","label":"Skip guidance layers","localized":"","hint":"","ui":"script_slg"},
+ {"id":"","label":"Shared options","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Shift","localized":"","hint":"","ui":"script_style_aligned_image_generation"},
+ {"id":"","label":"Spatial frequency","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Save as copy","localized":"","hint":"","ui":"script_nudenet"},
+ {"id":"","label":"Sensitivity","localized":"","hint":"","ui":"script_nudenet"},
+ {"id":"","label":"System prompt","localized":"","hint":"System prompt controls behavior of the LLM. Processed first and persists throughout conversation. Has highest priority weighting and is always appended at the beginning of the sequence. Use for: Response formatting rules, role definition, style.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Source subject","localized":"","hint":"","ui":"script_blip_diffusion"},
+ {"id":"","label":"Smooth mask","localized":"","hint":"","ui":"script_ledits"},
+ {"id":"","label":"Scale after","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Scale mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Show input","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Show preview","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Separate init image","localized":"","hint":"Creates an additional window next to Control input labeled Init input, so you can have a separate image for both Control operations and an init source.","ui":"control"},
+ {"id":"","label":"Skip input frames","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Style fidelity","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Scribble","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Score threshold","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Sampler shift","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Save output","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"Show result images","localized":"","hint":"Enable to show the processed images in the image pane","ui":"extras"},
+ {"id":"","label":"Save Caption Files","localized":"","hint":"Save generated captions to .txt files alongside the images. Each image gets a matching caption file with the same base name.","ui":"caption"},
+ {"id":"","label":"Sort alphabetically","localized":"","hint":"Sort tags alphabetically instead of by confidence score. When disabled, tags are sorted by confidence (highest first). Alphabetical sorting makes it easier to find specific tags.","ui":"caption"},
+ {"id":"","label":"Show confidence scores","localized":"","hint":"Display confidence scores alongside each tag. Shows how certain the model is about each tag (0.0 to 1.0). Useful for understanding which tags are most reliable.","ui":"caption"},
+ {"id":"","label":"Search","localized":"","hint":"","ui":"component-8724"},
+ {"id":"","label":"Sort by","localized":"","hint":"","ui":"component-8724"},
+ {"id":"","label":"Specific branch name","localized":"","hint":"Specify extension branch name, leave blank for default","ui":"component-8746"},
+ {"id":"","label":"Submodules","localized":"","hint":"","ui":"tab_update"},
+ {"id":"","label":"Server start time","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"State","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Search Docs","localized":"","hint":"","ui":"system_tab_docs"},
+ {"id":"","label":"Search GitHub Wiki Pages","localized":"","hint":"","ui":"system_tab_wiki"},
+ {"id":"","label":"Search Changelog","localized":"","hint":"","ui":"system_tab_changelog"},
+ {"id":"","label":"Stage boundary ratio","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"sequential","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"SVD rank size","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"SVD steps","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Shuffle weights in post mode","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"SDXL: Use weighted pooled embeds","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Sana: Use complex human instructions","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Scaled-Dot-Product","localized":"","hint":"Memory optimization. Non-Deterministic unless SDP memory attention is disabled.","ui":"settings_cuda"},
+ {"id":"","label":"Sage attention","localized":"","hint":"Experimental attention optimization method. May improve speed but less tested and can cause bugs.","ui":"settings_cuda"},
+ {"id":"","label":"stable-fast","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"Save all generated images","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save interrupted images","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save all generated image grids","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Show metadata in full screen image browser","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save init images","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save image before hires","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save image before refiner","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save image before detailer","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save image before color correction","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save inpainting mask","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save inpainting masked composite","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Save images to a subdirectory","localized":"","hint":"","ui":"settings_saving-paths"},
+ {"id":"","label":"Save metadata in image","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"Save metadata to text file","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"Save metadata to JSON file","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"System information to include in metadata","localized":"","hint":"","ui":"settings_image-metadata"},
+ {"id":"","label":"Standard","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show MOTD","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"sidebar","localized":"","hint":"sidebar on the right side of the screen","ui":"settings_ui"},
+ {"id":"","label":"Show log view","localized":"","hint":"Show log view at the bottom of the main window","ui":"settings_ui"},
+ {"id":"","label":"Show grid in results","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Send seed when sending prompt or image to other interface","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Send size when sending prompt or image to another interface","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show labels for aside tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show labels for main tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show labels for page tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show ticks for input range slider","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Show parameter outline","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Simple","localized":"","hint":"Very cheap approximation. Very fast compared to VAE, but produces pictures with 8 times smaller horizontal/vertical resolution and extremely low quality","ui":"settings_live-preview"},
+ {"id":"","label":"SeedVR CFG Scale","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Sort order","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Skip CivitAI scan for regex pattern(s)","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Show reference styles","localized":"","hint":"Show or hide build-it styles","ui":"settings_extra_networks"},
+ {"id":"","label":"Skip Generation if NaN found in latents","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save grids to a subdirectory","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Show live previews","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save resumable optimizer state when training","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save training settings to a text file","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Show previews as a grid","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Show progressbar","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save generated images within tensorboard","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save loss CSV file every n steps","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Save images to a subdirectory when using Save button","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Secondary model","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"SDXL","localized":"","hint":"StableDiffusion XL","ui":"component-5660"},
+ {"id":"","label":"Save metadata","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"safetensors","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"shuffle","localized":"","hint":"Loads full model in RAM and calculates on VRAM: Less speedup, suggested for SDXL merges","ui":"models_merge_tab"},
+ {"id":"","label":"Save diffusers","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Save safetensors","localized":"","hint":"","ui":"models_replace_tab"},
+ {"id":"","label":"Sort","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"Sort downloads into subfolders","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"Subfolder template","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"Search models","localized":"","hint":"","ui":"models_huggingface_tab"},
+ {"id":"","label":"Select model","localized":"","hint":"","ui":"models_huggingface_tab"},
+ {"id":"","label":"Specify model variant","localized":"","hint":"","ui":"models_huggingface_tab"},
+ {"id":"","label":"Specify model revision","localized":"","hint":"","ui":"models_huggingface_tab"},
+ {"id":"","label":"SegmentAnything","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Sections","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Samplers","localized":"","hint":"Samplers/schedulers advanced settings","ui":"tab_txt2img"}
],
- "t":
- [
- {"id":"txt2img_nav","label":"T2I","localized":"","hint":"Create image from text Legacy interface that mimics original text-to-image interface and behavior"},
- {"id":"","label":"T2I Adapter","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Tagger","localized":"","hint":"Tag images using anime-focused classification models like WaifuDiffusion or DeepBooru.","ui":"caption"},
- {"id":"btn_wd_tag","label":"Tag","localized":"","hint":"","ui":"caption"},
- {"id":"","label":"Text Encoder","localized":"","hint":"Settings related to text encoder and prompt encoding processing during generate"},
- {"id":"","label":"Text","localized":"","hint":"Create image from text"},
- {"id":"","label":"TorchAO","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"TensorRT","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Torch Options","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"Token Merging","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"TeaCache","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"Theme options","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Task History","localized":"","hint":""},
- {"id":"","label":"Timestep spacing","localized":"","hint":"Determines how timesteps are spaced across the diffusion process. Options: - default: the model default - leading: creates evenly spaced steps - linspace: includes the first and last steps and evenly selects the remaining intermediate steps - trailing: only includes the last step and evenly selects the remaining intermediate steps starting from the end","ui":"txt2img"},
- {"id":"","label":"Timesteps presets","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Timesteps override","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"thresholding","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Texture tiling","localized":"","hint":"Apply seamless tiling to generated image so it can be used as a texture","ui":"txt2img"},
- {"id":"","label":"Threshold","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Trigger word","localized":"","hint":"","ui":"script_face"},
- {"id":"","label":"Temperature","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
- {"id":"","label":"Timestep","localized":"","hint":"","ui":"script_kohya_hires_fix"},
- {"id":"","label":"Tile prompt: x=1 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=1 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=1 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=1 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=2 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=2 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=2 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=2 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=3 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=3 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=3 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=3 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=4 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=4 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=4 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Tile prompt: x=4 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Temporal frequency","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Top-K","localized":"","hint":"Limits token selection to the K most likely candidates at each step. Lower values (e.g., 40) make outputs more focused and predictable, while higher values allow more diverse choices. Set to 0 to disable.","ui":"script_prompt_enhance"},
- {"id":"","label":"Top-P","localized":"","hint":"Selects tokens from the smallest set whose cumulative probability exceeds P (e.g., 0.9). Dynamically adapts the number of candidates based on model confidence; fewer options when certain, more when uncertain. Set to 1 to disable.","ui":"script_prompt_enhance"},
- {"id":"","label":"Thinking mode","localized":"","hint":"Enables thinking/reasoning, allowing the model to take more time to generate responses. This can lead to more thoughtful and detailed answers, but will increase response time. This setting affects both hybrid and thinking-only models, and in some may result in lower overall quality than expected. For thinking-only models like Qwen3-VL this setting might have to be combined with prefill to guarantee preventing thinking. Models supporting this feature are marked with an icon.","ui":"script_prompt_enhance"},
- {"id":"","label":"Target subject","localized":"","hint":"","ui":"script_blip_diffusion"},
- {"id":"","label":"Tool","localized":"","hint":"","ui":"script_flux_tools"},
- {"id":"","label":"Textbox","localized":"","hint":"","ui":"script_ledits"},
- {"id":"","label":"Tile overlap","localized":"","hint":"For SD upscale, how much overlap in pixels should there be between tiles. Tiles overlap so that when they are merged back into one picture, there is no clearly visible seam","ui":"script_sd_upscale"},
- {"id":"","label":"T2I Strength","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Time embedding mix","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Tiling options","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Tiny","localized":"","hint":"","ui":"control"},
- {"id":"","label":"True guidance","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Tile frames","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Task","localized":"","hint":"Changes which task the model will perform. Regular text prompts can be used when the task is set to Use Prompt . When other options are selected, see the hint text inside an empty Prompt field for guidance.","ui":"caption"},
- {"id":"","label":"Tagger Model","localized":"","hint":"Model to use for image tagging.WaifuDiffusion models (wd-*): Modern taggers with separate general and character thresholds.DeepBooru : Legacy tagger, uses only general threshold.","ui":"caption"},
- {"id":"","label":"Torch","localized":"","hint":"","ui":"component-8625"},
- {"id":"","label":"Transformers load using Run:ai streamer","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Temporal steps","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"TE","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"true","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"Text encoder model","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Text encoder cache size","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"T5: Use shared instance of text encoder","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Tunable ops limit","localized":"","hint":"","ui":"settings_backends"},
- {"id":"","label":"ToMe","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"ToDo","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"ToMe token merging ratio","localized":"","hint":"Enable redundant token merging via tomesd for speed and memory improvements, 0=disabled","ui":"settings_advanced"},
- {"id":"","label":"ToDo token merging ratio","localized":"","hint":"Enable redundant token merging via todo for speed and memory improvements, 0=disabled","ui":"settings_advanced"},
- {"id":"","label":"TaylorSeer","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"TeaCache cache enabled","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"TeaCache L1 threshold","localized":"","hint":"","ui":"settings_advanced"},
- {"id":"","label":"TAESD","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"TAESD variant","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"TAESD decode layers","localized":"","hint":"","ui":"settings_live-preview"},
- {"id":"","label":"Tensorboard flush period","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Tertiary model","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"Target model type","localized":"","hint":"","ui":"models_civitai_tab"},
- {"id":"","label":"T2I-Adapter unit 1","localized":"","hint":"","ui":"control"},
- {"id":"","label":"T2I-Adapter unit 2","localized":"","hint":"","ui":"control"},
- {"id":"","label":"T2I-Adapter unit 3","localized":"","hint":"","ui":"control"},
- {"id":"","label":"T2I-Adapter unit 4","localized":"","hint":"","ui":"control"}
+ "t": [
+ {"id":"txt2img_nav","label":"T2I","localized":"","hint":"Create image from text Legacy interface that mimics original text-to-image interface and behavior"},
+ {"id":"","label":"T2I Adapter","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Tagger","localized":"","hint":"Tag images using anime-focused classification models like WaifuDiffusion or DeepBooru.","ui":"caption"},
+ {"id":"btn_wd_tag","label":"Tag","localized":"","hint":"","ui":"caption"},
+ {"id":"","label":"Text Encoder","localized":"","hint":"Settings related to text encoder and prompt encoding processing during generate"},
+ {"id":"","label":"Text","localized":"","hint":"Create image from text"},
+ {"id":"","label":"TorchAO","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"TensorRT","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Torch Options","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"Token Merging","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"TeaCache","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"Theme options","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Task History","localized":"","hint":""},
+ {"id":"","label":"Tone","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Timestep spacing","localized":"","hint":"Determines how timesteps are spaced across the diffusion process. Options: - default: the model default - leading: creates evenly spaced steps - linspace: includes the first and last steps and evenly selects the remaining intermediate steps - trailing: only includes the last step and evenly selects the remaining intermediate steps starting from the end","ui":"txt2img"},
+ {"id":"","label":"Timesteps presets","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Timesteps override","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"thresholding","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Tint strength","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Texture tiling","localized":"","hint":"Apply seamless tiling to generated image so it can be used as a texture","ui":"txt2img"},
+ {"id":"","label":"Threshold","localized":"","hint":"","ui":"script_apg"},
+ {"id":"","label":"Trigger word","localized":"","hint":"","ui":"script_face"},
+ {"id":"","label":"Temperature","localized":"","hint":"","ui":"script_flux_prompt_enhance_(legacy)"},
+ {"id":"","label":"Timestep","localized":"","hint":"","ui":"script_kohya_hires_fix"},
+ {"id":"","label":"Tile prompt: x=1 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=1 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=1 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=1 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=2 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=2 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=2 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=2 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=3 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=3 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=3 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=3 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=4 y=1","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=4 y=2","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=4 y=3","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Tile prompt: x=4 y=4","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Temporal frequency","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Top-K","localized":"","hint":"Limits token selection to the K most likely candidates at each step. Lower values (e.g., 40) make outputs more focused and predictable, while higher values allow more diverse choices. Set to 0 to disable.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Top-P","localized":"","hint":"Selects tokens from the smallest set whose cumulative probability exceeds P (e.g., 0.9). Dynamically adapts the number of candidates based on model confidence; fewer options when certain, more when uncertain. Set to 1 to disable.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Thinking mode","localized":"","hint":"Enables thinking/reasoning, allowing the model to take more time to generate responses. This can lead to more thoughtful and detailed answers, but will increase response time. This setting affects both hybrid and thinking-only models, and in some may result in lower overall quality than expected. For thinking-only models like Qwen3-VL this setting might have to be combined with prefill to guarantee preventing thinking. Models supporting this feature are marked with an icon.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Target subject","localized":"","hint":"","ui":"script_blip_diffusion"},
+ {"id":"","label":"Tool","localized":"","hint":"","ui":"script_flux_tools"},
+ {"id":"","label":"Textbox","localized":"","hint":"","ui":"script_ledits"},
+ {"id":"","label":"Tile overlap","localized":"","hint":"For SD upscale, how much overlap in pixels should there be between tiles. Tiles overlap so that when they are merged back into one picture, there is no clearly visible seam","ui":"script_sd_upscale"},
+ {"id":"","label":"T2I Strength","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Time embedding mix","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Tiling options","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Tiny","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"True guidance","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Tile frames","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Task","localized":"","hint":"Changes which task the model will perform. Regular text prompts can be used when the task is set to Use Prompt . When other options are selected, see the hint text inside an empty Prompt field for guidance.","ui":"caption"},
+ {"id":"","label":"Tagger Model","localized":"","hint":"Model to use for image tagging.WaifuDiffusion models (wd-*): Modern taggers with separate general and character thresholds.DeepBooru : Legacy tagger, uses only general threshold.","ui":"caption"},
+ {"id":"","label":"Torch","localized":"","hint":"","ui":"component-8779"},
+ {"id":"","label":"Transformers load using Run:ai streamer","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Temporal steps","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"TE","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"true","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"Text encoder model","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Text encoder cache size","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"T5: Use shared instance of text encoder","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Tunable ops limit","localized":"","hint":"","ui":"settings_backends"},
+ {"id":"","label":"ToMe","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"ToDo","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"ToMe token merging ratio","localized":"","hint":"Enable redundant token merging via tomesd for speed and memory improvements, 0=disabled","ui":"settings_advanced"},
+ {"id":"","label":"ToDo token merging ratio","localized":"","hint":"Enable redundant token merging via todo for speed and memory improvements, 0=disabled","ui":"settings_advanced"},
+ {"id":"","label":"TaylorSeer","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"TeaCache cache enabled","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"TeaCache L1 threshold","localized":"","hint":"","ui":"settings_advanced"},
+ {"id":"","label":"TAESD","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"TAESD variant","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"TAESD decode layers","localized":"","hint":"","ui":"settings_live-preview"},
+ {"id":"","label":"Tensorboard flush period","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Tertiary model","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"Time period","localized":"","hint":"","ui":"models_civitai_tab"},
+ {"id":"","label":"T2I-Adapter unit 1","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"T2I-Adapter unit 2","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"T2I-Adapter unit 3","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"T2I-Adapter unit 4","localized":"","hint":"","ui":"control"}
],
- "u":
- [
- {"id":"prompt_enhance_unload","label":"Unload model","localized":"","hint":"Unload currently loaded model","ui":"script_prompt_enhance"},
- {"id":"","label":"Upload","localized":"","hint":"","ui":"img2img"},
- {"id":"vlm_unload","label":"Unload","localized":"","hint":"","ui":"caption"},
- {"id":"component-8586","label":"Update all installed","localized":"","hint":"Update installed extensions to their latest available version","ui":"component-8571"},
- {"id":"","label":"Update","localized":"","hint":""},
- {"id":"","label":"User interface","localized":"","hint":"Review and set user interface preferences"},
- {"id":"component-5511","label":"Update all","localized":"","hint":"","ui":"models_metadata_tab"},
- {"id":"","label":"Upscale","localized":"","hint":"Upscale image","ui":"extras"},
- {"id":"","label":"UI Tabs","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Upscaling","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Use segmentation","localized":"","hint":"Run detailer using segmentation mask","ui":"txt2img"},
- {"id":"","label":"Unload adapter","localized":"","hint":"Unload IP adapter immediately after generate. Otherwise IP adapter will remain loaded for faster use in next generate process","ui":"txt2img"},
- {"id":"","label":"Use same seed","localized":"","hint":"","ui":"script_prompts_from_file"},
- {"id":"","label":"Use defaults","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Use text inputs","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Use random seeds","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Use vision","localized":"","hint":"Include input image when enhancing prompt. Only available for vision-capable models, marked with icon.","ui":"script_prompt_enhance"},
- {"id":"","label":"Use samplers","localized":"","hint":"Enable to use sampling (randomly selecting tokens based on sampling methods like Top-k or Top-p) or disable to use greedy decoding (selecting the most probable token at each step). Enabling makes outputs more diverse and creative but less deterministic.","ui":"script_prompt_enhance"},
- {"id":"","label":"Unload after processing","localized":"","hint":"","ui":"script_instantir"},
- {"id":"","label":"up","localized":"","hint":"","ui":"script_outpainting"},
- {"id":"","label":"Upscaler","localized":"","hint":"Which pre-trained model to use for the upscaling process.","ui":"script_sd_upscale"},
- {"id":"","label":"Units","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Unload processor","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Use spaces","localized":"","hint":"Replace underscores with spaces in tag output. Some prompt systems prefer spaces between words (e.g., 'long hair') while others use underscores (e.g., 'long_hair').","ui":"caption"},
- {"id":"","label":"Username","localized":"","hint":"","ui":"component-8669"},
- {"id":"","label":"UNET model","localized":"","hint":"","ui":"settings_sd"},
- {"id":"","label":"Use torch streams","localized":"","hint":"","ui":"settings_offload"},
- {"id":"","label":"Use SVD quantization","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Use Dynamic quantization","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Use quantized MatMul","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Use quantized MatMul with conv","localized":"","hint":"","ui":"settings_quantization"},
- {"id":"","label":"Use line break as prompt segment marker","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"Use zeros for prompt padding","localized":"","hint":"Force full zero tensor when prompt is empty to remove any residual noise","ui":"settings_text_encoder"},
- {"id":"","label":"Upcast sampling","localized":"","hint":"Usually produces similar results to --no-half with better performance while using less memory","ui":"settings_cuda"},
- {"id":"","label":"Unset","localized":"","hint":"","ui":"settings_cuda"},
- {"id":"","label":"UI save only saves selected image","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Use image gallery cache","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Use fixed width thumbnails","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"UI theme","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"UI request timeout","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"UI locale","localized":"","hint":"","ui":"settings_ui"},
- {"id":"","label":"Unload upscaler after processing","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Upscaler latent steps","localized":"","hint":"","ui":"settings_postprocessing"},
- {"id":"","label":"Upscaler tile size","localized":"","hint":"0 = no tiling","ui":"settings_postprocessing"},
- {"id":"","label":"Upscaler tile overlap","localized":"","hint":"Low values = visible seam","ui":"settings_postprocessing"},
- {"id":"","label":"Use cached model config when available","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"UI show on startup","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"UI sidebar width (%)","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"UI height (%)","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"UI fetch network info on mouse-over","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"Use reference values when available","localized":"","hint":"","ui":"settings_extra_networks"},
- {"id":"","label":"user","localized":"","hint":"","ui":"settings_extensions"},
- {"id":"","label":"Upcast attention layer","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Use separate base dict","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Use model EMA weights when possible","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Use Kohya method for handling multiple LoRA","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"UI scripts order","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Use upscaler as suffix","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"Unload Current Model from VRAM","localized":"","hint":"","ui":"models_merge_tab"},
- {"id":"","label":"unet","localized":"","hint":"","ui":"component-5745"},
- {"id":"","label":"Upsample","localized":"","hint":"","ui":"video"}
+ "u": [
+ {"id":"prompt_enhance_unload","label":"Unload model","localized":"","hint":"Unload currently loaded model","ui":"script_prompt_enhance"},
+ {"id":"","label":"Upload","localized":"","hint":"","ui":"img2img"},
+ {"id":"vlm_unload","label":"Unload","localized":"","hint":"","ui":"caption"},
+ {"id":"component-8739","label":"Update all installed","localized":"","hint":"Update installed extensions to their latest available version","ui":"component-8724"},
+ {"id":"","label":"Update","localized":"","hint":""},
+ {"id":"","label":"User interface","localized":"","hint":"Review and set user interface preferences"},
+ {"id":"component-5611","label":"Update all","localized":"","hint":"","ui":"models_metadata_tab"},
+ {"id":"","label":"UNet/DiT","localized":"","hint":""},
+ {"id":"","label":"Upscale","localized":"","hint":"Upscale image","ui":"extras"},
+ {"id":"","label":"UI Tabs","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Upscaling","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Use segmentation","localized":"","hint":"Run detailer using segmentation mask","ui":"txt2img"},
+ {"id":"","label":"Unload adapter","localized":"","hint":"Unload IP adapter immediately after generate. Otherwise IP adapter will remain loaded for faster use in next generate process","ui":"txt2img"},
+ {"id":"","label":"Use same seed","localized":"","hint":"","ui":"script_prompts_from_file"},
+ {"id":"","label":"Use defaults","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Use text inputs","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Use random seeds","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Use vision","localized":"","hint":"Include input image when enhancing prompt. Only available for vision-capable models, marked with icon.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Use samplers","localized":"","hint":"Enable to use sampling (randomly selecting tokens based on sampling methods like Top-k or Top-p) or disable to use greedy decoding (selecting the most probable token at each step). Enabling makes outputs more diverse and creative but less deterministic.","ui":"script_prompt_enhance"},
+ {"id":"","label":"Unload after processing","localized":"","hint":"","ui":"script_instantir"},
+ {"id":"","label":"up","localized":"","hint":"","ui":"script_outpainting"},
+ {"id":"","label":"Upscaler","localized":"","hint":"Which pre-trained model to use for the upscaling process.","ui":"script_sd_upscale"},
+ {"id":"","label":"Units","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Unload processor","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Use spaces","localized":"","hint":"Replace underscores with spaces in tag output. Some prompt systems prefer spaces between words (e.g., 'long hair') while others use underscores (e.g., 'long_hair').","ui":"caption"},
+ {"id":"","label":"Username","localized":"","hint":"","ui":"component-8823"},
+ {"id":"","label":"UNET model","localized":"","hint":"","ui":"settings_sd"},
+ {"id":"","label":"Use torch streams","localized":"","hint":"","ui":"settings_offload"},
+ {"id":"","label":"Use SVD quantization","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Use Dynamic quantization","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Use quantized MatMul","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Use quantized MatMul with conv","localized":"","hint":"","ui":"settings_quantization"},
+ {"id":"","label":"Use line break as prompt segment marker","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"Use zeros for prompt padding","localized":"","hint":"Force full zero tensor when prompt is empty to remove any residual noise","ui":"settings_text_encoder"},
+ {"id":"","label":"Upcast sampling","localized":"","hint":"Usually produces similar results to --no-half with better performance while using less memory","ui":"settings_cuda"},
+ {"id":"","label":"Unset","localized":"","hint":"","ui":"settings_cuda"},
+ {"id":"","label":"UI save only saves selected image","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Use image gallery cache","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Use fixed width thumbnails","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"UI theme","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"UI request timeout","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"UI locale","localized":"","hint":"","ui":"settings_ui"},
+ {"id":"","label":"Unload upscaler after processing","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Upscaler latent steps","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Upscaler tile size","localized":"","hint":"0 = no tiling","ui":"settings_postprocessing"},
+ {"id":"","label":"Upscaler tile overlap","localized":"","hint":"Low values = visible seam","ui":"settings_postprocessing"},
+ {"id":"","label":"Use cached model config when available","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"UI show on startup","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"UI sidebar width (%)","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"UI height (%)","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"UI fetch network info on mouse-over","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"Use reference values when available","localized":"","hint":"","ui":"settings_extra_networks"},
+ {"id":"","label":"user","localized":"","hint":"","ui":"settings_extensions"},
+ {"id":"","label":"Upcast attention layer","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Use separate base dict","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Use model EMA weights when possible","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Use Kohya method for handling multiple LoRA","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"UI scripts order","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Use upscaler as suffix","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"Unload Current Model from VRAM","localized":"","hint":"","ui":"models_merge_tab"},
+ {"id":"","label":"unet","localized":"","hint":"","ui":"component-5851"},
+ {"id":"","label":"Upsample","localized":"","hint":"","ui":"video"}
],
- "v":
- [
- {"id":"video_nav","label":"Video","localized":"","hint":"Create videos using different methods Supports text-to-image, image-to-image first-last-frame, etc."},
- {"id":"video_params_outputs","label":"Video Params","localized":"","hint":"Settings related output video file encoding","ui":"video"},
- {"id":"","label":"VLM Caption","localized":"","hint":"Analyze image using vision language model","ui":"caption"},
- {"id":"","label":"Variational Auto Encoder","localized":"","hint":"Settings related to Variational Auto Encoder and image decoding process during generate"},
- {"id":"","label":"VAE","localized":"","hint":"Variational Auto Encoder: model used to run image decode at the end of generate"},
- {"id":"","label":"Video Output","localized":"","hint":"","ui":"tab_video"},
- {"id":"","label":"Variation","localized":"","hint":"Second seed to be mixed with primary seed","ui":"txt2img"},
- {"id":"","label":"Variation strength","localized":"","hint":"How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something)","ui":"txt2img"},
- {"id":"","label":"VAE type","localized":"","hint":"Choose if you want to run full VAE, reduced quality VAE or attempt to use remote VAE service","ui":"txt2img"},
- {"id":"","label":"Vibrance","localized":"","hint":"","ui":"script_lut_color_grading"},
- {"id":"","label":"Version","localized":"","hint":"","ui":"script_pulid"},
- {"id":"","label":"Video format","localized":"","hint":"Format and codec of output video","ui":"script_video"},
- {"id":"","label":"Video duration","localized":"","hint":"","ui":"script_video"},
- {"id":"","label":"Video engine","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video model","localized":"","hint":"","ui":"video"},
- {"id":"","label":"VAE decode","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video interpolation","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video codec","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video options","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video save video","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video save frames","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video save safetensors","localized":"","hint":"","ui":"video"},
- {"id":"","label":"Video file","localized":"","hint":"","ui":"extras"},
- {"id":"","label":"VLM Model","localized":"","hint":"Select which model to use for Visual Language tasks. Models which support thinking mode are marked with an icon.","ui":"caption"},
- {"id":"","label":"VLM Max Tokens","localized":"","hint":"Maximum number of tokens the model can generate in its response. The model is not aware of this limit during generation and it won't make the model try to generate more detailed or more concise responses, it simply sets the hard limit for the length, and will forcefully cut off the response when the limit is reached.","ui":"caption"},
- {"id":"","label":"VLM Num Beams","localized":"","hint":"Maintains multiple candidate paths simultaneously and selects the overall best sequence. Like exploring several drafts at once to find the best one. More thorough but much slower and less creative than random sampling. Generally not recommended, most modern VLMs perform better with sampling methods. Set to 1 to disable.","ui":"caption"},
- {"id":"","label":"VLM Temperature","localized":"","hint":"Controls randomness in token selection. Lower values (e.g., 0.1) make outputs more focused and deterministic, always choosing high-probability tokens. Higher values (e.g., 0.9) increase creativity and diversity by allowing less probable tokens. Set to 0 for fully deterministic output (always picks the most likely token).","ui":"caption"},
- {"id":"","label":"VLM","localized":"","hint":"","ui":"caption"},
- {"id":"","label":"VAE model","localized":"","hint":"VAE helps with fine details in the final image and may also alter colors","ui":"settings_vae_encoder"},
- {"id":"","label":"VAE slicing","localized":"","hint":"Decodes batch latents one image at a time with limited VRAM. Small performance boost in VAE decode on multi-image batches","ui":"settings_vae_encoder"},
- {"id":"","label":"VAE tiling","localized":"","hint":"Divide large images into overlapping tiles with limited VRAM. Results in a minor increase in processing time","ui":"settings_vae_encoder"},
- {"id":"","label":"VAE tile size","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"VAE tile overlap","localized":"","hint":"","ui":"settings_vae_encoder"},
- {"id":"","label":"verbose","localized":"","hint":"","ui":"settings_compile"},
- {"id":"","label":"VAE sliced encode","localized":"","hint":"","ui":"settings_legacy_options"},
- {"id":"","label":"VGen params","localized":"","hint":"","ui":"script_video"}
+ "v": [
+ {"id":"video_nav","label":"Video","localized":"","hint":"Create videos using different methods Supports text-to-image, image-to-image first-last-frame, etc."},
+ {"id":"video_params_outputs","label":"Video Params","localized":"","hint":"Settings related output video file encoding","ui":"video"},
+ {"id":"","label":"VLM Caption","localized":"","hint":"Analyze image using vision language model","ui":"caption"},
+ {"id":"","label":"Variational Auto Encoder","localized":"","hint":"Settings related to Variational Auto Encoder and image decoding process during generate"},
+ {"id":"","label":"Video Output","localized":"","hint":"","ui":"tab_video"},
+ {"id":"","label":"Variation","localized":"","hint":"Second seed to be mixed with primary seed","ui":"txt2img"},
+ {"id":"","label":"Variation strength","localized":"","hint":"How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed (except for ancestral samplers, where you will just get something)","ui":"txt2img"},
+ {"id":"","label":"Vignette","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"VAE type","localized":"","hint":"Choose if you want to run full VAE, reduced quality VAE or attempt to use remote VAE service","ui":"txt2img"},
+ {"id":"","label":"Version","localized":"","hint":"","ui":"script_pulid"},
+ {"id":"","label":"Video format","localized":"","hint":"Format and codec of output video","ui":"script_video"},
+ {"id":"","label":"Video duration","localized":"","hint":"","ui":"script_video"},
+ {"id":"","label":"Video engine","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video model","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"VAE decode","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video interpolation","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video codec","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video options","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video save video","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video save frames","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video save safetensors","localized":"","hint":"","ui":"video"},
+ {"id":"","label":"Video file","localized":"","hint":"","ui":"extras"},
+ {"id":"","label":"VLM Model","localized":"","hint":"Select which model to use for Visual Language tasks. Models which support thinking mode are marked with an icon.","ui":"caption"},
+ {"id":"","label":"VLM Max Tokens","localized":"","hint":"Maximum number of tokens the model can generate in its response. The model is not aware of this limit during generation and it won't make the model try to generate more detailed or more concise responses, it simply sets the hard limit for the length, and will forcefully cut off the response when the limit is reached.","ui":"caption"},
+ {"id":"","label":"VLM Num Beams","localized":"","hint":"Maintains multiple candidate paths simultaneously and selects the overall best sequence. Like exploring several drafts at once to find the best one. More thorough but much slower and less creative than random sampling. Generally not recommended, most modern VLMs perform better with sampling methods. Set to 1 to disable.","ui":"caption"},
+ {"id":"","label":"VLM Temperature","localized":"","hint":"Controls randomness in token selection. Lower values (e.g., 0.1) make outputs more focused and deterministic, always choosing high-probability tokens. Higher values (e.g., 0.9) increase creativity and diversity by allowing less probable tokens. Set to 0 for fully deterministic output (always picks the most likely token).","ui":"caption"},
+ {"id":"","label":"VLM","localized":"","hint":"","ui":"caption"},
+ {"id":"","label":"VAE","localized":"","hint":"Variational Auto Encoder: model used to run image decode at the end of generate","ui":"settings_quantization"},
+ {"id":"","label":"VAE model","localized":"","hint":"VAE helps with fine details in the final image and may also alter colors","ui":"settings_vae_encoder"},
+ {"id":"","label":"VAE slicing","localized":"","hint":"Decodes batch latents one image at a time with limited VRAM. Small performance boost in VAE decode on multi-image batches","ui":"settings_vae_encoder"},
+ {"id":"","label":"VAE tiling","localized":"","hint":"Divide large images into overlapping tiles with limited VRAM. Results in a minor increase in processing time","ui":"settings_vae_encoder"},
+ {"id":"","label":"VAE tile size","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"VAE tile overlap","localized":"","hint":"","ui":"settings_vae_encoder"},
+ {"id":"","label":"verbose","localized":"","hint":"","ui":"settings_compile"},
+ {"id":"","label":"VAE sliced encode","localized":"","hint":"","ui":"settings_legacy_options"},
+ {"id":"","label":"VGen params","localized":"","hint":"","ui":"script_video"}
],
- "w":
- [
- {"id":"","label":"Wiki","localized":"","hint":""},
- {"id":"","label":"Wildcards","localized":"","hint":""},
- {"id":"","label":"WanAI","localized":"","hint":"","ui":"settings_model_options"},
- {"id":"","label":"Watermarking","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Width","localized":"","hint":"Image width","ui":"txt2img"},
- {"id":"","label":"Warmth","localized":"","hint":"","ui":"script_lut_color_grading"},
- {"id":"","label":"Weight","localized":"","hint":"","ui":"script_resadapter"},
- {"id":"","label":"Width after","localized":"","hint":"","ui":"control"},
- {"id":"","label":"Width mask","localized":"","hint":"","ui":"control"},
- {"id":"","label":"WebP lossless compression","localized":"","hint":"","ui":"settings_saving-images"},
- {"id":"","label":"Weights clip","localized":"","hint":"Forced merged weights to be no heavier than the original model, preventing burn in and overly saturated models","ui":"models_merge_tab"}
+ "w": [
+ {"id":"","label":"Wiki","localized":"","hint":""},
+ {"id":"","label":"Wildcards","localized":"","hint":""},
+ {"id":"","label":"WanAI","localized":"","hint":"","ui":"settings_model_options"},
+ {"id":"","label":"Watermarking","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"Width","localized":"","hint":"Image width","ui":"txt2img"},
+ {"id":"","label":"Weight","localized":"","hint":"","ui":"script_resadapter"},
+ {"id":"","label":"Width after","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"Width mask","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"WebP lossless compression","localized":"","hint":"","ui":"settings_saving-images"},
+ {"id":"","label":"wavelet","localized":"","hint":"","ui":"settings_postprocessing"},
+ {"id":"","label":"Weights clip","localized":"","hint":"Forced merged weights to be no heavier than the original model, preventing burn in and overly saturated models","ui":"models_merge_tab"}
],
- "x":
- [
- {"id":"","label":"XS","localized":"","hint":"","ui":"control"},
- {"id":"","label":"X components","localized":"","hint":"","ui":"script_mixture_tiling"},
- {"id":"","label":"X overlap","localized":"","hint":"","ui":"script_mixture_tiling"},
- {"id":"","label":"X-axis tiles","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"X-axis tile overlap","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"X type","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"X values","localized":"","hint":"Separate values for X axis using commas","ui":"script_xyz_grid_script"},
- {"id":"","label":"xhinker","localized":"","hint":"","ui":"settings_text_encoder"},
- {"id":"","label":"xFormers","localized":"","hint":"Memory optimization. Non-Deterministic (different results each time)","ui":"settings_cuda"},
- {"id":"","label":"xet","localized":"","hint":"","ui":"settings_huggingface"},
- {"id":"","label":"XYZ Grid","localized":"","hint":"XYZ grid is a powerful module that create image grid based on varying multiple generation parameters","ui":"script_xyz_grid"}
+ "x": [
+ {"id":"","label":"XS","localized":"","hint":"","ui":"control"},
+ {"id":"","label":"X components","localized":"","hint":"","ui":"script_mixture_tiling"},
+ {"id":"","label":"X overlap","localized":"","hint":"","ui":"script_mixture_tiling"},
+ {"id":"","label":"X-axis tiles","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"X-axis tile overlap","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"X type","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"X values","localized":"","hint":"Separate values for X axis using commas","ui":"script_xyz_grid_script"},
+ {"id":"","label":"xhinker","localized":"","hint":"","ui":"settings_text_encoder"},
+ {"id":"","label":"xFormers","localized":"","hint":"Memory optimization. Non-Deterministic (different results each time)","ui":"settings_cuda"},
+ {"id":"","label":"xet","localized":"","hint":"","ui":"settings_huggingface"},
+ {"id":"","label":"XYZ Grid","localized":"","hint":"XYZ grid is a powerful module that create image grid based on varying multiple generation parameters","ui":"script_xyz_grid"}
],
- "y":
- [
- {"id":"","label":"Y components","localized":"","hint":"","ui":"script_mixture_tiling"},
- {"id":"","label":"Y overlap","localized":"","hint":"","ui":"script_mixture_tiling"},
- {"id":"","label":"Y-axis tiles","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Y-axis tile overlap","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
- {"id":"","label":"Y type","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Y values","localized":"","hint":"Separate values for Y axis using commas","ui":"script_xyz_grid_script"}
+ "y": [
+ {"id":"","label":"Y components","localized":"","hint":"","ui":"script_mixture_tiling"},
+ {"id":"","label":"Y overlap","localized":"","hint":"","ui":"script_mixture_tiling"},
+ {"id":"","label":"Y-axis tiles","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Y-axis tile overlap","localized":"","hint":"","ui":"script_mixture-of-diffusers"},
+ {"id":"","label":"Y type","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Y values","localized":"","hint":"Separate values for Y axis using commas","ui":"script_xyz_grid_script"}
],
- "z":
- [
- {"id":"","label":"ZImageTurbo","localized":"","hint":"","ui":"component-100"},
- {"id":"","label":"zimage","localized":"","hint":"","ui":"component-100"},
- {"id":"","label":"ZeroStar init steps","localized":"","hint":"","ui":"txt2img"},
- {"id":"","label":"Zero","localized":"","hint":"","ui":"script_pulid"},
- {"id":"","label":"Z type","localized":"","hint":"","ui":"script_xyz_grid_script"},
- {"id":"","label":"Z values","localized":"","hint":"Separate values for Z axis using commas","ui":"script_xyz_grid_script"},
- {"id":"","label":"Zoe Depth","localized":"","hint":"","ui":"control"}
+ "z": [
+ {"id":"","label":"ZImageTurbo","localized":"","hint":"","ui":"component-106"},
+ {"id":"","label":"ZeroStar init steps","localized":"","hint":"","ui":"txt2img"},
+ {"id":"","label":"Zero","localized":"","hint":"","ui":"script_pulid"},
+ {"id":"","label":"Z type","localized":"","hint":"","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Z values","localized":"","hint":"Separate values for Z axis using commas","ui":"script_xyz_grid_script"},
+ {"id":"","label":"Zoe Depth","localized":"","hint":"","ui":"control"}
]
}
diff --git a/installer.py b/installer.py
index 6617596d6..d16acc70d 100644
--- a/installer.py
+++ b/installer.py
@@ -475,7 +475,7 @@ def check_diffusers():
t_start = time.time()
if args.skip_all:
return
- target_commit = "e5aa719241f9b74d6700be3320a777799bfab70a" # diffusers commit hash
+ target_commit = "c02c17c6ee7ac508c56925dde4d4a3c587650dc3" # diffusers commit hash
# if args.use_rocm or args.use_zluda or args.use_directml:
# sha = '043ab2520f6a19fce78e6e060a68dbc947edb9f9' # lock diffusers versions for now
pkg = package_spec('diffusers')
@@ -687,7 +687,7 @@ def install_ipex():
if args.use_nightly:
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/xpu')
else:
- torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.10.0+xpu torchvision==0.25.0+xpu --index-url https://download.pytorch.org/whl/xpu')
+ torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+xpu torchvision==0.26.0+xpu --index-url https://download.pytorch.org/whl/xpu')
ts('ipex', t_start)
return torch_command
@@ -700,13 +700,12 @@ def install_openvino():
#check_python(supported_minors=[10, 11, 12, 13], reason='OpenVINO backend requires a Python version between 3.10 and 3.13')
if sys.platform == 'darwin':
- torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.10.0 torchvision==0.25.0')
+ torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0 torchvision==0.26.0')
else:
- torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.10.0+cpu torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cpu')
+ torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+cpu torchvision==0.26.0 --index-url https://download.pytorch.org/whl/cpu')
if not (args.skip_all or args.skip_requirements):
- install(os.environ.get('OPENVINO_COMMAND', 'openvino==2025.4.1'), 'openvino')
- install(os.environ.get('NNCF_COMMAND', 'nncf==2.19.0'), 'nncf')
+ install(os.environ.get('OPENVINO_COMMAND', 'openvino==2026.0.0'), 'openvino')
ts('openvino', t_start)
return torch_command
@@ -730,12 +729,8 @@ def install_torch_addons():
install('DeepCache')
if opts.get('cuda_compile_backend', '') == 'olive-ai':
install('olive-ai')
- if len(opts.get('optimum_quanto_weights', [])):
- install('optimum-quanto==0.2.7', 'optimum-quanto')
- if len(opts.get('torchao_quantization', [])):
- install('torchao==0.10.0', 'torchao')
if opts.get('samples_format', 'jpg') == 'jxl' or opts.get('grid_format', 'jpg') == 'jxl':
- install('pillow-jxl-plugin==1.3.5', 'pillow-jxl-plugin')
+ install('pillow-jxl-plugin==1.3.7', 'pillow-jxl-plugin')
if not args.experimental:
uninstall('wandb', quiet=True)
uninstall('pynvml', quiet=True)
@@ -894,7 +889,7 @@ def check_torch():
elif torch.version.hip and allow_rocm:
torch_info.set(type='rocm', hip=torch.version.hip)
else:
- log.warning('Unknown Torch backend')
+ log.warning('Torch backend: cannot detect type')
log.info(f"Torch backend: {torch_info}")
for device in [torch.cuda.device(i) for i in range(torch.cuda.device_count())]:
gpu = {
@@ -1184,14 +1179,11 @@ def install_optional():
install('hf_transfer', ignore=True, quiet=True)
install('hf_xet', ignore=True, quiet=True)
install('nvidia-ml-py', ignore=True, quiet=True)
- install('pillow-jxl-plugin==1.3.5', ignore=True, quiet=True)
+ install('pillow-jxl-plugin==1.3.7', ignore=True, quiet=True)
install('ultralytics==8.3.40', ignore=True, quiet=True)
install('open-clip-torch', no_deps=True, quiet=True)
install('git+https://github.com/tencent-ailab/IP-Adapter.git', 'ip_adapter', ignore=True, quiet=True)
# install('git+https://github.com/openai/CLIP.git', 'clip', quiet=True, no_build_isolation=True)
- # install('torchao==0.10.0', ignore=True, quiet=True)
- # install('bitsandbytes==0.47.0', ignore=True, quiet=True)
- # install('optimum-quanto==0.2.7', ignore=True, quiet=True)
ts('optional', t_start)
@@ -1235,6 +1227,7 @@ def install_requirements():
# set environment variables controling the behavior of various libraries
def set_environment():
log.debug('Setting environment tuning')
+ os.environ.setdefault('PIP_CONSTRAINT', os.path.abspath('constraints.txt'))
os.environ.setdefault('ACCELERATE', 'True')
os.environ.setdefault('ATTN_PRECISION', 'fp16')
os.environ.setdefault('ClDeviceGlobalMemSizeAvailablePercent', '100')
diff --git a/javascript/ui.js b/javascript/ui.js
index e76d55611..913cb0fc6 100644
--- a/javascript/ui.js
+++ b/javascript/ui.js
@@ -524,6 +524,14 @@ function selectVAE(name) {
markSelectedCards([desiredVAEName], 'vae');
}
+let desiredUNetName = null;
+function selectUNet(name) {
+ desiredUNetName = name;
+ gradioApp().getElementById('change_unet').click();
+ log(`selectUNet: ${desiredUNetName}`);
+ markSelectedCards([desiredUNetName], 'unet');
+}
+
function selectReference(name) {
log(`selectReference: ${name}`);
desiredCheckpointName = name;
diff --git a/launch.py b/launch.py
index 3099bba33..14e11274e 100755
--- a/launch.py
+++ b/launch.py
@@ -308,6 +308,7 @@ def main():
log.warning('Restart is recommended due to packages updates...')
t_server = time.time()
t_monitor = time.time()
+
while True:
try:
alive = uv.thread.is_alive()
@@ -326,8 +327,10 @@ def main():
if float(monitor_rate) > 0 and t_current - t_monitor > float(monitor_rate):
log.trace(f'Monitor: {get_memory_stats(detailed=True)}')
t_monitor = t_current
- from modules.api.validate import get_api_stats
- get_api_stats()
+ # from modules.api.validate import get_api_stats
+ # get_api_stats()
+ # from modules import memstats
+ # memstats.get_objects()
if not alive:
if uv is not None and uv.wants_restart:
clean_server()
diff --git a/modules/api/api.py b/modules/api/api.py
index 15cf83884..f460fea51 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -88,6 +88,7 @@ class Api:
self.add_api_route("/sdapi/v1/sd-vae", endpoints.get_sd_vaes, methods=["GET"], response_model=list[models.ItemVae])
self.add_api_route("/sdapi/v1/extensions", endpoints.get_extensions_list, methods=["GET"], response_model=list[models.ItemExtension])
self.add_api_route("/sdapi/v1/extra-networks", endpoints.get_extra_networks, methods=["GET"], response_model=list[models.ItemExtraNetwork])
+ self.add_api_route("/sdapi/v1/unets", endpoints.get_unets, methods=["GET"], response_model=list[models.ItemUNet])
# functional api
self.add_api_route("/sdapi/v1/png-info", endpoints.post_pnginfo, methods=["POST"], response_model=models.ResImageInfo, tags=["Functional"])
@@ -98,6 +99,7 @@ class Api:
self.add_api_route("/sdapi/v1/reload-checkpoint", endpoints.post_reload_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/lock-checkpoint", endpoints.post_lock_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-vae", endpoints.post_refresh_vae, methods=["POST"], tags=["Functional"])
+ self.add_api_route("/sdapi/v1/refresh-unets", endpoints.post_refresh_unets, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/latents", endpoints.get_latent_history, methods=["GET"], response_model=list[str], tags=["Functional"])
self.add_api_route("/sdapi/v1/latents", endpoints.post_latent_history, methods=["POST"], response_model=int, tags=["Functional"])
self.add_api_route("/sdapi/v1/modules", endpoints.get_modules, methods=["GET"], tags=["Functional"])
diff --git a/modules/api/endpoints.py b/modules/api/endpoints.py
index f950db601..d6c460bf9 100644
--- a/modules/api/endpoints.py
+++ b/modules/api/endpoints.py
@@ -65,7 +65,6 @@ get_restorers = get_detailers # legacy alias for /sdapi/v1/face-restorers
def get_ip_adapters():
"""
List available IP-Adapter models.
-
Returns adapter names that can be used for image-prompt conditioning during generation.
"""
from modules import ipadapter
@@ -75,6 +74,11 @@ def get_prompt_styles():
"""List all saved prompt styles with their prompt, negative prompt, and preview."""
return [{ 'name': v.name, 'prompt': v.prompt, 'negative_prompt': v.negative_prompt, 'extra': v.extra, 'filename': v.filename, 'preview': v.preview} for v in shared.prompt_styles.styles.values()]
+def get_unets():
+ """List available UNet models with their names and filenames."""
+ from modules.sd_unet import unet_dict
+ return [{"name": k, "filename": v} for k, v in unet_dict.items()]
+
def get_embeddings():
"""List loaded and skipped textual-inversion embeddings for the current model."""
db = getattr(shared.sd_model, 'embedding_db', None) if shared.sd_loaded else None
@@ -221,6 +225,11 @@ def post_lock_checkpoint(lock:bool=False):
modeldata.model_data.locked = lock
return {}
+def post_refresh_unets():
+ """Rescan UNet directories and update the available UNet list."""
+ import modules.sd_unet
+ return modules.sd_unet.refresh_unet_list()
+
def get_checkpoint():
"""Return information about the currently loaded checkpoint including type, class, title, and hash."""
if not shared.sd_loaded or shared.sd_model is None:
diff --git a/modules/api/models.py b/modules/api/models.py
index f32152027..47ccecd6b 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -146,6 +146,10 @@ class ItemStyle(BaseModel):
filename: str | None = Field(title="Filename", description="Path to the styles file")
preview: str | None = Field(title="Preview", description="URL to the style preview image")
+class ItemUNet(BaseModel):
+ name: str = Field(title="Name", description="UNet/DiT name")
+ filename: str | None = Field(title="Filename", description="Path to the UNet/DiT file")
+
class ItemExtraNetwork(BaseModel):
name: str = Field(title="Name", description="Network short name")
type: str = Field(title="Type", description="Network type (lora, checkpoint, embedding, etc.)")
diff --git a/modules/civitai/metadata_civitai.py b/modules/civitai/metadata_civitai.py
index c5c7b89e6..0cb01ca51 100644
--- a/modules/civitai/metadata_civitai.py
+++ b/modules/civitai/metadata_civitai.py
@@ -219,8 +219,8 @@ def civit_search_metadata(title: str | None = None, raw: bool = False):
import concurrent
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
future_items = {}
- for fn in candidates:
- future_items[executor.submit(atomic_civit_search_metadata, fn, results)] = fn
+ for candidate in candidates:
+ future_items[executor.submit(atomic_civit_search_metadata, candidate, results)] = candidate
for future in concurrent.futures.as_completed(future_items):
future.result()
yield results if raw else create_search_metadata_table(results)
diff --git a/modules/cmd_args.py b/modules/cmd_args.py
index 6c0390201..da5fe2a6c 100644
--- a/modules/cmd_args.py
+++ b/modules/cmd_args.py
@@ -74,8 +74,8 @@ def add_diag_args(p):
p.add_argument('--safe', default=env_flag("SD_SAFE", False), action='store_true', help="Run in safe mode with no user extensions")
p.add_argument('--test', default=env_flag("SD_TEST", False), action='store_true', help="Run test only and exit")
p.add_argument('--version', default=False, action='store_true', help="Print version information")
- p.add_argument("--monitor", default=os.environ.get("SD_MONITOR", -1), help="Run memory monitor, default: %(default)s")
- p.add_argument("--status", default=os.environ.get("SD_STATUS", -1), help="Run server is-alive status, default: %(default)s")
+ p.add_argument("--monitor", type=float, default=float(os.environ.get("SD_MONITOR", -1)), help="Run memory monitor, default: %(default)s")
+ p.add_argument("--status", type=float, default=float(os.environ.get("SD_STATUS", -1)), help="Run server is-alive status, default: %(default)s")
def add_log_args(p):
diff --git a/modules/control/units/controlnet.py b/modules/control/units/controlnet.py
index 96d882f4b..5bc231f56 100644
--- a/modules/control/units/controlnet.py
+++ b/modules/control/units/controlnet.py
@@ -382,22 +382,6 @@ class ControlNet():
self.model = sdnq_quantize_model(self.model)
except Exception as e:
log.error(f'Control {what} model SDNQ Compression failed: id="{model_id}" {e}')
- elif "Control" in opts.optimum_quanto_weights:
- try:
- log.debug(f'Control {what} model Optimum Quanto: id="{model_id}"')
- model_quant.load_quanto('Load model: type=Control')
- from modules.model_quant import optimum_quanto_model
- self.model = optimum_quanto_model(self.model)
- except Exception as e:
- log.error(f'Control {what} model Optimum Quanto: id="{model_id}" {e}')
- elif "Control" in opts.torchao_quantization:
- try:
- log.debug(f'Control {what} model Torch AO: id="{model_id}"')
- model_quant.load_torchao('Load model: type=Control')
- from modules.model_quant import torchao_quantization
- self.model = torchao_quantization(self.model)
- except Exception as e:
- log.error(f'Control {what} model Torch AO: id="{model_id}" {e}')
if self.device is not None:
sd_models.move_model(self.model, self.device)
if "Control" in opts.cuda_compile:
diff --git a/modules/enso.py b/modules/enso.py
index 1f6063659..cc9677ff5 100644
--- a/modules/enso.py
+++ b/modules/enso.py
@@ -1,5 +1,5 @@
import os
-from installer import log, git
+from installer import log, git, run_extension_installer
from modules.paths import extensions_dir
@@ -14,6 +14,7 @@ def install():
return
log.info(f'Enso: folder="{ENSO_DIR}" installing')
git(f'clone "{ENSO_REPO}" "{ENSO_DIR}"')
+ run_extension_installer(ENSO_DIR)
def update():
@@ -22,3 +23,4 @@ def update():
return
log.info(f'Enso: folder="{ENSO_DIR}" updating')
git('pull', folder=ENSO_DIR)
+ run_extension_installer(ENSO_DIR)
diff --git a/modules/errorlimiter.py b/modules/errorlimiter.py
index 93c96377a..b869a8553 100644
--- a/modules/errorlimiter.py
+++ b/modules/errorlimiter.py
@@ -12,7 +12,7 @@ _lock = Lock()
def _make_unique(name: str):
- global _instance_id
+ global _instance_id # pylint: disable=global-statement
with _lock: # Guard against race conditions
new_name = f"{name}__{_instance_id}"
_instance_id += 1
diff --git a/modules/intel/ipex/__init__.py b/modules/intel/ipex/__init__.py
index 6bd4cf9cd..523d19516 100644
--- a/modules/intel/ipex/__init__.py
+++ b/modules/intel/ipex/__init__.py
@@ -16,6 +16,28 @@ torch_version[0], torch_version[1] = int(torch_version[0]), int(torch_version[1]
# pylint: disable=protected-access, missing-function-docstring, line-too-long
+def return_true(*args, **kwargs):
+ return True
+
+def return_false(*args, **kwargs):
+ return False
+
+def return_none(*args, **kwargs):
+ return None
+
+def return_zero(*args, **kwargs):
+ return 0
+
+def return_cuda_version(*args, **kwargs):
+ return (12,1)
+
+def return_xpu_string(*args, **kwargs):
+ return "xpu"
+
+def return_arch_list(*args, **kwargs):
+ return ["pvc", "dg2", "ats-m150"]
+
+
def ipex_init(): # pylint: disable=too-many-statements
try:
if hasattr(torch, "cuda") and hasattr(torch.cuda, "is_xpu_hijacked") and torch.cuda.is_xpu_hijacked:
@@ -26,9 +48,9 @@ def ipex_init(): # pylint: disable=too-many-statements
# import inductor utils to get around lazy import
from torch._inductor import utils as torch_inductor_utils # pylint: disable=import-error, unused-import # noqa: F401,RUF100
torch._inductor.utils.GPU_TYPES = ["xpu"]
- torch._inductor.utils.get_gpu_type = lambda *args, **kwargs: "xpu"
+ torch._inductor.utils.get_gpu_type = return_xpu_string
from triton import backends as triton_backends # pylint: disable=import-error
- triton_backends.backends["nvidia"].driver.is_active = lambda *args, **kwargs: False
+ triton_backends.backends["nvidia"].driver.is_active = return_false
except Exception:
pass
# Replace cuda with xpu:
@@ -51,15 +73,12 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.cuda.default_generators = torch.xpu.default_generators
torch.cuda.set_stream = torch.xpu.set_stream
torch.cuda.torch = torch.xpu.torch
- torch.cuda.Union = torch.xpu.Union
torch.cuda.StreamContext = torch.xpu.StreamContext
torch.cuda.random = torch.xpu.random
torch.cuda._get_device_index = torch.xpu._get_device_index
torch.cuda._lazy_init = torch.xpu._lazy_init
torch.cuda._lazy_call = torch.xpu._lazy_call
- torch.cuda._device = torch.xpu._device
- torch.cuda._device_t = torch.xpu._device_t
- torch.cuda.is_current_stream_capturing = lambda: False
+ torch.cuda.is_current_stream_capturing = return_false
torch.cuda.__annotations__ = torch.xpu.__annotations__
torch.cuda.__builtins__ = torch.xpu.__builtins__
@@ -141,12 +160,23 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.cuda.memory_summary = torch.xpu.memory_summary
torch.cuda.memory_snapshot = torch.xpu.memory_snapshot
+ if torch_version[0] < 2 or (torch_version[0] == 2 and torch_version[1] < 11):
+ torch.cuda.Union = torch.xpu.Union
+ torch.cuda._device = torch.xpu._device
+ torch.cuda._device_t = torch.xpu._device_t
+
# Memory:
if "linux" in sys.platform and "WSL2" in os.popen("uname -a").read():
- torch.xpu.empty_cache = lambda: None
+ torch.xpu.empty_cache = return_none
torch.cuda.empty_cache = torch.xpu.empty_cache
- torch.cuda.memory = torch.xpu.memory
+ if torch_version[0] >= 2 and torch_version[1] >= 8:
+ old_cpa = torch.cuda.memory.CUDAPluggableAllocator
+ torch.cuda.memory = torch.xpu.memory
+ torch.xpu.memory.CUDAPluggableAllocator = old_cpa
+ else:
+ torch.cuda.memory = torch.xpu.memory
+
torch.cuda.memory_stats = torch.xpu.memory_stats
torch.cuda.memory_allocated = torch.xpu.memory_allocated
torch.cuda.max_memory_allocated = torch.xpu.max_memory_allocated
@@ -172,21 +202,24 @@ def ipex_init(): # pylint: disable=too-many-statements
torch.cuda.initial_seed = torch.xpu.initial_seed
# Fix functions with ipex:
- # torch.xpu.mem_get_info always returns the total memory as free memory
torch.has_cuda = True
torch.version.cuda = "12.1"
- torch.backends.cuda.is_built = lambda *args, **kwargs: True
- torch._utils._get_available_device_type = lambda: "xpu"
+ torch.backends.cuda.is_built = return_true
+ torch._utils._get_available_device_type = return_xpu_string
- torch.xpu.mem_get_info = lambda device=None: [(torch.xpu.get_device_properties(device).total_memory - torch.xpu.memory_reserved(device)), torch.xpu.get_device_properties(device).total_memory]
+ # torch.xpu.mem_get_info always returns the total memory as free memory
+ def mem_get_info(device=None):
+ return [(torch.xpu.get_device_properties(device).total_memory - torch.xpu.memory_reserved(device)), torch.xpu.get_device_properties(device).total_memory]
+ torch.xpu.mem_get_info = mem_get_info
torch.cuda.mem_get_info = torch.xpu.mem_get_info
+
torch.cuda.has_half = True
- torch.cuda.is_bf16_supported = getattr(torch.xpu, "is_bf16_supported", lambda *args, **kwargs: True)
- torch.cuda.is_fp16_supported = lambda *args, **kwargs: True
- torch.cuda.get_arch_list = getattr(torch.xpu, "get_arch_list", lambda: ["pvc", "dg2", "ats-m150"])
- torch.cuda.get_device_capability = lambda *args, **kwargs: (12,1)
- torch.cuda.ipc_collect = lambda *args, **kwargs: None
- torch.cuda.utilization = lambda *args, **kwargs: 0
+ torch.cuda.is_bf16_supported = getattr(torch.xpu, "is_bf16_supported", return_true)
+ torch.cuda.is_fp16_supported = getattr(torch.xpu, "is_fp16_supported", return_true)
+ torch.cuda.get_arch_list = getattr(torch.xpu, "get_arch_list", return_arch_list)
+ torch.cuda.get_device_capability = return_cuda_version
+ torch.cuda.ipc_collect = return_none
+ torch.cuda.utilization = return_zero
device_supports_fp64 = ipex_hijacks()
try:
diff --git a/modules/intel/ipex/hijacks.py b/modules/intel/ipex/hijacks.py
index 327d9f18a..63b7fad25 100644
--- a/modules/intel/ipex/hijacks.py
+++ b/modules/intel/ipex/hijacks.py
@@ -15,8 +15,10 @@ torch_version[0], torch_version[1] = int(torch_version[0]), int(torch_version[1]
device_supports_fp64 = torch.xpu.has_fp64_dtype() if hasattr(torch.xpu, "has_fp64_dtype") else torch.xpu.get_device_properties(devices.device).has_fp64
-# pylint: disable=protected-access, missing-function-docstring, line-too-long, unnecessary-lambda, no-else-return
+# pylint: disable=protected-access, missing-function-docstring, line-too-long, no-else-return
+def return_false(*args, **kwargs):
+ return False
@property
def is_cuda(self):
@@ -24,7 +26,7 @@ def is_cuda(self):
def check_device_type(device, device_type: str) -> bool:
- if device is None or type(device) not in {str, int, torch.device}:
+ if device is None or not isinstance(device, (str, int, torch.device)):
return False
else:
return bool(torch.device(device).type == device_type)
@@ -137,24 +139,9 @@ def as_tensor(data, dtype=None, device=None):
return original_as_tensor(data, dtype=dtype, device=device)
-original_torch_tensor = torch.tensor
-@wraps(torch.tensor)
-def torch_tensor(data, *args, dtype=None, device=None, **kwargs):
- global device_supports_fp64
- if check_cuda(device):
- device = return_xpu(device)
- if not device_supports_fp64 and check_device_type(device, "xpu"):
- if dtype == torch.float64:
- dtype = torch.float32
- elif dtype is None and (hasattr(data, "dtype") and (data.dtype == torch.float64 or data.dtype == float)):
- dtype = torch.float32
- return original_torch_tensor(data, *args, dtype=dtype, device=device, **kwargs)
-
-
torch.Tensor.original_Tensor_to = torch.Tensor.to
@wraps(torch.Tensor.to)
def Tensor_to(self, device=None, *args, **kwargs):
- global device_supports_fp64
if check_cuda(device):
device = return_xpu(device)
if not device_supports_fp64:
@@ -210,6 +197,24 @@ if torch_version[0] > 2 or (torch_version[0] == 2 and torch_version[1] >= 4):
return original_UntypedStorage_cuda(self, device=device, non_blocking=non_blocking, **kwargs)
+original_torch_tensor = torch.tensor
+@wraps(torch.tensor)
+def torch_tensor(data, *args, dtype=None, device=None, **kwargs):
+ if check_cuda(device):
+ if not device_supports_fp64 and (dtype == torch.float64 or (dtype is None and getattr(data, "dtype", None) in {torch.float64, float})):
+ return original_torch_tensor(data, *args, dtype=torch.float32, device=return_xpu(device), **kwargs)
+ else:
+ return original_torch_tensor(data, *args, dtype=dtype, device=return_xpu(device), **kwargs)
+ else:
+ if (
+ not device_supports_fp64 and check_device_type(device, "xpu")
+ and (dtype == torch.float64 or (dtype is None and getattr(data, "dtype", None) in {torch.float64, float}))
+ ):
+ return original_torch_tensor(data, *args, dtype=torch.float32, device=device, **kwargs)
+ else:
+ return original_torch_tensor(data, *args, dtype=dtype, device=device, **kwargs)
+
+
original_torch_empty = torch.empty
@wraps(torch.empty)
def torch_empty(*args, device=None, **kwargs):
@@ -221,11 +226,11 @@ def torch_empty(*args, device=None, **kwargs):
original_torch_randn = torch.randn
@wraps(torch.randn)
-def torch_randn(*args, device=None, dtype=None, **kwargs):
+def torch_randn(*args, device=None, **kwargs):
if check_cuda(device):
- return original_torch_randn(*args, device=return_xpu(device), dtype=dtype, **kwargs)
+ return original_torch_randn(*args, device=return_xpu(device), **kwargs)
else:
- return original_torch_randn(*args, device=device, dtype=dtype, **kwargs)
+ return original_torch_randn(*args, device=device, **kwargs)
original_torch_ones = torch.ones
@@ -255,34 +260,6 @@ def torch_full(*args, device=None, **kwargs):
return original_torch_full(*args, device=device, **kwargs)
-original_torch_arange = torch.arange
-@wraps(torch.arange)
-def torch_arange(*args, device=None, dtype=None, **kwargs):
- global device_supports_fp64
- if check_cuda(device):
- if not device_supports_fp64 and dtype == torch.float64:
- dtype = torch.float32
- return original_torch_arange(*args, device=return_xpu(device), dtype=dtype, **kwargs)
- else:
- if not device_supports_fp64 and check_device_type(device, "xpu") and dtype == torch.float64:
- dtype = torch.float32
- return original_torch_arange(*args, device=device, dtype=dtype, **kwargs)
-
-
-original_torch_linspace = torch.linspace
-@wraps(torch.linspace)
-def torch_linspace(*args, device=None, dtype=None, **kwargs):
- global device_supports_fp64
- if check_cuda(device):
- if not device_supports_fp64 and dtype == torch.float64:
- dtype = torch.float32
- return original_torch_linspace(*args, device=return_xpu(device), dtype=dtype, **kwargs)
- else:
- if not device_supports_fp64 and check_device_type(device, "xpu") and dtype == torch.float64:
- dtype = torch.float32
- return original_torch_linspace(*args, device=device, dtype=dtype, **kwargs)
-
-
original_torch_eye = torch.eye
@wraps(torch.eye)
def torch_eye(*args, device=None, **kwargs):
@@ -292,6 +269,36 @@ def torch_eye(*args, device=None, **kwargs):
return original_torch_eye(*args, device=device, **kwargs)
+original_torch_arange = torch.arange
+@wraps(torch.arange)
+def torch_arange(*args, dtype=None, device=None, **kwargs):
+ if check_cuda(device):
+ if not device_supports_fp64 and dtype == torch.float64:
+ return original_torch_arange(*args, dtype=torch.float32, device=return_xpu(device), **kwargs)
+ else:
+ return original_torch_arange(*args, dtype=dtype, device=return_xpu(device), **kwargs)
+ else:
+ if not device_supports_fp64 and check_device_type(device, "xpu") and dtype == torch.float64:
+ return original_torch_arange(*args, dtype=torch.float32, device=device, **kwargs)
+ else:
+ return original_torch_arange(*args, dtype=dtype, device=device, **kwargs)
+
+
+original_torch_linspace = torch.linspace
+@wraps(torch.linspace)
+def torch_linspace(*args, dtype=None, device=None, **kwargs):
+ if check_cuda(device):
+ if not device_supports_fp64 and dtype == torch.float64:
+ return original_torch_linspace(*args, dtype=torch.float32, device=return_xpu(device), **kwargs)
+ else:
+ return original_torch_linspace(*args, dtype=dtype, device=return_xpu(device), **kwargs)
+ else:
+ if not device_supports_fp64 and check_device_type(device, "xpu") and dtype == torch.float64:
+ return original_torch_linspace(*args, dtype=torch.float32, device=device, **kwargs)
+ else:
+ return original_torch_linspace(*args, dtype=dtype, device=device, **kwargs)
+
+
original_torch_load = torch.load
@wraps(torch.load)
def torch_load(f, map_location=None, *args, **kwargs):
@@ -360,24 +367,29 @@ class torch_Generator(original_torch_Generator):
# Hijack Functions:
def ipex_hijacks():
- global device_supports_fp64
+ torch.UntypedStorage.__init__ = UntypedStorage_init
if torch_version[0] > 2 or (torch_version[0] == 2 and torch_version[1] >= 4):
torch.UntypedStorage.cuda = UntypedStorage_cuda
torch.UntypedStorage.to = UntypedStorage_to
- torch.tensor = torch_tensor
+
torch.Tensor.to = Tensor_to
torch.Tensor.cuda = Tensor_cuda
torch.Tensor.pin_memory = Tensor_pin_memory
- torch.UntypedStorage.__init__ = UntypedStorage_init
+
+ # transformers completely breaks when anything is done to torch.tensor
+ # even straight passthroughs breaks transformers for some reason
+ #torch.tensor = torch_tensor
+
torch.empty = torch_empty
torch.randn = torch_randn
torch.ones = torch_ones
torch.zeros = torch_zeros
torch.full = torch_full
+ torch.eye = torch_eye
torch.arange = torch_arange
torch.linspace = torch_linspace
- torch.eye = torch_eye
torch.load = torch_load
+
torch.cuda.synchronize = torch_cuda_synchronize
torch.cuda.device = torch_cuda_device
torch.cuda.set_device = torch_cuda_set_device
@@ -437,6 +449,6 @@ def ipex_hijacks():
if not hasattr(torch.cuda.amp, "common"):
torch.cuda.amp.common = nullcontext()
- torch.cuda.amp.common.amp_definitely_not_available = lambda: False
+ torch.cuda.amp.common.amp_definitely_not_available = return_false
return device_supports_fp64
diff --git a/modules/intel/openvino/__init__.py b/modules/intel/openvino/__init__.py
index 31405f1f7..c416095a2 100644
--- a/modules/intel/openvino/__init__.py
+++ b/modules/intel/openvino/__init__.py
@@ -1,13 +1,11 @@
import os
-import sys
import torch
-import nncf
from openvino.frontend.pytorch.torchdynamo.partition import Partitioner
from openvino.frontend.pytorch.fx_decoder import TorchFXPythonDecoder
-from openvino.frontend import FrontEndManager
-from openvino import Core, Type, PartialShape, serialize
-from openvino.properties import hint as ov_hints
+from openvino.frontend import FrontEndManager # pylint: disable=no-name-in-module
+from openvino import Core, Type, PartialShape, serialize # pylint: disable=no-name-in-module
+from openvino.properties import hint as ov_hints # pylint: disable=no-name-in-module
from torch._dynamo.backends.common import fake_tensor_unsupported
from torch._dynamo.backends.registry import register_backend
@@ -23,25 +21,6 @@ from modules import shared, devices, sd_models_utils
from modules.logger import log
-# importing openvino.runtime forces DeprecationWarning to "always"
-# And Intel's own libs (NNCF) imports the deprecated module
-# Don't allow openvino to override warning filters:
-try:
- import warnings
- filterwarnings = warnings.filterwarnings
- warnings.filterwarnings = lambda *args, **kwargs: None
- import openvino.runtime # pylint: disable=unused-import
- installer.torch_info.set(openvino=openvino.runtime.get_version())
- warnings.filterwarnings = filterwarnings
-except Exception:
- pass
-
-try:
- # silence the pytorch version warning
- nncf.common.logging.logger.warn_bkc_version_mismatch = lambda *args, **kwargs: None
-except Exception:
- pass
-
# Set default params
torch._dynamo.config.cache_size_limit = max(64, torch._dynamo.config.cache_size_limit) # pylint: disable=protected-access
torch._dynamo.eval_frame.check_if_dynamo_supported = lambda: True # pylint: disable=protected-access
@@ -213,11 +192,7 @@ def execute_cached(compiled_model, *args):
def openvino_compile(gm: GraphModule, *example_inputs, model_hash_str: str | None = None, file_name=""):
core = Core()
-
device = get_device()
- global dont_use_4bit_nncf
- global dont_use_nncf
- global dont_use_quant
if file_name is not None and os.path.isfile(file_name + ".xml") and os.path.isfile(file_name + ".bin"):
om = core.read_model(file_name + ".xml")
@@ -259,26 +234,6 @@ def openvino_compile(gm: GraphModule, *example_inputs, model_hash_str: str | Non
om.inputs[idx-idx_minus].get_node().set_partial_shape(PartialShape(list(input_data.shape)))
om.validate_nodes_and_infer_types()
- if shared.opts.nncf_quantize and not dont_use_quant:
- new_inputs = []
- for idx, _ in enumerate(example_inputs):
- new_inputs.append(example_inputs[idx].detach().cpu().numpy())
- new_inputs = [new_inputs]
- if shared.opts.nncf_quantize_mode == "INT8":
- om = nncf.quantize(om, nncf.Dataset(new_inputs))
- else:
- om = nncf.quantize(om, nncf.Dataset(new_inputs), mode=getattr(nncf.QuantizationMode, shared.opts.nncf_quantize_mode),
- advanced_parameters=nncf.quantization.advanced_parameters.AdvancedQuantizationParameters(
- overflow_fix=nncf.quantization.advanced_parameters.OverflowFix.DISABLE, backend_params=None))
-
- if shared.opts.nncf_compress_weights and not dont_use_nncf:
- if dont_use_4bit_nncf or shared.opts.nncf_compress_weights_mode == "INT8":
- om = nncf.compress_weights(om)
- else:
- compress_group_size = shared.opts.nncf_compress_weights_group_size if shared.opts.nncf_compress_weights_group_size != 0 else None
- compress_ratio = shared.opts.nncf_compress_weights_raito if shared.opts.nncf_compress_weights_raito != 0 else None
- om = nncf.compress_weights(om, mode=getattr(nncf.CompressWeightsMode, shared.opts.nncf_compress_weights_mode), group_size=compress_group_size, ratio=compress_ratio)
-
hints = {}
if shared.opts.openvino_accuracy == "performance":
hints[ov_hints.execution_mode] = ov_hints.ExecutionMode.PERFORMANCE
@@ -287,9 +242,6 @@ def openvino_compile(gm: GraphModule, *example_inputs, model_hash_str: str | Non
if model_hash_str is not None:
hints['CACHE_DIR'] = shared.opts.openvino_cache_path + '/blob'
core.set_property(hints)
- dont_use_nncf = False
- dont_use_quant = False
- dont_use_4bit_nncf = False
compiled_model = core.compile_model(om, device)
return compiled_model
@@ -299,44 +251,17 @@ def openvino_compile_cached_model(cached_model_path, *example_inputs):
core = Core()
om = core.read_model(cached_model_path + ".xml")
- global dont_use_4bit_nncf
- global dont_use_nncf
- global dont_use_quant
-
for idx, input_data in enumerate(example_inputs):
om.inputs[idx].get_node().set_element_type(dtype_mapping[input_data.dtype])
om.inputs[idx].get_node().set_partial_shape(PartialShape(list(input_data.shape)))
om.validate_nodes_and_infer_types()
- if shared.opts.nncf_quantize and not dont_use_quant:
- new_inputs = []
- for idx, _ in enumerate(example_inputs):
- new_inputs.append(example_inputs[idx].detach().cpu().numpy())
- new_inputs = [new_inputs]
- if shared.opts.nncf_quantize_mode == "INT8":
- om = nncf.quantize(om, nncf.Dataset(new_inputs))
- else:
- om = nncf.quantize(om, nncf.Dataset(new_inputs), mode=getattr(nncf.QuantizationMode, shared.opts.nncf_quantize_mode),
- advanced_parameters=nncf.quantization.advanced_parameters.AdvancedQuantizationParameters(
- overflow_fix=nncf.quantization.advanced_parameters.OverflowFix.DISABLE, backend_params=None))
-
- if shared.opts.nncf_compress_weights and not dont_use_nncf:
- if dont_use_4bit_nncf or shared.opts.nncf_compress_weights_mode == "INT8":
- om = nncf.compress_weights(om)
- else:
- compress_group_size = shared.opts.nncf_compress_weights_group_size if shared.opts.nncf_compress_weights_group_size != 0 else None
- compress_ratio = shared.opts.nncf_compress_weights_raito if shared.opts.nncf_compress_weights_raito != 0 else None
- om = nncf.compress_weights(om, mode=getattr(nncf.CompressWeightsMode, shared.opts.nncf_compress_weights_mode), group_size=compress_group_size, ratio=compress_ratio)
-
hints = {'CACHE_DIR': shared.opts.openvino_cache_path + '/blob'}
if shared.opts.openvino_accuracy == "performance":
hints[ov_hints.execution_mode] = ov_hints.ExecutionMode.PERFORMANCE
elif shared.opts.openvino_accuracy == "accuracy":
hints[ov_hints.execution_mode] = ov_hints.ExecutionMode.ACCURACY
core.set_property(hints)
- dont_use_nncf = False
- dont_use_quant = False
- dont_use_4bit_nncf = False
compiled_model = core.compile_model(om, get_device())
return compiled_model
@@ -462,14 +387,8 @@ def get_subgraph_type(tensor):
@fake_tensor_unsupported
def openvino_fx(subgraph, example_inputs, options=None):
- global dont_use_4bit_nncf
- global dont_use_nncf
- global dont_use_quant
global subgraph_type
- dont_use_4bit_nncf = False
- dont_use_nncf = False
- dont_use_quant = False
dont_use_faketensors = False
executor_parameters = None
inputs_reversed = False
@@ -478,25 +397,25 @@ def openvino_fx(subgraph, example_inputs, options=None):
subgraph_type = []
subgraph.apply(get_subgraph_type)
+ """
# SD 1.5 / SDXL VAE
- if (subgraph_type[0] is torch.nn.modules.conv.Conv2d and
+ if (
+ subgraph_type[0] is torch.nn.modules.conv.Conv2d and
subgraph_type[1] is torch.nn.modules.conv.Conv2d and
subgraph_type[2] is torch.nn.modules.normalization.GroupNorm and
- subgraph_type[3] is torch.nn.modules.activation.SiLU):
-
- dont_use_4bit_nncf = True
- dont_use_nncf = bool("VAE" not in shared.opts.nncf_compress_weights)
- dont_use_quant = bool("VAE" not in shared.opts.nncf_quantize)
+ subgraph_type[3] is torch.nn.modules.activation.SiLU
+ ):
+ pass
+ """
# SD 1.5 / SDXL Text Encoder
- elif (subgraph_type[0] is torch.nn.modules.sparse.Embedding and
+ if (
+ subgraph_type[0] is torch.nn.modules.sparse.Embedding and
subgraph_type[1] is torch.nn.modules.sparse.Embedding and
subgraph_type[2] is torch.nn.modules.normalization.LayerNorm and
- subgraph_type[3] is torch.nn.modules.linear.Linear):
-
+ subgraph_type[3] is torch.nn.modules.linear.Linear
+ ):
dont_use_faketensors = True
- dont_use_nncf = bool("TE" not in shared.opts.nncf_compress_weights)
- dont_use_quant = bool("TE" not in shared.opts.nncf_quantize)
# Create a hash to be used for caching
shared.compiled_model_state.model_hash_str = ""
diff --git a/modules/loader.py b/modules/loader.py
index 5e7b5a0a8..0611e27db 100644
--- a/modules/loader.py
+++ b/modules/loader.py
@@ -3,6 +3,7 @@ from functools import partial
import os
import re
import sys
+import types
import logging
import warnings
import urllib3
@@ -133,6 +134,14 @@ timer.startup.record("accelerate")
import pydantic # pylint: disable=W0611,C0411
timer.startup.record("pydantic")
+try:
+ # transformers==5.x has different dependency stack so switching between v4 and v5 becomes very painful
+ # this temporarily disables dependency version checks so we can use either v4 or v5 until we drop support for v4
+ fake_version_check = types.ModuleType("transformers.dependency_versions_check")
+ sys.modules["transformers.dependency_versions_check"] = fake_version_check # disable transformers version checks
+ fake_version_check.dep_version_check = lambda pkg, hint=None: None
+except Exception:
+ pass
import transformers # pylint: disable=W0611,C0411
from transformers import logging as transformers_logging # pylint: disable=W0611,C0411
transformers_logging.set_verbosity_error()
@@ -175,9 +184,10 @@ except Exception as e:
sys.exit(1)
try:
- pass # pylint: disable=W0611,C0411
+ import pillow_jxl # pylint: disable=W0611,C0411
except Exception:
pass
+from PIL import Image # pylint: disable=W0611,C0411
timer.startup.record("pillow")
diff --git a/modules/lora/lora_apply.py b/modules/lora/lora_apply.py
index 62bc4d15d..0cd33e851 100644
--- a/modules/lora/lora_apply.py
+++ b/modules/lora/lora_apply.py
@@ -4,13 +4,13 @@ import re
import time
from typing import TYPE_CHECKING
import torch
-import diffusers.models.lora
from modules.lora import lora_common as l
from modules import shared, devices, errors, model_quant
from modules.logger import log
if TYPE_CHECKING:
from collections.abc import Callable
+ import diffusers.models.lora
bnb = None
diff --git a/modules/lora/lora_load.py b/modules/lora/lora_load.py
index e69ecc2fb..33dc8c1b9 100644
--- a/modules/lora/lora_load.py
+++ b/modules/lora/lora_load.py
@@ -257,7 +257,11 @@ def network_load(names, te_multipliers=None, unet_multipliers=None, dyn_dims=Non
shared.compiled_model_state.lora_model.append(f"{name}:{lora_scale}")
lora_method = lora_overrides.get_method(shorthash)
if lora_method == 'diffusers':
- net = lora_diffusers.load_diffusers(name, network_on_disk, lora_scale, lora_module)
+ if shared.sd_model_type == 'f2':
+ from pipelines.flux import flux2_lora
+ net = flux2_lora.try_load_lokr(name, network_on_disk, lora_scale)
+ if net is None:
+ net = lora_diffusers.load_diffusers(name, network_on_disk, lora_scale, lora_module)
elif lora_method == 'nunchaku':
pass # handled directly from extra_networks_lora.load_nunchaku
else:
@@ -272,7 +276,8 @@ def network_load(names, te_multipliers=None, unet_multipliers=None, dyn_dims=Non
continue
if net is None:
failed_to_load_networks.append(name)
- log.error(f'Network load: type=LoRA name="{name}" detected={network_on_disk.sd_version if network_on_disk is not None else None} not found')
+ lora_ver = network_on_disk.sd_version if network_on_disk is not None else None
+ log.error(f'Network load: type=LoRA name="{name}" detected={lora_ver} not loaded')
continue
if hasattr(sd_model, 'embedding_db'):
sd_model.embedding_db.load_diffusers_embedding(None, net.bundle_embeddings)
@@ -309,6 +314,12 @@ def network_load(names, te_multipliers=None, unet_multipliers=None, dyn_dims=Non
errors.display(e, 'LoRA')
shared.sd_model = sd_models.apply_balanced_offload(shared.sd_model, force=True, silent=True) # some layers may end up on cpu without hook
+ # Activate native modules loaded via diffusers path (e.g., LoKR on Flux2)
+ native_nets = [net for net in l.loaded_networks if len(net.modules) > 0]
+ if native_nets:
+ from modules.lora import networks
+ networks.network_activate()
+
if len(l.loaded_networks) > 0 and l.debug:
log.debug(f'Network load: type=LoRA loaded={[n.name for n in l.loaded_networks]} cache={list(lora_cache)} fuse={shared.opts.lora_fuse_native}:{shared.opts.lora_fuse_diffusers}')
diff --git a/modules/lora/network.py b/modules/lora/network.py
index a7942aa25..5d3fd9fc7 100644
--- a/modules/lora/network.py
+++ b/modules/lora/network.py
@@ -58,6 +58,8 @@ class NetworkOnDisk:
return 'sc'
if base.startswith("sd3"):
return 'sd3'
+ if base.startswith("flux2") or "klein" in base:
+ return 'f2'
if base.startswith("flux"):
return 'f1'
if base.startswith("hunyuan_video"):
@@ -75,6 +77,8 @@ class NetworkOnDisk:
return 'xl'
if arch.startswith("stable-cascade"):
return 'sc'
+ if arch.startswith("flux2") or "klein" in arch:
+ return 'f2'
if arch.startswith("flux"):
return 'f1'
if arch.startswith("hunyuan-video"):
@@ -86,6 +90,8 @@ class NetworkOnDisk:
return 'sd1'
if str(self.metadata.get('ss_v2', "")) == "True":
return 'sd2'
+ if 'klein' in self.name.lower() or 'klein' in self.fullname.lower():
+ return 'f2'
if 'flux' in self.name.lower():
return 'f1'
if 'xl' in self.name.lower():
diff --git a/modules/lora/network_lokr.py b/modules/lora/network_lokr.py
index 877d4005b..fcb6037e3 100644
--- a/modules/lora/network_lokr.py
+++ b/modules/lora/network_lokr.py
@@ -55,3 +55,40 @@ class NetworkModuleLokr(network.NetworkModule): # pylint: disable=abstract-metho
output_shape = target.shape
updown = make_kron(output_shape, w1, w2)
return self.finalize_updown(updown, target, output_shape)
+
+
+class NetworkModuleLokrChunk(NetworkModuleLokr):
+ """LoKR module that returns one chunk of the Kronecker product.
+
+ Used when a LoKR adapter targets a fused weight (e.g., QKV) but the model
+ has separate modules (Q, K, V). Computes kron(w1, w2) on-the-fly and
+ returns only the designated chunk, keeping memory usage minimal.
+ """
+ def __init__(self, net, weights, chunk_index, num_chunks):
+ super().__init__(net, weights)
+ self.chunk_index = chunk_index
+ self.num_chunks = num_chunks
+
+ def calc_updown(self, target):
+ if self.w1 is not None:
+ w1 = self.w1.to(target.device, dtype=target.dtype)
+ else:
+ w1a = self.w1a.to(target.device, dtype=target.dtype)
+ w1b = self.w1b.to(target.device, dtype=target.dtype)
+ w1 = w1a @ w1b
+ if self.w2 is not None:
+ w2 = self.w2.to(target.device, dtype=target.dtype)
+ elif self.t2 is None:
+ w2a = self.w2a.to(target.device, dtype=target.dtype)
+ w2b = self.w2b.to(target.device, dtype=target.dtype)
+ w2 = w2a @ w2b
+ else:
+ t2 = self.t2.to(target.device, dtype=target.dtype)
+ w2a = self.w2a.to(target.device, dtype=target.dtype)
+ w2b = self.w2b.to(target.device, dtype=target.dtype)
+ w2 = lyco_helpers.make_weight_cp(t2, w2a, w2b)
+ full_shape = [w1.size(0) * w2.size(0), w1.size(1) * w2.size(1)]
+ updown = make_kron(full_shape, w1, w2)
+ updown = torch.chunk(updown, self.num_chunks, dim=0)[self.chunk_index]
+ output_shape = list(updown.shape)
+ return self.finalize_updown(updown, target, output_shape)
diff --git a/modules/memstats.py b/modules/memstats.py
index b6397ad43..fbfdfb29a 100644
--- a/modules/memstats.py
+++ b/modules/memstats.py
@@ -1,9 +1,11 @@
import re
import sys
import os
+import types
+from collections import deque
import psutil
import torch
-from modules import shared, errors
+from modules import shared, errors, devices
from modules.logger import log
@@ -130,28 +132,53 @@ def reset_stats():
class Object:
pattern = r"'(.*?)'"
+ def get_size(self, obj, seen=None):
+ size = sys.getsizeof(obj)
+ if seen is None:
+ seen = set()
+ obj_id = id(obj)
+ if obj_id in seen:
+ return 0 # Avoid double counting
+ seen.add(obj_id)
+ if isinstance(obj, dict):
+ size += sum(self.get_size(k, seen) + self.get_size(v, seen) for k, v in obj.items())
+ elif isinstance(obj, (list, tuple, set, frozenset, deque)):
+ size += sum(self.get_size(i, seen) for i in obj)
+ return size
+
def __init__(self, name, obj):
self.id = id(obj)
self.name = name
self.fn = sys._getframe(2).f_code.co_name
- self.size = sys.getsizeof(obj)
self.refcount = sys.getrefcount(obj)
if torch.is_tensor(obj):
self.type = obj.dtype
self.size = obj.element_size() * obj.nelement()
else:
self.type = re.findall(self.pattern, str(type(obj)))[0]
- self.size = sys.getsizeof(obj)
+ self.size = self.get_size(obj)
def __str__(self):
return f'{self.fn}.{self.name} type={self.type} size={self.size} ref={self.refcount}'
-def get_objects(gcl=None, threshold:int=0):
+def get_objects(gcl=None, threshold:int=1024*1024):
+ devices.torch_gc(force=True)
if gcl is None:
+ # gcl = globals()
gcl = {}
+ log.trace(f'Memory: modules={len(sys.modules)}')
+ for _module_name, module in sys.modules.items():
+ try:
+ if not isinstance(module, types.ModuleType):
+ continue
+ namespace = vars(module)
+ gcl.update(namespace)
+ except Exception:
+ pass # Some modules may not allow introspection
objects = []
seen = []
+ log.trace(f'Memory: items={len(gcl)} threshold={threshold}')
for name, obj in gcl.items():
if id(obj) in seen:
continue
@@ -169,6 +196,6 @@ def get_objects(gcl=None, threshold:int=0):
objects = sorted(objects, key=lambda x: x.size, reverse=True)
for obj in objects:
- log.trace(obj)
+ log.trace(f'Memory: {obj}')
return objects
diff --git a/modules/model_quant.py b/modules/model_quant.py
index a963dc3cc..7d51956f8 100644
--- a/modules/model_quant.py
+++ b/modules/model_quant.py
@@ -1,12 +1,10 @@
import os
import re
import sys
-import copy
import json
import time
import diffusers
-import transformers
-from installer import installed, install, setup_logging
+from installer import install
from modules.logger import log
@@ -51,70 +49,6 @@ def dont_quant():
return False
-def create_bnb_config(kwargs = None, allow: bool = True, module: str = 'Model', modules_to_not_convert: list | None = None):
- from modules import shared, devices
- if allow and (module == 'any' or module in shared.opts.bnb_quantization):
- load_bnb()
- if bnb is None:
- return kwargs
- bnb_config = diffusers.BitsAndBytesConfig(
- load_in_8bit=shared.opts.bnb_quantization_type in ['fp8'],
- load_in_4bit=shared.opts.bnb_quantization_type in ['nf4', 'fp4'],
- bnb_4bit_quant_storage=shared.opts.bnb_quantization_storage,
- bnb_4bit_quant_type=shared.opts.bnb_quantization_type,
- bnb_4bit_compute_dtype=devices.dtype,
- llm_int8_skip_modules=modules_to_not_convert,
- )
- log.debug(f'Quantization: module={module} type=bnb dtype={shared.opts.bnb_quantization_type} storage={shared.opts.bnb_quantization_storage}')
- if kwargs is None:
- return bnb_config
- else:
- kwargs['quantization_config'] = bnb_config
- return kwargs
- return kwargs
-
-
-def create_ao_config(kwargs = None, allow: bool = True, module: str = 'Model', modules_to_not_convert: list | None = None):
- from modules import shared
- if allow and (shared.opts.torchao_quantization_mode in {'pre', 'auto'}) and (module == 'any' or module in shared.opts.torchao_quantization):
- torchao = load_torchao()
- if torchao is None:
- return kwargs
- if module in {'TE', 'LLM'}:
- ao_config = transformers.TorchAoConfig(quant_type=shared.opts.torchao_quantization_type, modules_to_not_convert=modules_to_not_convert)
- else:
- ao_config = diffusers.TorchAoConfig(shared.opts.torchao_quantization_type, modules_to_not_convert=modules_to_not_convert)
- log.debug(f'Quantization: module={module} type=torchao dtype={shared.opts.torchao_quantization_type}')
- if kwargs is None:
- return ao_config
- else:
- kwargs['quantization_config'] = ao_config
- return kwargs
- return kwargs
-
-
-def create_quanto_config(kwargs = None, allow: bool = True, module: str = 'Model', modules_to_not_convert: list | None = None):
- from modules import shared
- if allow and (module == 'any' or module in shared.opts.quanto_quantization):
- load_quanto(silent=True)
- if optimum_quanto is None:
- return kwargs
- if module in {'TE', 'LLM'}:
- quanto_config = transformers.QuantoConfig(weights=shared.opts.quanto_quantization_type, modules_to_not_convert=modules_to_not_convert)
- quanto_config.weights_dtype = quanto_config.weights
- else:
- quanto_config = diffusers.QuantoConfig(weights_dtype=shared.opts.quanto_quantization_type, modules_to_not_convert=modules_to_not_convert)
- quanto_config.activations = None # patch so it works with transformers
- quanto_config.weights = quanto_config.weights_dtype
- log.debug(f'Quantization: module={module} type=quanto dtype={shared.opts.quanto_quantization_type}')
- if kwargs is None:
- return quanto_config
- else:
- kwargs['quantization_config'] = quanto_config
- return kwargs
- return kwargs
-
-
def create_trt_config(kwargs = None, allow: bool = True, module: str = 'Model', modules_to_not_convert: list | None = None):
from modules import shared
if allow and (module == 'any' or module in shared.opts.trt_quantization):
@@ -249,7 +183,7 @@ def create_sdnq_config(kwargs = None, allow: bool = True, module: str = 'Model',
def check_quant(module: str = ''):
from modules import shared
- if module in shared.opts.sdnq_quantize_weights or module in shared.opts.bnb_quantization or module in shared.opts.torchao_quantization or module in shared.opts.quanto_quantization:
+ if module in shared.opts.sdnq_quantize_weights:
return True
return False
@@ -286,21 +220,6 @@ def create_config(kwargs = None, allow: bool = True, module: str = 'Model', modu
if debug:
log.trace(f'Quantization: type=sdnq config={kwargs.get("quantization_config", None)}')
return kwargs
- kwargs = create_bnb_config(kwargs, allow=allow, module=module, modules_to_not_convert=modules_to_not_convert)
- if kwargs is not None and 'quantization_config' in kwargs:
- if debug:
- log.trace(f'Quantization: type=bnb config={kwargs.get("quantization_config", None)}')
- return kwargs
- kwargs = create_quanto_config(kwargs, allow=allow, module=module, modules_to_not_convert=modules_to_not_convert)
- if kwargs is not None and 'quantization_config' in kwargs:
- if debug:
- log.trace(f'Quantization: type=quanto config={kwargs.get("quantization_config", None)}')
- return kwargs
- kwargs = create_ao_config(kwargs, allow=allow, module=module, modules_to_not_convert=modules_to_not_convert)
- if kwargs is not None and 'quantization_config' in kwargs:
- if debug:
- log.trace(f'Quantization: type=torchao config={kwargs.get("quantization_config", None)}')
- return kwargs
kwargs = create_trt_config(kwargs, allow=allow, module=module, modules_to_not_convert=modules_to_not_convert)
if kwargs is not None and 'quantization_config' in kwargs:
if debug:
@@ -309,88 +228,6 @@ def create_config(kwargs = None, allow: bool = True, module: str = 'Model', modu
return kwargs
-def load_torchao(msg='', silent=False):
- global ao # pylint: disable=global-statement
- if ao is not None:
- return ao
- if not installed('torchao'):
- install('torchao==0.10.0', quiet=True)
- log.warning('Quantization: torchao installed please restart')
- try:
- import torchao
- ao = torchao
- fn = f'{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access
- log.debug(f'Quantization: type=torchao version={ao.__version__} fn={fn}') # pylint: disable=protected-access
- from diffusers.utils import import_utils
- import_utils.is_torchao_available = lambda: True
- import_utils._torchao_available = True # pylint: disable=protected-access
- return ao
- except Exception as e:
- if len(msg) > 0:
- log.error(f"{msg} failed to import torchao: {e}")
- ao = None
- if not silent:
- raise
- return None
-
-
-def load_bnb(msg='', silent=False):
- from modules import devices
- global bnb # pylint: disable=global-statement
- if bnb is not None:
- return bnb
- if not installed('bitsandbytes'):
- if devices.backend == 'cuda':
- # forcing a version will uninstall the multi-backend-refactor branch of bnb
- install('bitsandbytes==0.47.0', quiet=True)
- log.warning('Quantization: bitsandbytes installed please restart')
- try:
- import bitsandbytes
- bnb = bitsandbytes
- from diffusers.utils import import_utils
- import_utils._bitsandbytes_available = True # pylint: disable=protected-access
- import_utils._bitsandbytes_version = '0.43.3' # pylint: disable=protected-access
- fn = f'{sys._getframe(3).f_code.co_name}:{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access
- log.debug(f'Quantization: type=bitsandbytes version={bnb.__version__} fn={fn}') # pylint: disable=protected-access
- return bnb
- except Exception as e:
- if len(msg) > 0:
- log.error(f"{msg} failed to import bitsandbytes: {e}")
- bnb = None
- if not silent:
- raise
- return None
-
-
-def load_quanto(msg='', silent=False):
- global optimum_quanto # pylint: disable=global-statement
- if optimum_quanto is not None:
- return optimum_quanto
- if not installed('optimum-quanto'):
- install('optimum-quanto==0.2.7', quiet=True)
- log.warning('Quantization: optimum-quanto installed please restart')
- try:
- from optimum import quanto # pylint: disable=no-name-in-module
- # disable device specific tensors because the model can't be moved between cpu and gpu with them
- quanto.tensor.weights.qbits.WeightQBitsTensor.create = lambda *args, **kwargs: quanto.tensor.weights.qbits.WeightQBitsTensor(*args, **kwargs)
- optimum_quanto = quanto
- fn = f'{sys._getframe(3).f_code.co_name}:{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access
- log.debug(f'Quantization: type=quanto version={quanto.__version__} fn={fn}') # pylint: disable=protected-access
- from diffusers.utils import import_utils
- import_utils.is_optimum_quanto_available = lambda: True
- import_utils._optimum_quanto_available = True # pylint: disable=protected-access
- import_utils._optimum_quanto_version = quanto.__version__ # pylint: disable=protected-access
- import_utils._replace_with_quanto_layers = diffusers.quantizers.quanto.utils._replace_with_quanto_layers # pylint: disable=protected-access
- return optimum_quanto
- except Exception as e:
- if len(msg) > 0:
- log.error(f"{msg} failed to import optimum.quanto: {e}")
- optimum_quanto = None
- if not silent:
- raise
- return None
-
-
def load_trt(msg='', silent=False):
global trt # pylint: disable=global-statement
if trt is not None:
@@ -642,138 +479,6 @@ def sdnq_quantize_weights(sd_model):
return sd_model
-def optimum_quanto_model(model, op=None, sd_model=None, weights=None, activations=None):
- from modules import devices, shared
- quanto = load_quanto('Quantize model: type=Optimum Quanto')
- global quant_last_model_name, quant_last_model_device # pylint: disable=global-statement
- if model.__class__.__name__ in {"FluxTransformer2DModel", "ChromaTransformer2DModel"}: # LayerNorm is not supported
- exclude_list = ["transformer_blocks.*.norm1.norm", "transformer_blocks.*.norm2", "transformer_blocks.*.norm1_context.norm", "transformer_blocks.*.norm2_context", "single_transformer_blocks.*.norm.norm", "norm_out.norm"]
- if model.__class__.__name__ == "ChromaTransformer2DModel":
- # we ignore the distilled guidance layer because it degrades quality too much
- # see: https://github.com/huggingface/diffusers/pull/11698#issuecomment-2969717180 for more details
- exclude_list.append("distilled_guidance_layer.*")
- elif model.__class__.__name__ == "QwenImageTransformer2DModel":
- exclude_list = ["transformer_blocks.0.img_mod.1.weight", "time_text_embed", "img_in", "txt_in", "proj_out", "norm_out", "pos_embed"]
- else:
- exclude_list = None
- weights = getattr(quanto, weights) if weights is not None else getattr(quanto, shared.opts.optimum_quanto_weights_type)
- if activations is not None:
- activations = getattr(quanto, activations) if activations != 'none' else None
- elif shared.opts.optimum_quanto_activations_type != 'none':
- activations = getattr(quanto, shared.opts.optimum_quanto_activations_type)
- else:
- activations = None
- model.eval()
- backup_embeddings = None
- if hasattr(model, "get_input_embeddings"):
- backup_embeddings = copy.deepcopy(model.get_input_embeddings())
- quanto.quantize(model, weights=weights, activations=activations, exclude=exclude_list)
- quanto.freeze(model)
- if hasattr(model, "set_input_embeddings") and backup_embeddings is not None:
- model.set_input_embeddings(backup_embeddings)
- if op is not None and shared.opts.optimum_quanto_shuffle_weights:
- if quant_last_model_name is not None:
- if "." in quant_last_model_name:
- last_model_names = quant_last_model_name.split(".")
- getattr(getattr(sd_model, last_model_names[0]), last_model_names[1]).to(quant_last_model_device)
- else:
- getattr(sd_model, quant_last_model_name).to(quant_last_model_device)
- devices.torch_gc(force=True, reason='quanto')
- if shared.cmd_opts.medvram or shared.cmd_opts.lowvram or shared.opts.diffusers_offload_mode != "none":
- quant_last_model_name = op
- quant_last_model_device = model.device
- else:
- quant_last_model_name = None
- quant_last_model_device = None
- model.to(devices.device)
- devices.torch_gc(force=True, reason='quanto')
- return model
-
-
-def optimum_quanto_weights(sd_model):
- try:
- t0 = time.time()
- from modules import shared, devices, sd_models
- if shared.opts.diffusers_offload_mode in {"balanced", "sequential"}:
- log.warning(f"Quantization: type=Optimum.quanto offload={shared.opts.diffusers_offload_mode} not compatible")
- return sd_model
- log.info(f"Quantization: type=Optimum.quanto: modules={shared.opts.optimum_quanto_weights}")
- global quant_last_model_name, quant_last_model_device # pylint: disable=global-statement
- quanto = load_quanto()
-
- sd_model = sd_models.apply_function_to_model(sd_model, optimum_quanto_model, shared.opts.optimum_quanto_weights, op="optimum-quanto")
- if quant_last_model_name is not None:
- if "." in quant_last_model_name:
- last_model_names = quant_last_model_name.split(".")
- getattr(getattr(sd_model, last_model_names[0]), last_model_names[1]).to(quant_last_model_device)
- else:
- getattr(sd_model, quant_last_model_name).to(quant_last_model_device)
- devices.torch_gc(force=True, reason='quanto')
- quant_last_model_name = None
- quant_last_model_device = None
-
- if shared.opts.optimum_quanto_activations_type != 'none':
- activations = getattr(quanto, shared.opts.optimum_quanto_activations_type)
- else:
- activations = None
-
- if activations is not None:
- def optimum_quanto_freeze(model, op=None, sd_model=None): # pylint: disable=unused-argument
- quanto.freeze(model)
- return model
- if shared.opts.diffusers_offload_mode == "model":
- sd_model.enable_model_cpu_offload(device=devices.device)
- if hasattr(sd_model, "encode_prompt"):
- original_encode_prompt = sd_model.encode_prompt
- def encode_prompt(*args, **kwargs):
- embeds = original_encode_prompt(*args, **kwargs)
- sd_model.maybe_free_model_hooks() # Diffusers keeps the TE on VRAM
- return embeds
- sd_model.encode_prompt = encode_prompt
- else:
- sd_models.move_model(sd_model, devices.device)
- with quanto.Calibration(momentum=0.9):
- sd_model(prompt="dummy prompt", num_inference_steps=10)
- sd_model = sd_models.apply_function_to_model(sd_model, optimum_quanto_freeze, shared.opts.optimum_quanto_weights, op="optimum-quanto-freeze")
- if shared.opts.diffusers_offload_mode == "model":
- sd_models.disable_offload(sd_model)
- sd_models.move_model(sd_model, devices.cpu)
- if hasattr(sd_model, "encode_prompt"):
- sd_model.encode_prompt = original_encode_prompt
- devices.torch_gc(force=True, reason='quanto')
-
- t1 = time.time()
- log.info(f"Quantization: type=Optimum.quanto time={t1-t0:.2f}")
- except Exception as e:
- log.warning(f"Quantization: type=Optimum.quanto {e}")
- return sd_model
-
-
-def torchao_quantization(sd_model):
- from modules import shared, devices, sd_models
- torchao = load_torchao()
- q = torchao.quantization
-
- fn = getattr(q, shared.opts.torchao_quantization_type, None)
- if fn is None:
- log.error(f"Quantization: type=TorchAO type={shared.opts.torchao_quantization_type} not supported")
- return sd_model
- def torchao_model(model, op=None, sd_model=None): # pylint: disable=unused-argument
- q.quantize_(model, fn(), device=devices.device)
- return model
-
- log.info(f"Quantization: type=TorchAO pipe={sd_model.__class__.__name__} quant={shared.opts.torchao_quantization_type} fn={fn} targets={shared.opts.torchao_quantization}")
- try:
- t0 = time.time()
- sd_models.apply_function_to_model(sd_model, torchao_model, shared.opts.torchao_quantization, op="torchao")
- t1 = time.time()
- log.info(f"Quantization: type=TorchAO time={t1-t0:.2f}")
- except Exception as e:
- log.error(f"Quantization: type=TorchAO {e}")
- setup_logging() # torchao uses dynamo which messes with logging so reset is needed
- return sd_model
-
-
def get_dit_args(load_config: dict | None = None, module: str | None = None, device_map: bool = False, allow_quant: bool = True, modules_to_not_convert: list | None = None, modules_dtype_dict: dict | None = None):
from modules import shared, devices
config = {} if load_config is None else load_config.copy()
@@ -810,12 +515,6 @@ def do_post_load_quant(sd_model, allow=True):
if shared.opts.sdnq_quantize_weights and (shared.opts.sdnq_quantize_mode == 'post' or (allow and shared.opts.sdnq_quantize_mode == 'auto')):
log.debug('Load model: post_quant=sdnq')
sd_model = sdnq_quantize_weights(sd_model)
- if len(shared.opts.optimum_quanto_weights) > 0:
- log.debug('Load model: post_quant=quanto')
- sd_model = optimum_quanto_weights(sd_model)
- if shared.opts.torchao_quantization and (shared.opts.torchao_quantization_mode == 'post' or (allow and shared.opts.torchao_quantization_mode == 'auto')):
- log.debug('Load model: post_quant=torchao')
- sd_model = torchao_quantization(sd_model)
if shared.opts.layerwise_quantization:
log.debug('Load model: post_quant=layerwise')
apply_layerwise(sd_model)
diff --git a/modules/model_te.py b/modules/model_te.py
index 1f8c58433..eced4c401 100644
--- a/modules/model_te.py
+++ b/modules/model_te.py
@@ -62,16 +62,6 @@ def load_t5(name=None, cache_dir=None):
elif 'fp16' in name.lower():
t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', cache_dir=cache_dir, torch_dtype=devices.dtype)
- elif 'fp4' in name.lower():
- model_quant.load_bnb('Load model: type=T5')
- quantization_config = transformers.BitsAndBytesConfig(load_in_4bit=True)
- t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', quantization_config=quantization_config, cache_dir=cache_dir, torch_dtype=devices.dtype)
-
- elif 'fp8' in name.lower():
- model_quant.load_bnb('Load model: type=T5')
- quantization_config = transformers.BitsAndBytesConfig(load_in_8bit=True)
- t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', quantization_config=quantization_config, cache_dir=cache_dir, torch_dtype=devices.dtype)
-
elif 'int8' in name.lower():
from modules.model_quant import create_sdnq_config
quantization_config = create_sdnq_config(kwargs=None, allow=True, module='any', weights_dtype='int8')
@@ -84,18 +74,6 @@ def load_t5(name=None, cache_dir=None):
if quantization_config is not None:
t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', quantization_config=quantization_config, cache_dir=cache_dir, torch_dtype=devices.dtype)
- elif 'qint4' in name.lower():
- model_quant.load_quanto('Load model: type=T5')
- quantization_config = transformers.QuantoConfig(weights='int4')
- if quantization_config is not None:
- t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', quantization_config=quantization_config, cache_dir=cache_dir, torch_dtype=devices.dtype)
-
- elif 'qint8' in name.lower():
- model_quant.load_quanto('Load model: type=T5')
- quantization_config = transformers.QuantoConfig(weights='int8')
- if quantization_config is not None:
- t5 = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder='text_encoder_3', quantization_config=quantization_config, cache_dir=cache_dir, torch_dtype=devices.dtype)
-
elif '/' in name:
log.debug(f'Load model: type=T5 repo={name}')
quant_config = model_quant.create_config(module='TE')
diff --git a/modules/options_handler.py b/modules/options_handler.py
index c14fadfb4..685363e46 100644
--- a/modules/options_handler.py
+++ b/modules/options_handler.py
@@ -93,7 +93,10 @@ class Options:
def set(self, key, value):
"""sets an option and calls its onchange callback, returning True if the option changed and False otherwise"""
- oldval = self.data.get(key, None)
+ if key in self.secrets:
+ oldval = self.secrets.get(key, None)
+ else:
+ oldval = self.data.get(key, None)
if oldval is None:
if key in self.data_labels:
oldval = self.data_labels[key].default
diff --git a/modules/postprocess/esrgan_model.py b/modules/postprocess/esrgan_model.py
index c11fa7ddd..7aaffc124 100644
--- a/modules/postprocess/esrgan_model.py
+++ b/modules/postprocess/esrgan_model.py
@@ -176,6 +176,8 @@ class UpscalerESRGAN(Upscaler):
def upscale_without_tiling(model, img):
+ if img.mode != 'RGB':
+ img = img.convert('RGB')
img = np.array(img)
img = img[:, :, ::-1]
img = np.ascontiguousarray(np.transpose(img, (2, 0, 1))) / 255
diff --git a/modules/processing.py b/modules/processing.py
index 22ef90f62..e4119a9f8 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -360,7 +360,7 @@ def process_samples(p: StableDiffusionProcessing, samples):
split_tone_balance=getattr(p, 'grading_split_tone_balance', 0.5),
vignette=getattr(p, 'grading_vignette', 0.0),
grain=getattr(p, 'grading_grain', 0.0),
- lut_file=getattr(p, 'grading_lut_file', ''),
+ lut_cube_file=getattr(p, 'grading_lut_file', ''),
lut_strength=getattr(p, 'grading_lut_strength', 1.0),
)
if processing_grading.is_active(grading_params):
diff --git a/modules/processing_grading.py b/modules/processing_grading.py
index 003f93f07..c0fe0fe09 100644
--- a/modules/processing_grading.py
+++ b/modules/processing_grading.py
@@ -66,7 +66,7 @@ class GradingParams:
vignette: float = 0.0
grain: float = 0.0
# lut
- lut_file: str = ""
+ lut_cube_file: str = ""
lut_strength: float = 1.0
def __post_init__(self):
@@ -179,17 +179,17 @@ def _apply_color_temp(img: torch.Tensor, kelvin: float) -> torch.Tensor:
return (img * scales).clamp(0, 1)
-def _apply_lut(image: Image.Image, lut_file: str, strength: float) -> Image.Image:
+def _apply_lut(image: Image.Image, lut_cube_file: str, strength: float) -> Image.Image:
"""Apply .cube LUT file via pillow-lut-tools."""
- if not lut_file or not os.path.isfile(lut_file):
+ if not lut_cube_file or not os.path.isfile(lut_cube_file):
return image
pillow_lut = _ensure_pillow_lut()
try:
- cube = pillow_lut.load_cube_file(lut_file)
+ cube = pillow_lut.load_cube_file(lut_cube_file)
if strength != 1.0:
cube = pillow_lut.amplify_lut(cube, strength)
result = image.filter(cube)
- debug(f'Grading LUT: file={os.path.basename(lut_file)} strength={strength}')
+ debug(f'Grading LUT: file={os.path.basename(lut_cube_file)} strength={strength}')
return result
except Exception as e:
log.error(f'Grading LUT: {e}')
@@ -198,8 +198,8 @@ def _apply_lut(image: Image.Image, lut_file: str, strength: float) -> Image.Imag
def grade_image(image: Image.Image, params: GradingParams) -> Image.Image:
"""Full grading pipeline: PIL -> GPU tensor -> kornia ops -> PIL."""
+ log.debug(f"Grading: params={params}")
kornia = _ensure_kornia()
- debug(f'Grading: params={params}')
arr = np.array(image).astype(np.float32) / 255.0
tensor = torch.from_numpy(arr).permute(2, 0, 1).unsqueeze(0)
tensor = tensor.to(device=devices.device, dtype=devices.dtype)
@@ -246,7 +246,7 @@ def grade_image(image: Image.Image, params: GradingParams) -> Image.Image:
result = Image.fromarray(arr)
# LUT applied last (CPU, via pillow-lut-tools)
- if params.lut_file:
- result = _apply_lut(result, params.lut_file, params.lut_strength)
+ if params.lut_cube_file:
+ result = _apply_lut(result, params.lut_cube_file, params.lut_strength)
return result
diff --git a/modules/scripts_postprocessing.py b/modules/scripts_postprocessing.py
index 33726232d..70410826a 100644
--- a/modules/scripts_postprocessing.py
+++ b/modules/scripts_postprocessing.py
@@ -76,9 +76,14 @@ class ScriptPostprocessingRunner:
script.controls = wrap_call(script.ui, script.filename, "ui")
if script.controls is None:
script.controls = {}
- for control in script.controls.values():
- control.custom_script_source = os.path.basename(script.filename)
- inputs += list(script.controls.values())
+ if isinstance(script.controls, list) or isinstance(script.controls, tuple):
+ for control in script.controls:
+ control.custom_script_source = os.path.basename(script.filename)
+ inputs += script.controls
+ else:
+ for control in script.controls.values():
+ control.custom_script_source = os.path.basename(script.filename)
+ inputs += list(script.controls.values())
script.args_to = len(inputs)
def scripts_in_preferred_order(self):
@@ -109,11 +114,16 @@ class ScriptPostprocessingRunner:
for script in self.scripts_in_preferred_order():
jobid = shared.state.begin(script.name)
script_args = args[script.args_from:script.args_to]
- process_args = {}
- for (name, _component), value in zip(script.controls.items(), script_args, strict=False):
- process_args[name] = value
- log.debug(f'Process: script="{script.name}" args={process_args}')
- script.process(pp, **process_args)
+ process_args = []
+ process_kwargs = {}
+ if isinstance(script.controls, list) or isinstance(script.controls, tuple):
+ for _control, value in zip(script.controls, script_args, strict=False):
+ process_args.append(value)
+ else:
+ for (name, _component), value in zip(script.controls.items(), script_args, strict=False):
+ process_kwargs[name] = value
+ log.debug(f'Process: script="{script.name}" args={process_args} kwargs={process_kwargs}')
+ script.process(pp, *process_args, **process_kwargs)
shared.state.end(jobid)
def create_args_for_run(self, scripts_args):
@@ -139,9 +149,14 @@ class ScriptPostprocessingRunner:
continue
jobid = shared.state.begin(script.name)
script_args = args[script.args_from:script.args_to]
- process_args = {}
- for (name, _component), value in zip(script.controls.items(), script_args, strict=False):
- process_args[name] = value
- log.debug(f'Postprocess: script={script.name} args={process_args}')
- script.postprocess(filenames, **process_args)
+ process_args = []
+ process_kwargs = {}
+ if isinstance(script.controls, list) or isinstance(script.controls, tuple):
+ for _control, value in zip(script.controls, script_args, strict=False):
+ process_args.append(value)
+ else:
+ for (name, _component), value in zip(script.controls.items(), script_args, strict=False):
+ process_kwargs[name] = value
+ log.debug(f'Postprocess: script={script.name} args={process_args} kwargs={process_kwargs}')
+ script.postprocess(filenames, *process_args, **process_kwargs)
shared.state.end(jobid)
diff --git a/modules/sd_checkpoint.py b/modules/sd_checkpoint.py
index f6cd40fa3..c861fcf12 100644
--- a/modules/sd_checkpoint.py
+++ b/modules/sd_checkpoint.py
@@ -24,8 +24,8 @@ warn_once = False
class CheckpointInfo:
- def __init__(self, filename, sha=None, subfolder=None):
- self.name = None
+ def __init__(self, filename, name=None, sha=None, subfolder=None, model_type: str = 'checkpoint'):
+ self.name = name
self.hash = sha
self.filename = filename
self.type = ''
@@ -62,9 +62,9 @@ class CheckpointInfo:
self.sha256 = None
self.type = 'unknown'
elif os.path.isfile(filename): # ckpt or safetensor
- self.name = relname
+ self.name = self.name or relname
self.filename = filename
- self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{relname}")
+ self.sha256 = hashes.sha256_from_cache(self.filename, f"{model_type}/{relname}") or hashes.sha256_from_cache(self.filename, f"{model_type}/{name}")
self.type = ext
if 'nf4' in filename:
self.type = 'transformer'
@@ -74,12 +74,12 @@ class CheckpointInfo:
else:
repo = [r for r in modelloader.diffuser_repos if self.hash == r['hash']]
if len(repo) == 0:
- self.name = filename
+ self.name = self.name or filename
self.filename = filename
self.sha256 = None
self.type = 'unknown'
else:
- self.name = os.path.join(os.path.basename(shared.opts.diffusers_dir), repo[0]['name'])
+ self.name = self.name or os.path.join(os.path.basename(shared.opts.diffusers_dir), repo[0]["name"])
self.filename = repo[0]['path']
self.sha256 = repo[0]['hash']
self.type = 'diffusers'
@@ -109,7 +109,7 @@ class CheckpointInfo:
return self.shorthash
def __str__(self):
- return f'CheckpointInfo(name="{self.name}" filename="{self.filename}" hash={self.shorthash} type={self.type} title="{self.title}" path="{self.path}" subfolder="{self.subfolder}")'
+ return f'CheckpointInfo(name="{self.name}" filename="{self.filename}" sha256={self.sha256} sha={self.shorthash} type={self.type} title="{self.title}" path="{self.path}" subfolder="{self.subfolder}")'
def setup_model():
@@ -160,7 +160,7 @@ def list_models():
checkpoints_list = dict(sorted(checkpoints_list.items(), key=lambda cp: cp[1].filename))
-def update_model_hashes():
+def update_model_hashes(model_list: dict = None, model_type: str = 'checkpoint'):
def update_model_hashes_table(rows):
html = """
@@ -186,14 +186,16 @@ def update_model_hashes():
log.error(f'Model list: row={row} {e}')
return html.format(tbody=tbody)
- lst = [ckpt for ckpt in checkpoints_list.values() if ckpt.hash is None]
+ if model_list is None:
+ model_list = checkpoints_list
+ lst = [ckpt for ckpt in model_list.values() if ckpt.hash is None]
for ckpt in lst:
ckpt.hash = model_hash(ckpt.filename)
- lst = [ckpt for ckpt in checkpoints_list.values() if ckpt.sha256 is None or ckpt.shorthash is None]
- log.info(f'Models list: hash missing={len(lst)} total={len(checkpoints_list)}')
+ lst = [ckpt for ckpt in model_list.values() if ckpt.sha256 is None or ckpt.shorthash is None]
+ log.info(f'Models list: hash missing={len(lst)} total={len(model_list)}')
updated = []
for ckpt in lst:
- ckpt.sha256 = hashes.sha256(ckpt.filename, f"checkpoint/{ckpt.name}")
+ ckpt.sha256 = hashes.sha256(ckpt.filename, f"{model_type}/{ckpt.name}")
ckpt.shorthash = ckpt.sha256[0:10] if ckpt.sha256 is not None else None
updated.append(ckpt)
yield update_model_hashes_table(updated)
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 57fd85ff8..f7b224f9e 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -798,8 +798,8 @@ def load_diffuser(checkpoint_info=None, op='model', revision=None): # pylint: di
"requires_safety_checker": False, # sd15 specific but we cant know ahead of time
# "use_safetensors": True,
}
- if shared.opts.huggingface_token and len(shared.opts.huggingface_token) > 0:
- diffusers_load_config['token'] = shared.opts.huggingface_token
+ # if shared.opts.huggingface_token and len(shared.opts.huggingface_token) > 0:
+ # diffusers_load_config['token'] = shared.opts.huggingface_token
if revision is not None:
diffusers_load_config['revision'] = revision
if shared.opts.diffusers_model_load_variant != 'default':
diff --git a/modules/sd_unet.py b/modules/sd_unet.py
index 6b5d94545..344164cb4 100644
--- a/modules/sd_unet.py
+++ b/modules/sd_unet.py
@@ -102,3 +102,4 @@ def refresh_unet_list():
name = os.path.splitext(basename)[0] if ".safetensors" in basename else basename
unet_dict[name] = file
log.info(f'Available UNets: path="{shared.opts.unet_dir}" items={len(unet_dict)}')
+ return unet_dict
diff --git a/modules/shared.py b/modules/shared.py
index 2bd4cdc53..0a9a20a9a 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -151,6 +151,7 @@ def list_samplers():
modules.sd_samplers.set_samplers()
return modules.sd_samplers.all_samplers
+
log.debug('Initializing: default modes')
startup_offload_mode, startup_offload_min_gpu, startup_offload_max_gpu, startup_cross_attention, startup_sdp_options, startup_sdp_choices, startup_sdp_override_options, startup_sdp_override_choices, startup_offload_always, startup_offload_never = get_default_modes(cmd_opts=cmd_opts, mem_stat=mem_stat)
diff --git a/modules/ui_common.py b/modules/ui_common.py
index 133136d8d..e4957e1df 100644
--- a/modules/ui_common.py
+++ b/modules/ui_common.py
@@ -439,6 +439,7 @@ def update_token_counter(text: str):
from modules.extra_networks import parse_prompt
count_formatted = '0'
+ max_length = 0
visible = False
prompt, _ = parse_prompt(text)
@@ -475,7 +476,7 @@ def update_token_counter(text: str):
token_counts = [len(group) - int(has_bos_token) - int(has_eos_token) for group in ids]
if len(token_counts) > 1:
visible = True
- count_formatted = f"{token_counts} {sum(token_counts)}" if shared.opts.prompt_detailed_tokens else str(sum(token_counts))
+ count_formatted = f"{token_counts}/{sum(token_counts)}"
elif len(token_counts) == 1 and token_counts[0] > 0:
visible = True
count_formatted = str(token_counts[0])
diff --git a/modules/ui_definitions.py b/modules/ui_definitions.py
index a4a9c8e3d..62b42273c 100644
--- a/modules/ui_definitions.py
+++ b/modules/ui_definitions.py
@@ -166,26 +166,6 @@ def create_settings(cmd_opts):
"nunchaku_attention": OptionInfo(False, "Nunchaku attention", gr.Checkbox),
"nunchaku_offload": OptionInfo(False, "Nunchaku offloading", gr.Checkbox),
- "bnb_quantization_sep": OptionInfo("BitsAndBytes ", "", gr.HTML),
- "bnb_quantization": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "LLM", "VAE"]}),
- "bnb_quantization_type": OptionInfo("nf4", "Quantization type", gr.Dropdown, {"choices": ["nf4", "fp8", "fp4"]}),
- "bnb_quantization_storage": OptionInfo("uint8", "Backend storage", gr.Dropdown, {"choices": ["float16", "float32", "int8", "uint8", "float64", "bfloat16"]}),
-
- "quanto_quantization_sep": OptionInfo("Optimum Quanto ", "", gr.HTML),
- "quanto_quantization": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "LLM"]}),
- "quanto_quantization_type": OptionInfo("int8", "Quantization weights type", gr.Dropdown, {"choices": ["float8", "int8", "int4", "int2"]}),
-
- "optimum_quanto_sep": OptionInfo("Optimum Quanto: post-load ", "", gr.HTML),
- "optimum_quanto_weights": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "Control", "VAE"]}),
- "optimum_quanto_weights_type": OptionInfo("qint8", "Quantization weights type", gr.Dropdown, {"choices": ["qint8", "qfloat8_e4m3fn", "qfloat8_e5m2", "qint4", "qint2"]}),
- "optimum_quanto_activations_type": OptionInfo("none", "Quantization activations type ", gr.Dropdown, {"choices": ["none", "qint8", "qfloat8_e4m3fn", "qfloat8_e5m2"]}),
- "optimum_quanto_shuffle_weights": OptionInfo(False, "Shuffle weights in post mode", gr.Checkbox),
-
- "torchao_sep": OptionInfo("TorchAO ", "", gr.HTML),
- "torchao_quantization": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "LLM", "Control", "VAE"]}),
- "torchao_quantization_mode": OptionInfo("auto", "Quantization mode", gr.Dropdown, {"choices": ["auto", "pre", "post"]}),
- "torchao_quantization_type": OptionInfo("int8_weight_only", "Quantization type", gr.Dropdown, {"choices": ["int4_weight_only", "int8_dynamic_activation_int4_weight", "int8_weight_only", "int8_dynamic_activation_int8_weight", "float8_weight_only", "float8_dynamic_activation_float8_weight", "float8_static_activation_float8_weight"]}),
-
"layerwise_quantization_sep": OptionInfo("Layerwise Casting ", "", gr.HTML),
"layerwise_quantization": OptionInfo([], "Layerwise casting enabled", gr.CheckboxGroup, {"choices": ["Model", "TE"]}),
"layerwise_quantization_storage": OptionInfo("float8_e4m3fn", "Layerwise casting storage", gr.Dropdown, {"choices": ["float8_e4m3fn", "float8_e5m2"]}),
@@ -194,14 +174,6 @@ def create_settings(cmd_opts):
"trt_quantization_sep": OptionInfo("TensorRT ", "", gr.HTML),
"trt_quantization": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model"]}),
"trt_quantization_type": OptionInfo("int8", "Quantization type", gr.Dropdown, {"choices": ["int8", "int4", "fp8", "nf4", "nvfp4"]}),
-
- "nncf_compress_sep": OptionInfo("NNCF: Neural Network Compression Framework ", "", gr.HTML, {"visible": cmd_opts.use_openvino}),
- "nncf_compress_weights": OptionInfo([], "Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "VAE"], "visible": cmd_opts.use_openvino}),
- "nncf_compress_weights_mode": OptionInfo("INT8_SYM", "Quantization type", gr.Dropdown, {"choices": ["INT8", "INT8_SYM", "FP8", "MXFP8", "INT4_ASYM", "INT4_SYM", "FP4", "MXFP4", "NF4"], "visible": cmd_opts.use_openvino}),
- "nncf_compress_weights_raito": OptionInfo(0, "Compress ratio", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.01, "visible": cmd_opts.use_openvino}),
- "nncf_compress_weights_group_size": OptionInfo(0, "Group size", gr.Slider, {"minimum": -1, "maximum": 4096, "step": 1, "visible": cmd_opts.use_openvino}),
- "nncf_quantize": OptionInfo([], "Static Quantization enabled", gr.CheckboxGroup, {"choices": ["Model", "TE", "VAE"], "visible": cmd_opts.use_openvino}),
- "nncf_quantize_mode": OptionInfo("INT8", "OpenVINO activations mode", gr.Dropdown, {"choices": ["INT8", "FP8_E4M3", "FP8_E5M2"], "visible": cmd_opts.use_openvino}),
}))
# --- VAE & Text Encoder ---
options_templates.update(options_section(('vae_encoder', "Variational Auto Encoder"), {
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index d80ff9573..17a1c5b7e 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -584,6 +584,8 @@ def register_pages():
register_page(ExtraNetworksPageLora())
from modules.ui_extra_networks_wildcards import ExtraNetworksPageWildcards
register_page(ExtraNetworksPageWildcards())
+ from modules.ui_extra_networks_unet import ExtraNetworksPageUNets
+ register_page(ExtraNetworksPageUNets())
if shared.opts.latent_history > 0:
from modules.ui_extra_networks_history import ExtraNetworksPageHistory
register_page(ExtraNetworksPageHistory())
@@ -596,7 +598,7 @@ def get_pages(title=None):
visible = shared.opts.extra_networks
pages: list[ExtraNetworksPage] = []
if 'All' in visible or visible == []: # default en sort order
- visible = ['Model', 'Lora', 'Style', 'Wildcards', 'Embedding', 'VAE', 'History', 'Hypernetwork']
+ visible = ['Model', 'Lora', 'UNet/DiT', 'Style', 'Wildcards', 'Embedding', 'VAE', 'History', 'Hypernetwork']
titles = [page.title for page in shared.extra_networks]
if title is None:
@@ -743,7 +745,7 @@ def create_ui(container, button_parent, tabname, skip_indexing = False):
with ui.tabs:
def ui_tab_change(page):
- scan_visible = page in ['Model', 'Lora', 'VAE', 'Hypernetwork', 'Embedding']
+ scan_visible = page in ['Model', 'Lora', 'VAE', 'UNet/DiT', 'Hypernetwork', 'Embedding']
save_visible = page in ['Style']
model_visible = page in ['Model']
return [gr.update(visible=scan_visible), gr.update(visible=save_visible), gr.update(visible=model_visible)]
diff --git a/modules/ui_extra_networks_unet.py b/modules/ui_extra_networks_unet.py
new file mode 100644
index 000000000..7d6e016d6
--- /dev/null
+++ b/modules/ui_extra_networks_unet.py
@@ -0,0 +1,43 @@
+import html
+import json
+import os
+from modules import shared, ui_extra_networks, sd_unet, hashes, modelstats
+from modules.logger import log
+
+
+class ExtraNetworksPageUNets(ui_extra_networks.ExtraNetworksPage):
+ def __init__(self):
+ super().__init__('UNet/DiT')
+
+ def refresh(self):
+ return sd_unet.refresh_unet_list()
+
+ def list_items(self):
+ for name, filename in sd_unet.unet_dict.items():
+ try:
+ size, mtime = modelstats.stat(filename)
+ info = self.find_info(filename)
+ version = self.find_version(None, info)
+ record = {
+ "type": 'UNet/DiT',
+ "name": name,
+ "alias": os.path.splitext(os.path.basename(filename))[0],
+ "title": name,
+ "filename": filename,
+ "hash": hashes.sha256_from_cache(filename, f"unet/{name}"),
+ "preview": self.find_preview(filename),
+ "local_preview": f"{os.path.splitext(filename)[0]}.{shared.opts.samples_format}",
+ "metadata": {},
+ "onclick": '"' + html.escape(f"""return selectUNet({json.dumps(name)})""") + '"',
+ "mtime": mtime,
+ "size": size,
+ "info": info,
+ "description": self.find_description(filename, info),
+ "version": version.get("baseModel", "N/A") if info else "N/A",
+ }
+ yield record
+ except Exception as e:
+ log.debug(f'Networks error: type=vae file="{filename}" {e}')
+
+ def allowed_directories_for_previews(self):
+ return [v for v in [shared.opts.unet_dir] if v is not None]
diff --git a/modules/ui_models.py b/modules/ui_models.py
index 881c11649..c8a981261 100644
--- a/modules/ui_models.py
+++ b/modules/ui_models.py
@@ -12,6 +12,15 @@ from modules.shared import opts, log
extra_ui = []
+def update_model_hashes():
+ from modules import sd_unet, sd_checkpoint
+ unets = {}
+ for k, v in sd_unet.unet_dict.items():
+ unets[k] = sd_checkpoint.CheckpointInfo(name=k, filename=v, model_type='unet')
+ yield from sd_models.update_model_hashes(unets, model_type='unet')
+ yield from sd_models.update_model_hashes(model_type='checkpoint')
+
+
def create_ui():
log.debug('UI initialize: tab=models')
dummy_component = gr.Label(visible=False)
@@ -143,7 +152,7 @@ def create_ui():
with gr.Row():
model_table = gr.HTML(value='', elem_id="model_list_table")
- model_checkhash_btn.click(fn=sd_models.update_model_hashes, inputs=[], outputs=[model_table])
+ model_checkhash_btn.click(fn=update_model_hashes, inputs=[], outputs=[model_table])
model_list_btn.click(fn=lambda: create_models_table(list(sd_models.checkpoints_list.values())), inputs=[], outputs=[model_table])
with gr.Tab(label="Metadata", elem_id="models_metadata_tab"):
diff --git a/modules/ui_sections.py b/modules/ui_sections.py
index 32b71b193..09108d716 100644
--- a/modules/ui_sections.py
+++ b/modules/ui_sections.py
@@ -172,15 +172,15 @@ def create_latent_inputs(tab):
hdr_sharpen = gr.Slider(minimum=-4.0, maximum=4.0, step=0.05, value=0, label="Latent sharpen", elem_id=f"{tab}_hdr_sharpen")
hdr_color = gr.Slider(minimum=0.0, maximum=16.0, step=0.1, value=0.0, label="Latent color", elem_id=f"{tab}_hdr_color")
with gr.Row(elem_id=f"{tab}_hdr_clamp_row"):
- hdr_clamp = gr.Checkbox(label="Clamp", value=False, elem_id=f"{tab}_hdr_clamp")
- hdr_boundary = gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=4.0, label="Range", elem_id=f"{tab}_hdr_boundary")
- hdr_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.95, label="Threshold", elem_id=f"{tab}_hdr_threshold")
+ hdr_clamp = gr.Checkbox(label="Latent clamp", value=False, elem_id=f"{tab}_hdr_clamp")
+ hdr_boundary = gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=4.0, label="Latent range", elem_id=f"{tab}_hdr_boundary")
+ hdr_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.95, label="Latent threshold", elem_id=f"{tab}_hdr_threshold")
with gr.Row(elem_id=f"{tab}_hdr_max_row"):
- hdr_maximize = gr.Checkbox(label="Maximize", value=False, elem_id=f"{tab}_hdr_maximize")
- hdr_max_center = gr.Slider(minimum=0.0, maximum=2.0, step=0.1, value=0.6, label="Center", elem_id=f"{tab}_hdr_max_center")
- hdr_max_boundary = gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="Max range", elem_id=f"{tab}_hdr_max_boundary")
+ hdr_maximize = gr.Checkbox(label="Latent maximize", value=False, elem_id=f"{tab}_hdr_maximize")
+ hdr_max_center = gr.Slider(minimum=0.0, maximum=2.0, step=0.1, value=0.6, label="Latent center", elem_id=f"{tab}_hdr_max_center")
+ hdr_max_boundary = gr.Slider(minimum=0.5, maximum=2.0, step=0.1, value=1.0, label="Latent max range", elem_id=f"{tab}_hdr_max_boundary")
with gr.Row(elem_id=f"{tab}_hdr_color_row"):
- hdr_color_picker = gr.ColorPicker(label="Tint color", show_label=True, container=False, value=None, elem_id=f"{tab}_hdr_color_picker")
+ hdr_color_picker = gr.ColorPicker(label="Latent tint", show_label=True, container=False, value=None, elem_id=f"{tab}_hdr_color_picker")
hdr_tint_ratio = gr.Slider(label="Tint strength", minimum=-4.0, maximum=4.0, step=0.05, value=0.0, elem_id=f"{tab}_hdr_tint_ratio")
return hdr_mode, hdr_brightness, hdr_color, hdr_sharpen, hdr_clamp, hdr_boundary, hdr_threshold, hdr_maximize, hdr_max_center, hdr_max_boundary, hdr_color_picker, hdr_tint_ratio, hdr_apply_hires
@@ -197,7 +197,7 @@ def create_color_inputs(tab):
grading_hue = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, value=0, label='Hue', elem_id=f"{tab}_grading_hue")
grading_gamma = gr.Slider(minimum=0.1, maximum=10.0, step=0.1, value=1.0, label='Gamma', elem_id=f"{tab}_grading_gamma")
grading_sharpness = gr.Slider(minimum=0.0, maximum=2.0, step=0.05, value=0, label='Sharpness', elem_id=f"{tab}_grading_sharpness")
- grading_color_temp = gr.Slider(minimum=2000, maximum=12000, step=100, value=6500, label='Color temp (K)', elem_id=f"{tab}_grading_color_temp")
+ grading_color_temp = gr.Slider(minimum=2000, maximum=12000, step=100, value=6500, label='Color temp', elem_id=f"{tab}_grading_color_temp")
with gr.Group():
gr.HTML('Tone ')
with gr.Row(elem_id=f"{tab}_grading_tone_row"):
@@ -211,7 +211,7 @@ def create_color_inputs(tab):
with gr.Row(elem_id=f"{tab}_grading_split_row"):
grading_shadows_tint = gr.ColorPicker(label="Shadows tint", value="#000000", elem_id=f"{tab}_grading_shadows_tint")
grading_highlights_tint = gr.ColorPicker(label="Highlights tint", value="#ffffff", elem_id=f"{tab}_grading_highlights_tint")
- grading_split_tone_balance = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, value=0.5, label='Balance', elem_id=f"{tab}_grading_split_tone_balance")
+ grading_split_tone_balance = gr.Slider(minimum=0.0, maximum=1.0, step=0.05, value=0.5, label='Split tone balance', elem_id=f"{tab}_grading_split_tone_balance")
with gr.Group():
gr.HTML('Effects ')
with gr.Row(elem_id=f"{tab}_grading_effects_row"):
@@ -220,9 +220,9 @@ def create_color_inputs(tab):
with gr.Group():
gr.HTML('LUT ')
with gr.Row(elem_id=f"{tab}_grading_lut_row"):
- grading_lut_file = gr.File(label='LUT .cube file', file_types=['.cube'], elem_id=f"{tab}_grading_lut_file")
+ grading_lut_cube_file = gr.File(label='LUT .cube file', file_types=['.cube'], elem_id=f"{tab}_grading_lut_file")
grading_lut_strength = gr.Slider(minimum=0.0, maximum=2.0, step=0.05, value=1.0, label='LUT strength', elem_id=f"{tab}_grading_lut_strength")
- return grading_brightness, grading_contrast, grading_saturation, grading_hue, grading_gamma, grading_sharpness, grading_color_temp, grading_shadows, grading_midtones, grading_highlights, grading_clahe_clip, grading_clahe_grid, grading_shadows_tint, grading_highlights_tint, grading_split_tone_balance, grading_vignette, grading_grain, grading_lut_file, grading_lut_strength
+ return grading_brightness, grading_contrast, grading_saturation, grading_hue, grading_gamma, grading_sharpness, grading_color_temp, grading_shadows, grading_midtones, grading_highlights, grading_clahe_clip, grading_clahe_grid, grading_shadows_tint, grading_highlights_tint, grading_split_tone_balance, grading_vignette, grading_grain, grading_lut_cube_file, grading_lut_strength
def create_sampler_and_steps_selection(choices, tabname, default_steps:int=20):
diff --git a/modules/ui_settings.py b/modules/ui_settings.py
index 317186343..80c310e5b 100644
--- a/modules/ui_settings.py
+++ b/modules/ui_settings.py
@@ -396,6 +396,13 @@ def create_quicksettings(interfaces):
inputs=[shared.settings_components['sd_vae'], dummy_component],
outputs=[shared.settings_components['sd_vae'], text_settings],
)
+ button_set_unet = gr.Button("Change UNet", elem_id="change_unet", visible=False)
+ button_set_unet.click(
+ fn=lambda value, _: run_settings_single(value, key="sd_unet"),
+ _js="function(v){ var res = desiredUNetName; desiredUNetName = ''; return [res || v, null]; }",
+ inputs=[shared.settings_components["sd_unet"], dummy_component],
+ outputs=[shared.settings_components["sd_unet"], text_settings],
+ )
def reference_submit(model):
if '@' not in model: # diffusers
diff --git a/package.json b/package.json
index e3e948c65..9fe57fd1a 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"venv": ". venv/bin/activate",
"start": ". venv/bin/activate; python launch.py --debug",
"localize": "node cli/localize.js",
- "packages": ". venv/bin/activate && pip install --upgrade transformers accelerate huggingface_hub safetensors tokenizers peft pytorch_lightning pylint ruff",
+ "packages": ". venv/bin/activate && pip install --upgrade accelerate huggingface_hub safetensors tokenizers peft pytorch_lightning pylint ruff",
"format": ". venv/bin/activate && pre-commit run --all-files",
"format-win": "venv\\scripts\\activate && pre-commit run --all-files",
"eslint": "eslint . javascript/",
diff --git a/pipelines/flux/flux2_lora.py b/pipelines/flux/flux2_lora.py
new file mode 100644
index 000000000..a2d433992
--- /dev/null
+++ b/pipelines/flux/flux2_lora.py
@@ -0,0 +1,216 @@
+"""Flux2/Klein-specific LoRA loading.
+
+Handles:
+- Bare BFL-format keys in state dicts (adds diffusion_model. prefix for converter)
+- LoKR adapters via native module loading (bypasses diffusers PEFT system)
+
+Installed via apply_patch() during pipeline loading.
+"""
+
+import os
+import time
+from modules import shared, sd_models
+from modules.logger import log
+from modules.lora import network, network_lokr, lora_convert
+from modules.lora import lora_common as l
+
+
+BARE_FLUX_PREFIXES = ("single_blocks.", "double_blocks.", "img_in.", "txt_in.",
+ "final_layer.", "time_in.", "single_stream_modulation.",
+ "double_stream_modulation_")
+
+# BFL -> diffusers module path mapping for Flux2/Klein
+F2_SINGLE_MAP = {
+ 'linear1': 'attn.to_qkv_mlp_proj',
+ 'linear2': 'attn.to_out',
+}
+F2_DOUBLE_MAP = {
+ 'img_attn.proj': 'attn.to_out.0',
+ 'txt_attn.proj': 'attn.to_add_out',
+ 'img_mlp.0': 'ff.linear_in',
+ 'img_mlp.2': 'ff.linear_out',
+ 'txt_mlp.0': 'ff_context.linear_in',
+ 'txt_mlp.2': 'ff_context.linear_out',
+}
+F2_QKV_MAP = {
+ 'img_attn.qkv': ('attn', ['to_q', 'to_k', 'to_v']),
+ 'txt_attn.qkv': ('attn', ['add_q_proj', 'add_k_proj', 'add_v_proj']),
+}
+
+
+def apply_lora_alphas(state_dict):
+ """Bake kohya-format .alpha scaling into lora_down weights and remove alpha keys.
+
+ Diffusers' Flux2 converter only handles lora_A/lora_B (or lora_down/lora_up) keys.
+ Kohya-format LoRAs store per-layer alpha values as separate .alpha keys that the
+ converter doesn't consume, causing a ValueError on leftover keys. This matches the
+ approach used by _convert_kohya_flux_lora_to_diffusers for Flux 1.
+ """
+ alpha_keys = [k for k in state_dict if k.endswith('.alpha')]
+ if not alpha_keys:
+ return state_dict
+ for alpha_key in alpha_keys:
+ base = alpha_key[:-len('.alpha')]
+ down_key = f'{base}.lora_down.weight'
+ if down_key not in state_dict:
+ continue
+ down_weight = state_dict[down_key]
+ rank = down_weight.shape[0]
+ alpha = state_dict.pop(alpha_key).item()
+ scale = alpha / rank
+ scale_down = scale
+ scale_up = 1.0
+ while scale_down * 2 < scale_up:
+ scale_down *= 2
+ scale_up /= 2
+ state_dict[down_key] = down_weight * scale_down
+ up_key = f'{base}.lora_up.weight'
+ if up_key in state_dict:
+ state_dict[up_key] = state_dict[up_key] * scale_up
+ remaining = [k for k in state_dict if k.endswith('.alpha')]
+ if remaining:
+ log.debug(f'Network load: type=LoRA stripped {len(remaining)} orphaned alpha keys')
+ for k in remaining:
+ del state_dict[k]
+ return state_dict
+
+
+def preprocess_f2_keys(state_dict):
+ """Add 'diffusion_model.' prefix to bare BFL-format keys so
+ Flux2LoraLoaderMixin's format detection routes them to the converter."""
+ if any(k.startswith("diffusion_model.") or k.startswith("base_model.model.") for k in state_dict):
+ return state_dict
+ if any(k.startswith(p) for k in state_dict for p in BARE_FLUX_PREFIXES):
+ log.debug('Network load: type=LoRA adding diffusion_model prefix for bare BFL-format keys')
+ state_dict = {f"diffusion_model.{k}": v for k, v in state_dict.items()}
+ return state_dict
+
+
+def try_load_lokr(name, network_on_disk, lora_scale):
+ """Try loading a Flux2/Klein LoRA as LoKR native modules.
+
+ Returns a Network with native modules if the state dict contains LoKR keys,
+ or None to fall through to the generic diffusers path.
+ """
+ t0 = time.time()
+ state_dict = sd_models.read_state_dict(network_on_disk.filename, what='network')
+ if not any('.lokr_w1' in k for k in state_dict):
+ return None
+ net = load_lokr_native(name, network_on_disk, state_dict)
+ if len(net.modules) == 0:
+ log.error(f'Network load: type=LoKR name="{name}" no modules matched')
+ return None
+ log.debug(f'Network load: type=LoKR name="{name}" native modules={len(net.modules)} scale={lora_scale}')
+ l.timer.activate += time.time() - t0
+ return net
+
+
+def load_lokr_native(name, network_on_disk, state_dict):
+ """Load Flux2 LoKR as native modules applied at inference time.
+
+ Stores only the compact LoKR factors (w1, w2) and computes kron(w1, w2)
+ on-the-fly during weight application. For fused QKV modules in double
+ blocks, NetworkModuleLokrChunk computes the full Kronecker product and
+ returns only its designated Q/K/V chunk, then frees the temporary.
+ """
+ prefix = "diffusion_model."
+ sd_model = getattr(shared.sd_model, "pipe", shared.sd_model)
+ lora_convert.assign_network_names_to_compvis_modules(sd_model)
+ net = network.Network(name, network_on_disk)
+ net.mtime = os.path.getmtime(network_on_disk.filename)
+
+ for key in list(state_dict.keys()):
+ if not key.endswith('.lokr_w1'):
+ continue
+ if not key.startswith(prefix):
+ continue
+
+ base = key[len(prefix):].rsplit('.lokr_w1', 1)[0]
+ lokr_weights = {}
+ for suffix in ['lokr_w1', 'lokr_w2', 'lokr_w1_a', 'lokr_w1_b', 'lokr_w2_a', 'lokr_w2_b', 'lokr_t2', 'alpha']:
+ full_key = f'{prefix}{base}.{suffix}'
+ if full_key in state_dict:
+ lokr_weights[suffix] = state_dict[full_key]
+
+ parts = base.split('.')
+ block_type, block_idx, module_suffix = parts[0], parts[1], '.'.join(parts[2:])
+
+ targets = [] # (module_path, chunk_index, num_chunks)
+ if block_type == 'single_blocks' and module_suffix in F2_SINGLE_MAP:
+ path = f'single_transformer_blocks.{block_idx}.{F2_SINGLE_MAP[module_suffix]}'
+ targets.append((path, None, None))
+ elif block_type == 'double_blocks':
+ if module_suffix in F2_DOUBLE_MAP:
+ path = f'transformer_blocks.{block_idx}.{F2_DOUBLE_MAP[module_suffix]}'
+ targets.append((path, None, None))
+ elif module_suffix in F2_QKV_MAP:
+ attn_prefix, proj_keys = F2_QKV_MAP[module_suffix]
+ for i, proj_key in enumerate(proj_keys):
+ path = f'transformer_blocks.{block_idx}.{attn_prefix}.{proj_key}'
+ targets.append((path, i, len(proj_keys)))
+
+ for module_path, chunk_index, num_chunks in targets:
+ network_key = "lora_transformer_" + module_path.replace(".", "_")
+ sd_module = sd_model.network_layer_mapping.get(network_key)
+ if sd_module is None:
+ log.warning(f'Network load: type=LoKR module not found in mapping: {network_key}')
+ continue
+ weights = network.NetworkWeights(
+ network_key=network_key,
+ sd_key=network_key,
+ w=dict(lokr_weights),
+ sd_module=sd_module,
+ )
+ if chunk_index is not None:
+ net.modules[network_key] = network_lokr.NetworkModuleLokrChunk(net, weights, chunk_index, num_chunks)
+ else:
+ net.modules[network_key] = network_lokr.NetworkModuleLokr(net, weights)
+
+ return net
+
+
+patched = False
+
+
+def apply_patch():
+ """Patch Flux2LoraLoaderMixin.lora_state_dict to handle bare BFL-format keys.
+
+ When a LoRA file has bare BFL keys (no diffusion_model. prefix), the original
+ lora_state_dict won't detect them as AI toolkit format. This patch checks for
+ bare keys after the original returns and adds the prefix + re-runs conversion.
+ """
+ global patched # pylint: disable=global-statement
+ if patched:
+ return
+ patched = True
+
+ from diffusers.loaders.lora_pipeline import Flux2LoraLoaderMixin
+ original_lora_state_dict = Flux2LoraLoaderMixin.lora_state_dict.__func__
+
+ @classmethod # pylint: disable=no-self-argument
+ def patched_lora_state_dict(cls, pretrained_model_name_or_path_or_dict, **kwargs):
+ if isinstance(pretrained_model_name_or_path_or_dict, dict):
+ pretrained_model_name_or_path_or_dict = preprocess_f2_keys(pretrained_model_name_or_path_or_dict)
+ pretrained_model_name_or_path_or_dict = apply_lora_alphas(pretrained_model_name_or_path_or_dict)
+ elif isinstance(pretrained_model_name_or_path_or_dict, (str, os.PathLike)):
+ path = str(pretrained_model_name_or_path_or_dict)
+ if path.endswith('.safetensors'):
+ try:
+ from safetensors import safe_open
+ with safe_open(path, framework="pt") as f:
+ keys = list(f.keys())
+ needs_load = (
+ any(k.endswith('.alpha') for k in keys)
+ or (not any(k.startswith("diffusion_model.") or k.startswith("base_model.model.") for k in keys)
+ and any(k.startswith(p) for k in keys for p in BARE_FLUX_PREFIXES))
+ )
+ if needs_load:
+ from safetensors.torch import load_file
+ sd = load_file(path)
+ sd = preprocess_f2_keys(sd)
+ pretrained_model_name_or_path_or_dict = apply_lora_alphas(sd)
+ except Exception:
+ pass
+ return original_lora_state_dict(cls, pretrained_model_name_or_path_or_dict, **kwargs)
+
+ Flux2LoraLoaderMixin.lora_state_dict = patched_lora_state_dict
diff --git a/pipelines/flux/flux_bnb.py b/pipelines/flux/flux_bnb.py
deleted file mode 100644
index 777678af1..000000000
--- a/pipelines/flux/flux_bnb.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import diffusers
-import transformers
-from modules import devices, model_quant
-
-
-def load_flux_bnb(checkpoint_info, diffusers_load_config): # pylint: disable=unused-argument
- transformer = None
- if isinstance(checkpoint_info, str):
- repo_path = checkpoint_info
- else:
- repo_path = checkpoint_info.path
- model_quant.load_bnb('Load model: type=FLUX')
- quant = model_quant.get_quant(repo_path)
- if quant == 'fp8':
- quantization_config = transformers.BitsAndBytesConfig(load_in_8bit=True, bnb_4bit_compute_dtype=devices.dtype)
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- elif quant == 'fp4':
- quantization_config = transformers.BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=devices.dtype, bnb_4bit_quant_type= 'fp4')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- elif quant == 'nf4':
- quantization_config = transformers.BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=devices.dtype, bnb_4bit_quant_type= 'nf4')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- else:
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config)
- return transformer
diff --git a/pipelines/flux/flux_legacy_loader.py b/pipelines/flux/flux_legacy_loader.py
deleted file mode 100644
index c3da3eb8f..000000000
--- a/pipelines/flux/flux_legacy_loader.py
+++ /dev/null
@@ -1,361 +0,0 @@
-import os
-import json
-import torch
-import diffusers
-import transformers
-from safetensors.torch import load_file
-from huggingface_hub import hf_hub_download
-from modules import shared, errors, devices, sd_models, sd_unet, model_te, model_quant, sd_hijack_te
-from modules.logger import log
-
-
-debug = log.trace if os.environ.get('SD_LOAD_DEBUG', None) is not None else lambda *args, **kwargs: None
-
-
-def load_flux_quanto(checkpoint_info):
- transformer, text_encoder_2 = None, None
- quanto = model_quant.load_quanto('Load model: type=FLUX')
-
- if isinstance(checkpoint_info, str):
- repo_path = checkpoint_info
- else:
- repo_path = checkpoint_info.path
-
- try:
- quantization_map = os.path.join(repo_path, "transformer", "quantization_map.json")
- debug(f'Load model: type=FLUX quantization map="{quantization_map}" repo="{checkpoint_info.name}" component="transformer"')
- if not os.path.exists(quantization_map):
- repo_id = sd_models.path_to_repo(checkpoint_info)
- quantization_map = hf_hub_download(repo_id, subfolder='transformer', filename='quantization_map.json', cache_dir=shared.opts.diffusers_dir)
- with open(quantization_map, "r", encoding='utf8') as f:
- quantization_map = json.load(f)
- state_dict = load_file(os.path.join(repo_path, "transformer", "diffusion_pytorch_model.safetensors"))
- dtype = state_dict['context_embedder.bias'].dtype
- with torch.device("meta"):
- transformer = diffusers.FluxTransformer2DModel.from_config(os.path.join(repo_path, "transformer", "config.json")).to(dtype=dtype)
- quanto.requantize(transformer, state_dict, quantization_map, device=torch.device("cpu"))
- transformer_dtype = transformer.dtype
- if transformer_dtype != devices.dtype:
- try:
- transformer = transformer.to(dtype=devices.dtype)
- except Exception:
- log.error(f"Load model: type=FLUX Failed to cast transformer to {devices.dtype}, set dtype to {transformer_dtype}")
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load Quanto transformer: {e}")
- if debug:
- errors.display(e, 'FLUX Quanto:')
-
- try:
- quantization_map = os.path.join(repo_path, "text_encoder_2", "quantization_map.json")
- debug(f'Load model: type=FLUX quantization map="{quantization_map}" repo="{checkpoint_info.name}" component="text_encoder_2"')
- if not os.path.exists(quantization_map):
- repo_id = sd_models.path_to_repo(checkpoint_info)
- quantization_map = hf_hub_download(repo_id, subfolder='text_encoder_2', filename='quantization_map.json', cache_dir=shared.opts.diffusers_dir)
- with open(quantization_map, "r", encoding='utf8') as f:
- quantization_map = json.load(f)
- with open(os.path.join(repo_path, "text_encoder_2", "config.json"), encoding='utf8') as f:
- t5_config = transformers.T5Config(**json.load(f))
- state_dict = load_file(os.path.join(repo_path, "text_encoder_2", "model.safetensors"))
- dtype = state_dict['encoder.block.0.layer.0.SelfAttention.relative_attention_bias.weight'].dtype
- with torch.device("meta"):
- text_encoder_2 = transformers.T5EncoderModel(t5_config).to(dtype=dtype)
- quanto.requantize(text_encoder_2, state_dict, quantization_map, device=torch.device("cpu"))
- text_encoder_2_dtype = text_encoder_2.dtype
- if text_encoder_2_dtype != devices.dtype:
- try:
- text_encoder_2 = text_encoder_2.to(dtype=devices.dtype)
- except Exception:
- log.error(f"Load model: type=FLUX Failed to cast text encoder to {devices.dtype}, set dtype to {text_encoder_2_dtype}")
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load Quanto text encoder: {e}")
- if debug:
- errors.display(e, 'FLUX Quanto:')
-
- return transformer, text_encoder_2
-
-
-def load_flux_bnb(checkpoint_info, diffusers_load_config): # pylint: disable=unused-argument
- transformer, text_encoder_2 = None, None
- if isinstance(checkpoint_info, str):
- repo_path = checkpoint_info
- else:
- repo_path = checkpoint_info.path
- model_quant.load_bnb('Load model: type=FLUX')
- quant = model_quant.get_quant(repo_path)
- try:
- if quant == 'fp8':
- quantization_config = transformers.BitsAndBytesConfig(load_in_8bit=True, bnb_4bit_compute_dtype=devices.dtype)
- debug(f'Quantization: {quantization_config}')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- elif quant == 'fp4':
- quantization_config = transformers.BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=devices.dtype, bnb_4bit_quant_type= 'fp4')
- debug(f'Quantization: {quantization_config}')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- elif quant == 'nf4':
- quantization_config = transformers.BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=devices.dtype, bnb_4bit_quant_type= 'nf4')
- debug(f'Quantization: {quantization_config}')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config, quantization_config=quantization_config)
- else:
- transformer = diffusers.FluxTransformer2DModel.from_single_file(repo_path, **diffusers_load_config)
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load BnB transformer: {e}")
- transformer, text_encoder_2 = None, None
- if debug:
- errors.display(e, 'FLUX:')
- return transformer, text_encoder_2
-
-
-def load_quants(kwargs, repo_id, cache_dir, allow_quant): # pylint: disable=unused-argument
- try:
- diffusers_load_config = {
- "torch_dtype": devices.dtype,
- "cache_dir": cache_dir,
- }
- if 'transformer' not in kwargs and model_quant.check_nunchaku('Model'):
- import nunchaku
- nunchaku_precision = nunchaku.utils.get_precision()
- nunchaku_repo = None
- if 'flux.1-kontext' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/nunchaku-flux.1-kontext-dev/svdq-{nunchaku_precision}_r32-flux.1-kontext-dev.safetensors"
- elif 'flux.1-dev' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/nunchaku-flux.1-dev/svdq-{nunchaku_precision}_r32-flux.1-dev.safetensors"
- elif 'flux.1-schnell' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/nunchaku-flux.1-schnell/svdq-{nunchaku_precision}_r32-flux.1-schnell.safetensors"
- elif 'flux.1-fill' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/svdq-fp4-flux.1-fill-dev/svdq-{nunchaku_precision}_r32-flux.1-schnell.safetensors"
- elif 'flux.1-depth' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/svdq-int4-flux.1-depth-dev/svdq-{nunchaku_precision}_r32-flux.1-schnell.safetensors"
- elif 'shuttle' in repo_id.lower():
- nunchaku_repo = f"mit-han-lab/nunchaku-shuttle-jaguar/svdq-{nunchaku_precision}_r32-shuttle-jaguar.safetensors"
- else:
- log.error(f'Load module: quant=Nunchaku module=transformer repo="{repo_id}" unsupported')
- if nunchaku_repo is not None:
- log.debug(f'Load module: quant=Nunchaku module=transformer repo="{nunchaku_repo}" precision={nunchaku_precision} offload={shared.opts.nunchaku_offload} attention={shared.opts.nunchaku_attention}')
- kwargs['transformer'] = nunchaku.NunchakuFluxTransformer2dModel.from_pretrained(nunchaku_repo, offload=shared.opts.nunchaku_offload, torch_dtype=devices.dtype, cache_dir=cache_dir)
- kwargs['transformer'].quantization_method = 'SVDQuant'
- if shared.opts.nunchaku_attention:
- kwargs['transformer'].set_attention_impl("nunchaku-fp16")
- if 'transformer' not in kwargs and model_quant.check_quant('Model'):
- load_args, quant_args = model_quant.get_dit_args(diffusers_load_config, module='Model', device_map=True)
- kwargs['transformer'] = diffusers.FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", **load_args, **quant_args)
- if 'text_encoder_2' not in kwargs and model_quant.check_nunchaku('TE'):
- import nunchaku
- nunchaku_precision = nunchaku.utils.get_precision()
- nunchaku_repo = 'mit-han-lab/nunchaku-t5/awq-int4-flux.1-t5xxl.safetensors'
- log.debug(f'Load module: quant=Nunchaku module=t5 repo="{nunchaku_repo}" precision={nunchaku_precision}')
- kwargs['text_encoder_2'] = nunchaku.NunchakuT5EncoderModel.from_pretrained(nunchaku_repo, torch_dtype=devices.dtype, cache_dir=cache_dir)
- kwargs['text_encoder_2'].quantization_method = 'SVDQuant'
- if 'text_encoder_2' not in kwargs and model_quant.check_quant('TE'):
- load_args, quant_args = model_quant.get_dit_args(diffusers_load_config, module='TE', device_map=True)
- kwargs['text_encoder_2'] = transformers.T5EncoderModel.from_pretrained(repo_id, subfolder="text_encoder_2", **load_args, **quant_args)
- except Exception as e:
- log.error(f'Quantization: {e}')
- errors.display(e, 'Quantization:')
- return kwargs
-
-
-def load_transformer(file_path): # triggered by opts.sd_unet change
- if file_path is None or not os.path.exists(file_path):
- return None
- transformer = None
- quant = model_quant.get_quant(file_path)
- diffusers_load_config = {
- "torch_dtype": devices.dtype,
- "cache_dir": shared.opts.hfcache_dir,
- }
- if quant is not None and quant != 'none':
- log.info(f'Load module: type=UNet/Transformer file="{file_path}" offload={shared.opts.diffusers_offload_mode} prequant={quant} dtype={devices.dtype}')
- if 'gguf' in file_path.lower():
- from modules import ggml
- _transformer = ggml.load_gguf(file_path, cls=diffusers.FluxTransformer2DModel, compute_dtype=devices.dtype)
- if _transformer is not None:
- transformer = _transformer
- elif quant == "fp8":
- _transformer = model_quant.load_fp8_model_layerwise(file_path, diffusers.FluxTransformer2DModel.from_single_file, diffusers_load_config)
- if _transformer is not None:
- transformer = _transformer
- elif quant in {'qint8', 'qint4'}:
- _transformer, _text_encoder_2 = load_flux_quanto(file_path)
- if _transformer is not None:
- transformer = _transformer
- elif quant in {'fp8', 'fp4', 'nf4'}:
- _transformer, _text_encoder_2 = load_flux_bnb(file_path, diffusers_load_config)
- if _transformer is not None:
- transformer = _transformer
- elif 'nf4' in quant:
- from pipelines.flux.flux_nf4 import load_flux_nf4
- _transformer, _text_encoder_2 = load_flux_nf4(file_path, prequantized=True)
- if _transformer is not None:
- transformer = _transformer
- else:
- quant_args = model_quant.create_bnb_config({})
- if quant_args:
- log.info(f'Load module: type=Flux transformer file="{file_path}" offload={shared.opts.diffusers_offload_mode} quant=bnb dtype={devices.dtype}')
- from pipelines.flux.flux_nf4 import load_flux_nf4
- transformer, _text_encoder_2 = load_flux_nf4(file_path, prequantized=False)
- if transformer is not None:
- return transformer
- load_args, quant_args = model_quant.get_dit_args(diffusers_load_config, module='Model', device_map=True)
- log.debug(f'Load model: type=Flux transformer file="{file_path}" offload={shared.opts.diffusers_offload_mode} args={load_args}')
- transformer = diffusers.FluxTransformer2DModel.from_single_file(file_path, **load_args, **quant_args)
- if transformer is None:
- log.error('Failed to load UNet model')
- shared.opts.sd_unet = 'Default'
- return transformer
-
-
-def load_flux(checkpoint_info, diffusers_load_config): # triggered by opts.sd_checkpoint change
- repo_id = sd_models.path_to_repo(checkpoint_info)
- sd_models.hf_auth_check(checkpoint_info)
- allow_post_quant = False
-
- prequantized = model_quant.get_quant(checkpoint_info.path)
- log.debug(f'Load model: type=FLUX model="{checkpoint_info.name}" repo="{repo_id}" unet="{shared.opts.sd_unet}" te="{shared.opts.sd_text_encoder}" vae="{shared.opts.sd_vae}" quant={prequantized} offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype}')
- debug(f'Load model: type=FLUX config={diffusers_load_config}')
-
- transformer = None
- text_encoder_1 = None
- text_encoder_2 = None
- vae = None
-
- # unload current model
- sd_models.unload_model_weights()
- shared.sd_model = None
- devices.torch_gc(force=True, reason='load')
-
- if shared.opts.teacache_enabled:
- from modules import teacache
- log.debug(f'Transformers cache: type=teacache patch=forward cls={diffusers.FluxTransformer2DModel.__name__}')
- diffusers.FluxTransformer2DModel.forward = teacache.teacache_flux_forward # patch must be done before transformer is loaded
-
- # load overrides if any
- if shared.opts.sd_unet != 'Default':
- try:
- debug(f'Load model: type=FLUX unet="{shared.opts.sd_unet}"')
- transformer = load_transformer(sd_unet.unet_dict[shared.opts.sd_unet])
- if transformer is None:
- shared.opts.sd_unet = 'Default'
- sd_unet.failed_unet.append(shared.opts.sd_unet)
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load UNet: {e}")
- shared.opts.sd_unet = 'Default'
- if debug:
- errors.display(e, 'FLUX UNet:')
- if shared.opts.sd_text_encoder != 'Default':
- try:
- debug(f'Load model: type=FLUX te="{shared.opts.sd_text_encoder}"')
- from modules.model_te import load_t5, load_vit_l
- if 'vit-l' in shared.opts.sd_text_encoder.lower():
- text_encoder_1 = load_vit_l()
- else:
- text_encoder_2 = load_t5(name=shared.opts.sd_text_encoder, cache_dir=shared.opts.diffusers_dir)
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load T5: {e}")
- shared.opts.sd_text_encoder = 'Default'
- if debug:
- errors.display(e, 'FLUX T5:')
- if shared.opts.sd_vae != 'Default' and shared.opts.sd_vae != 'Automatic':
- try:
- debug(f'Load model: type=FLUX vae="{shared.opts.sd_vae}"')
- from modules import sd_vae
- # vae = sd_vae.load_vae_diffusers(None, sd_vae.vae_dict[shared.opts.sd_vae], 'override')
- vae_file = sd_vae.vae_dict[shared.opts.sd_vae]
- if os.path.exists(vae_file):
- vae_config = os.path.join('configs', 'flux', 'vae', 'config.json')
- vae = diffusers.AutoencoderKL.from_single_file(vae_file, config=vae_config, **diffusers_load_config)
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load VAE: {e}")
- shared.opts.sd_vae = 'Default'
- if debug:
- errors.display(e, 'FLUX VAE:')
-
- # load quantized components if any
- if prequantized == 'nf4':
- try:
- from pipelines.flux.flux_nf4 import load_flux_nf4
- _transformer, _text_encoder = load_flux_nf4(checkpoint_info)
- if _transformer is not None:
- transformer = _transformer
- if _text_encoder is not None:
- text_encoder_2 = _text_encoder
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load NF4 components: {e}")
- if debug:
- errors.display(e, 'FLUX NF4:')
- if prequantized == 'qint8' or prequantized == 'qint4':
- try:
- _transformer, _text_encoder = load_flux_quanto(checkpoint_info)
- if _transformer is not None:
- transformer = _transformer
- if _text_encoder is not None:
- text_encoder_2 = _text_encoder
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load Quanto components: {e}")
- if debug:
- errors.display(e, 'FLUX Quanto:')
-
- # initialize pipeline with pre-loaded components
- kwargs = {}
- if transformer is not None:
- kwargs['transformer'] = transformer
- sd_unet.loaded_unet = shared.opts.sd_unet
- if text_encoder_1 is not None:
- kwargs['text_encoder'] = text_encoder_1
- model_te.loaded_te = shared.opts.sd_text_encoder
- if text_encoder_2 is not None:
- kwargs['text_encoder_2'] = text_encoder_2
- model_te.loaded_te = shared.opts.sd_text_encoder
- if vae is not None:
- kwargs['vae'] = vae
- if repo_id == 'sayakpaul/flux.1-dev-nf4':
- repo_id = 'black-forest-labs/FLUX.1-dev' # workaround since sayakpaul model is missing model_index.json
- if 'Fill' in repo_id:
- cls = diffusers.FluxFillPipeline
- elif 'Canny' in repo_id:
- cls = diffusers.FluxControlPipeline
- elif 'Depth' in repo_id:
- cls = diffusers.FluxControlPipeline
- elif 'Kontext' in repo_id:
- cls = diffusers.FluxKontextPipeline
- from diffusers import pipelines
- pipelines.auto_pipeline.AUTO_TEXT2IMAGE_PIPELINES_MAPPING["flux1kontext"] = diffusers.FluxKontextPipeline
- pipelines.auto_pipeline.AUTO_IMAGE2IMAGE_PIPELINES_MAPPING["flux1kontext"] = diffusers.FluxKontextPipeline
- pipelines.auto_pipeline.AUTO_INPAINT_PIPELINES_MAPPING["flux1kontext"] = diffusers.FluxKontextInpaintPipeline
-
- else:
- cls = diffusers.FluxPipeline
- log.debug(f'Load model: type=FLUX cls={cls.__name__} preloaded={list(kwargs)} revision={diffusers_load_config.get("revision", None)}')
- for c in kwargs:
- if getattr(kwargs[c], 'quantization_method', None) is not None or getattr(kwargs[c], 'gguf', None) is not None:
- log.debug(f'Load model: type=FLUX component={c} dtype={kwargs[c].dtype} quant={getattr(kwargs[c], "quantization_method", None) or getattr(kwargs[c], "gguf", None)}')
- if kwargs[c].dtype == torch.float32 and devices.dtype != torch.float32:
- try:
- kwargs[c] = kwargs[c].to(dtype=devices.dtype)
- log.warning(f'Load model: type=FLUX component={c} dtype={kwargs[c].dtype} cast dtype={devices.dtype} recast')
- except Exception:
- pass
-
- allow_quant = 'gguf' not in (sd_unet.loaded_unet or '') and (prequantized is None or prequantized == 'none')
- fn = checkpoint_info.path
- if (fn is None) or (not os.path.exists(fn) or os.path.isdir(fn)):
- kwargs = load_quants(kwargs, repo_id, cache_dir=shared.opts.diffusers_dir, allow_quant=allow_quant)
- if fn.endswith('.safetensors') and os.path.isfile(fn):
- pipe = cls.from_single_file(fn, cache_dir=shared.opts.diffusers_dir, **kwargs, **diffusers_load_config)
- allow_post_quant = True
- else:
- pipe = cls.from_pretrained(repo_id, cache_dir=shared.opts.diffusers_dir, **kwargs, **diffusers_load_config)
-
- if shared.opts.teacache_enabled and model_quant.check_nunchaku('Model'):
- from nunchaku.caching.diffusers_adapters import apply_cache_on_pipe
- apply_cache_on_pipe(pipe, residual_diff_threshold=0.12)
-
- # release memory
- transformer = None
- text_encoder_1 = None
- text_encoder_2 = None
- vae = None
- for k in kwargs.keys():
- kwargs[k] = None
- sd_hijack_te.init_hijack(pipe)
- devices.torch_gc(force=True, reason='load')
- return pipe, allow_post_quant
diff --git a/pipelines/flux/flux_nf4.py b/pipelines/flux/flux_nf4.py
deleted file mode 100644
index 08c124b0b..000000000
--- a/pipelines/flux/flux_nf4.py
+++ /dev/null
@@ -1,201 +0,0 @@
-"""
-Copied from: https://github.com/huggingface/diffusers/issues/9165
-"""
-
-import os
-import torch
-import torch.nn as nn
-from transformers.quantizers.quantizers_utils import get_module_from_name
-from huggingface_hub import hf_hub_download
-from accelerate import init_empty_weights
-from accelerate.utils import set_module_tensor_to_device
-from diffusers.loaders.single_file_utils import convert_flux_transformer_checkpoint_to_diffusers
-import safetensors.torch
-from modules import shared, devices, model_quant
-from modules.logger import log
-
-
-debug = os.environ.get('SD_LOAD_DEBUG', None) is not None
-
-
-def _replace_with_bnb_linear(
- model,
- method="nf4",
- has_been_replaced=False,
-):
- """
- Private method that wraps the recursion for module replacement.
- Returns the converted model and a boolean that indicates if the conversion has been successfull or not.
- """
- bnb = model_quant.load_bnb('Load model: type=FLUX')
- for name, module in model.named_children():
- if isinstance(module, nn.Linear):
- with init_empty_weights():
- in_features = module.in_features
- out_features = module.out_features
-
- if method == "llm_int8":
- model._modules[name] = bnb.nn.Linear8bitLt( # pylint: disable=protected-access
- in_features,
- out_features,
- module.bias is not None,
- has_fp16_weights=False,
- threshold=6.0,
- )
- has_been_replaced = True
- else:
- model._modules[name] = bnb.nn.Linear4bit( # pylint: disable=protected-access
- in_features,
- out_features,
- module.bias is not None,
- compute_dtype=devices.dtype,
- compress_statistics=False,
- quant_type="nf4",
- )
- has_been_replaced = True
- # Store the module class in case we need to transpose the weight later
- model._modules[name].source_cls = type(module) # pylint: disable=protected-access
- # Force requires grad to False to avoid unexpected errors
- model._modules[name].requires_grad_(False) # pylint: disable=protected-access
-
- if len(list(module.children())) > 0:
- _, has_been_replaced = _replace_with_bnb_linear(
- module,
- has_been_replaced=has_been_replaced,
- )
- # Remove the last key for recursion
- return model, has_been_replaced
-
-
-def check_quantized_param(
- model,
- param_name: str,
-) -> bool:
- bnb = model_quant.load_bnb('Load model: type=FLUX')
- module, tensor_name = get_module_from_name(model, param_name)
- if isinstance(module._parameters.get(tensor_name, None), bnb.nn.Params4bit): # pylint: disable=protected-access
- # Add here check for loaded components' dtypes once serialization is implemented
- return True
- elif isinstance(module, bnb.nn.Linear4bit) and tensor_name == "bias":
- # bias could be loaded by regular set_module_tensor_to_device() from accelerate,
- # but it would wrongly use uninitialized weight there.
- return True
- else:
- return False
-
-
-def create_quantized_param(
- model,
- param_value: "torch.Tensor",
- param_name: str,
- target_device: "torch.device",
- state_dict=None,
- unexpected_keys=None,
- pre_quantized=False
-):
- bnb = model_quant.load_bnb('Load model: type=FLUX')
- module, tensor_name = get_module_from_name(model, param_name)
-
- if tensor_name not in module._parameters: # pylint: disable=protected-access
- raise ValueError(f"{module} does not have a parameter or a buffer named {tensor_name}.")
-
- old_value = getattr(module, tensor_name)
-
- if tensor_name == "bias":
- if param_value is None:
- new_value = old_value.to(target_device)
- else:
- new_value = param_value.to(target_device)
- new_value = torch.nn.Parameter(new_value, requires_grad=old_value.requires_grad)
- module._parameters[tensor_name] = new_value # pylint: disable=protected-access
- return
-
- if not isinstance(module._parameters[tensor_name], bnb.nn.Params4bit): # pylint: disable=protected-access
- raise ValueError("this function only loads `Linear4bit components`")
- if (
- old_value.device == torch.device("meta")
- and target_device not in ["meta", torch.device("meta")]
- and param_value is None
- ):
- raise ValueError(f"{tensor_name} is on the meta device, we need a `value` to put in on {target_device}.")
-
- if pre_quantized:
- if (param_name + ".quant_state.bitsandbytes__fp4" not in state_dict) and (param_name + ".quant_state.bitsandbytes__nf4" not in state_dict):
- raise ValueError(f"Supplied state dict for {param_name} does not contain `bitsandbytes__*` and possibly other `quantized_stats` components.")
- quantized_stats = {}
- for k, v in state_dict.items():
- # `startswith` to counter for edge cases where `param_name`
- # substring can be present in multiple places in the `state_dict`
- if param_name + "." in k and k.startswith(param_name):
- quantized_stats[k] = v
- if unexpected_keys is not None and k in unexpected_keys:
- unexpected_keys.remove(k)
- new_value = bnb.nn.Params4bit.from_prequantized(
- data=param_value,
- quantized_stats=quantized_stats,
- requires_grad=False,
- device=target_device,
- )
- else:
- new_value = param_value.to("cpu")
- kwargs = old_value.__dict__
- new_value = bnb.nn.Params4bit(new_value, requires_grad=False, **kwargs).to(target_device)
- module._parameters[tensor_name] = new_value # pylint: disable=protected-access
-
-
-def load_flux_nf4(checkpoint_info, prequantized: bool = True):
- transformer = None
- text_encoder_2 = None
- if isinstance(checkpoint_info, str):
- repo_path = checkpoint_info
- else:
- repo_path = checkpoint_info.path
- if os.path.exists(repo_path) and os.path.isfile(repo_path):
- ckpt_path = repo_path
- elif os.path.exists(repo_path) and os.path.isdir(repo_path) and os.path.exists(os.path.join(repo_path, "diffusion_pytorch_model.safetensors")):
- ckpt_path = os.path.join(repo_path, "diffusion_pytorch_model.safetensors")
- else:
- ckpt_path = hf_hub_download(repo_path, filename="diffusion_pytorch_model.safetensors", cache_dir=shared.opts.diffusers_dir)
- original_state_dict = safetensors.torch.load_file(ckpt_path)
-
- if 'sayakpaul' in repo_path:
- converted_state_dict = original_state_dict # already converted
- else:
- try:
- converted_state_dict = convert_flux_transformer_checkpoint_to_diffusers(original_state_dict)
- except Exception as e:
- log.error(f"Load model: type=FLUX Failed to convert UNET: {e}")
- if debug:
- from modules import errors
- errors.display(e, 'FLUX convert:')
- converted_state_dict = original_state_dict
-
- with init_empty_weights():
- from diffusers import FluxTransformer2DModel
- config = FluxTransformer2DModel.load_config(os.path.join('configs', 'flux'), subfolder="transformer")
- transformer = FluxTransformer2DModel.from_config(config).to(devices.dtype)
- expected_state_dict_keys = list(transformer.state_dict().keys())
-
- _replace_with_bnb_linear(transformer, "nf4")
-
- try:
- for param_name, param in converted_state_dict.items():
- if param_name not in expected_state_dict_keys:
- continue
- is_param_float8_e4m3fn = hasattr(torch, "float8_e4m3fn") and param.dtype == torch.float8_e4m3fn
- if torch.is_floating_point(param) and not is_param_float8_e4m3fn:
- param = param.to(devices.dtype)
- if not check_quantized_param(transformer, param_name):
- set_module_tensor_to_device(transformer, param_name, device=0, value=param)
- else:
- create_quantized_param(transformer, param, param_name, target_device=0, state_dict=original_state_dict, pre_quantized=prequantized)
- except Exception as e:
- transformer, text_encoder_2 = None, None
- log.error(f"Load model: type=FLUX failed to load UNET: {e}")
- if debug:
- from modules import errors
- errors.display(e, 'FLUX:')
-
- del original_state_dict
- devices.torch_gc(force=True, reason='load')
- return transformer, text_encoder_2
diff --git a/pipelines/flux/flux_quanto.py b/pipelines/flux/flux_quanto.py
deleted file mode 100644
index 74bd07c8e..000000000
--- a/pipelines/flux/flux_quanto.py
+++ /dev/null
@@ -1,74 +0,0 @@
-import os
-import json
-import torch
-import diffusers
-import transformers
-from safetensors.torch import load_file
-from huggingface_hub import hf_hub_download
-from modules import shared, errors, devices, sd_models, model_quant
-from modules.logger import log
-
-
-debug = log.trace if os.environ.get('SD_LOAD_DEBUG', None) is not None else lambda *args, **kwargs: None
-
-
-def load_flux_quanto(checkpoint_info):
- transformer, text_encoder_2 = None, None
- quanto = model_quant.load_quanto('Load model: type=FLUX')
-
- if isinstance(checkpoint_info, str):
- repo_path = checkpoint_info
- else:
- repo_path = checkpoint_info.path
-
- try:
- quantization_map = os.path.join(repo_path, "transformer", "quantization_map.json")
- debug(f'Load model: type=FLUX quantization map="{quantization_map}" repo="{checkpoint_info.name}" component="transformer"')
- if not os.path.exists(quantization_map):
- repo_id = sd_models.path_to_repo(checkpoint_info)
- quantization_map = hf_hub_download(repo_id, subfolder='transformer', filename='quantization_map.json', cache_dir=shared.opts.diffusers_dir)
- with open(quantization_map, "r", encoding='utf8') as f:
- quantization_map = json.load(f)
- state_dict = load_file(os.path.join(repo_path, "transformer", "diffusion_pytorch_model.safetensors"))
- dtype = state_dict['context_embedder.bias'].dtype
- with torch.device("meta"):
- transformer = diffusers.FluxTransformer2DModel.from_config(os.path.join(repo_path, "transformer", "config.json")).to(dtype=dtype)
- quanto.requantize(transformer, state_dict, quantization_map, device=torch.device("cpu"))
- transformer_dtype = transformer.dtype
- if transformer_dtype != devices.dtype:
- try:
- transformer = transformer.to(dtype=devices.dtype)
- except Exception:
- log.error(f"Load model: type=FLUX Failed to cast transformer to {devices.dtype}, set dtype to {transformer_dtype}")
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load Quanto transformer: {e}")
- if debug:
- errors.display(e, 'FLUX Quanto:')
-
- try:
- quantization_map = os.path.join(repo_path, "text_encoder_2", "quantization_map.json")
- debug(f'Load model: type=FLUX quantization map="{quantization_map}" repo="{checkpoint_info.name}" component="text_encoder_2"')
- if not os.path.exists(quantization_map):
- repo_id = sd_models.path_to_repo(checkpoint_info)
- quantization_map = hf_hub_download(repo_id, subfolder='text_encoder_2', filename='quantization_map.json', cache_dir=shared.opts.diffusers_dir)
- with open(quantization_map, "r", encoding='utf8') as f:
- quantization_map = json.load(f)
- with open(os.path.join(repo_path, "text_encoder_2", "config.json"), encoding='utf8') as f:
- t5_config = transformers.T5Config(**json.load(f))
- state_dict = load_file(os.path.join(repo_path, "text_encoder_2", "model.safetensors"))
- dtype = state_dict['encoder.block.0.layer.0.SelfAttention.relative_attention_bias.weight'].dtype
- with torch.device("meta"):
- text_encoder_2 = transformers.T5EncoderModel(t5_config).to(dtype=dtype)
- quanto.requantize(text_encoder_2, state_dict, quantization_map, device=torch.device("cpu"))
- text_encoder_2_dtype = text_encoder_2.dtype
- if text_encoder_2_dtype != devices.dtype:
- try:
- text_encoder_2 = text_encoder_2.to(dtype=devices.dtype)
- except Exception:
- log.error(f"Load model: type=FLUX Failed to cast text encoder to {devices.dtype}, set dtype to {text_encoder_2_dtype}")
- except Exception as e:
- log.error(f"Load model: type=FLUX failed to load Quanto text encoder: {e}")
- if debug:
- errors.display(e, 'FLUX Quanto:')
-
- return transformer, text_encoder_2
diff --git a/pipelines/model_flux.py b/pipelines/model_flux.py
index 08a2a2854..23bd40455 100644
--- a/pipelines/model_flux.py
+++ b/pipelines/model_flux.py
@@ -41,18 +41,6 @@ def load_flux(checkpoint_info, diffusers_load_config=None):
transformer = None
text_encoder_2 = None
- # handle prequantized models
- prequantized = model_quant.get_quant(checkpoint_info.path)
- if prequantized == 'nf4':
- from pipelines.flux.flux_nf4 import load_flux_nf4
- transformer, text_encoder_2 = load_flux_nf4(checkpoint_info)
- elif prequantized == 'qint8' or prequantized == 'qint4':
- from pipelines.flux.flux_quanto import load_flux_quanto
- transformer, text_encoder_2 = load_flux_quanto(checkpoint_info)
- elif prequantized == 'fp4' or prequantized == 'fp8':
- from pipelines.flux.flux_bnb import load_flux_bnb
- transformer = load_flux_bnb(checkpoint_info, diffusers_load_config)
-
# handle transformer svdquant if available, t5 is handled inside load_text_encoder
if transformer is None and model_quant.check_nunchaku('Model'):
from pipelines.flux.flux_nunchaku import load_flux_nunchaku
diff --git a/pipelines/model_flux2.py b/pipelines/model_flux2.py
index c2963c316..dd6c364b0 100644
--- a/pipelines/model_flux2.py
+++ b/pipelines/model_flux2.py
@@ -31,6 +31,9 @@ def load_flux2(checkpoint_info, diffusers_load_config=None):
diffusers.pipelines.auto_pipeline.AUTO_IMAGE2IMAGE_PIPELINES_MAPPING["flux2"] = diffusers.Flux2Pipeline
diffusers.pipelines.auto_pipeline.AUTO_INPAINT_PIPELINES_MAPPING["flux2"] = diffusers.Flux2Pipeline
+ from pipelines.flux import flux2_lora
+ flux2_lora.apply_patch()
+
del text_encoder
del transformer
sd_hijack_te.init_hijack(pipe)
diff --git a/pipelines/model_flux2_klein.py b/pipelines/model_flux2_klein.py
index 34ccc1f67..31e539128 100644
--- a/pipelines/model_flux2_klein.py
+++ b/pipelines/model_flux2_klein.py
@@ -34,6 +34,9 @@ def load_flux2_klein(checkpoint_info, diffusers_load_config=None):
diffusers.pipelines.auto_pipeline.AUTO_IMAGE2IMAGE_PIPELINES_MAPPING["flux2klein"] = diffusers.Flux2KleinPipeline
diffusers.pipelines.auto_pipeline.AUTO_INPAINT_PIPELINES_MAPPING["flux2klein"] = diffusers.Flux2KleinPipeline
+ from pipelines.flux import flux2_lora
+ flux2_lora.apply_patch()
+
del text_encoder
del transformer
sd_hijack_te.init_hijack(pipe)
diff --git a/requirements.txt b/requirements.txt
index 67c45ac46..e8ca68aba 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -27,13 +27,13 @@ peft==0.18.1
httpx==0.28.1
requests==2.32.3
tqdm==4.67.3
-accelerate==1.12.0
+accelerate==1.13.0
einops==0.8.1
-huggingface_hub==1.5.0
+huggingface_hub==1.7.2
numpy==2.1.2
pandas==2.3.1
protobuf==6.33.5
-pytorch_lightning==2.6.0
+pytorch_lightning==2.6.1
urllib3==1.26.19
Pillow==10.4.0
timm==1.0.24
diff --git a/scripts/color_grading.py b/scripts/color_grading.py
new file mode 100644
index 000000000..7ef518662
--- /dev/null
+++ b/scripts/color_grading.py
@@ -0,0 +1,15 @@
+from modules import scripts_postprocessing, ui_sections, processing_grading
+
+
+class ScriptPostprocessingColorGrading(scripts_postprocessing.ScriptPostprocessing):
+ name = "Color Grading"
+
+ def ui(self):
+ ui_controls = ui_sections.create_color_inputs('process')
+ ui_controls_dict = {control.label.replace(" ", "_").replace(".", "").lower(): control for control in ui_controls}
+ return ui_controls_dict
+
+ def process(self, pp: scripts_postprocessing.PostprocessedImage, *args, **kwargs): # pylint: disable=arguments-differ
+ grading_params = processing_grading.GradingParams(*args, **kwargs)
+ if processing_grading.is_active(grading_params):
+ pp.image = processing_grading.grade_image(pp.image, grading_params)
diff --git a/scripts/nudenet_ext.py b/scripts/nudenet_ext.py
index be24ea1ed..3a735ba32 100644
--- a/scripts/nudenet_ext.py
+++ b/scripts/nudenet_ext.py
@@ -124,7 +124,7 @@ def process(
# defines script for dual-mode usage
-class Script(scripts.Script):
+class ScriptNudeNet(scripts.Script):
# see below for all available options and callbacks
#
@@ -148,7 +148,7 @@ class Script(scripts.Script):
# defines postprocessing script for dual-mode usage
-class ScriptPostprocessing(scripts_postprocessing.ScriptPostprocessing):
+class ScriptPostprocessingNudeNet(scripts_postprocessing.ScriptPostprocessing):
name = 'NudeNet'
order = 10000
diff --git a/scripts/postprocessing_video.py b/scripts/postprocessing_video.py
index 84836abca..d855be5d5 100644
--- a/scripts/postprocessing_video.py
+++ b/scripts/postprocessing_video.py
@@ -2,8 +2,8 @@ import gradio as gr
from modules import video, scripts_postprocessing
-class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
- name = "Video"
+class ScriptPostprocessingVideo(scripts_postprocessing.ScriptPostprocessing):
+ name = "Create Video"
def ui(self):
with gr.Accordion('Create video', open = False, elem_id="postprocess_video_accordion"):
@@ -18,7 +18,7 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
]
with gr.Row():
- gr.HTML("  Video ")
+ gr.HTML("  Create video from generated images ")
with gr.Row():
video_type = gr.Dropdown(label='Video file', choices=['None', 'GIF', 'PNG', 'MP4'], value='None', elem_id="extras_video_type")
duration = gr.Slider(label='Duration', minimum=0.25, maximum=10, step=0.25, value=2, visible=False, elem_id="extras_video_duration")
diff --git a/scripts/rocm/rocm_mgr.py b/scripts/rocm/rocm_mgr.py
new file mode 100644
index 000000000..b704fff03
--- /dev/null
+++ b/scripts/rocm/rocm_mgr.py
@@ -0,0 +1,446 @@
+import os
+import sys
+from pathlib import Path
+from typing import Dict, Optional
+
+import installer
+from modules.logger import log
+from modules.json_helpers import readfile, writefile
+from scripts.rocm.rocm_vars import ROCM_ENV_VARS # pylint: disable=no-name-in-module
+from scripts.rocm import rocm_profiles # pylint: disable=no-name-in-module
+
+
+def _check_rocm() -> bool:
+ from modules import shared
+ if getattr(shared.cmd_opts, 'use_rocm', False):
+ return True
+ if installer.torch_info.get('type') == 'rocm':
+ return True
+ import torch # pylint: disable=import-outside-toplevel
+ return hasattr(torch.version, 'hip') and torch.version.hip is not None
+
+
+is_rocm = _check_rocm()
+
+
+CONFIG = Path(os.path.abspath(os.path.join('data', 'rocm.json')))
+
+_cache: Optional[Dict[str, str]] = None # loaded once, invalidated on save
+
+# Metadata key written into rocm.json to record which architecture profile is active.
+# Not an environment variable — always skipped during env application but preserved in the
+# saved config so that arch-safety enforcement is consistent across restarts.
+_ARCH_KEY = "_rocm_arch"
+
+# Vars that must never appear in the process environment.
+#
+# _DTYPE_UNSAFE: alter FP16 inference dtype — must be cleared regardless of config
+# MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL — DEBUG alias: routes all FP16 convs through BF16 exponent math
+# MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL — API-level alias: same BF16-exponent effect
+# MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_EXPEREMENTAL_FP16_TRANSFORM — unstable experimental FP16 path
+# MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_PK_ATOMIC_ADD_FP16 — changes FP16 WrW atomic accumulation
+#
+# SOLVER_DISABLED_BY_DEFAULT: every solver known to be incompatible with this runtime
+# (FP32-only, training-only WrW/BWD, fixed-geometry mismatches, XDLOPS/CDNA-only, arch-specific).
+# Actively unsetting these ensures no inherited shell value can re-enable them.
+_DTYPE_UNSAFE = {
+ "MIOPEN_DEBUG_CONVOLUTION_ATTRIB_FP16_ALT_IMPL",
+ "MIOPEN_CONVOLUTION_ATTRIB_FP16_ALT_IMPL",
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_EXPEREMENTAL_FP16_TRANSFORM",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_PK_ATOMIC_ADD_FP16",
+}
+# _UNSET_VARS: hard-blocked vars that are DELETED from the process env and never written,
+# regardless of saved config. Limited to dtype-corrupting vars only.
+# IMPORTANT: SOLVER_DISABLED_BY_DEFAULT is intentionally NOT included here.
+# When a solver var is absent (unset) MIOpen still calls IsApplicable() on every
+# conv-find — wasted probing overhead. When a var is explicitly "0" MIOpen skips
+# IsApplicable() immediately. Solver defaults flow through the config loop as "0"
+# (their ROCM_ENV_VARS default is "0") so they are explicitly set to "0" in the env.
+_UNSET_VARS = _DTYPE_UNSAFE
+
+# Additional environment vars that must be removed from the process before MIOpen loads.
+# These are not MIOpen solver toggles but can corrupt MIOpen's runtime behaviour:
+# HIP_PATH / HIP_PATH_71 — point to the system AMD ROCm install; override the venv-bundled
+# _rocm_sdk_devel DLLs with a potentially mismatched system version
+# QML_*/QT_* — QtQuick shader/disk-cache flags leaked from Qt tools; harmless for
+# PyTorch but can conflict with Gradio's embedded Qt helpers
+# PYENV_VIRTUALENV_DISABLE_PROMPT — pyenv noise that confuses venv detection
+_EXTRA_CLEAR_VARS = {
+ "HIP_PATH",
+ "HIP_PATH_71",
+ "PYENV_VIRTUALENV_DISABLE_PROMPT",
+ "QML_DISABLE_DISK_CACHE",
+ "QML_FORCE_DISK_CACHE",
+ "QT_DISABLE_SHADER_DISK_CACHE",
+ # PERF_VALS vars are NOT boolean toggles — MIOpen reads them as perf-config strings.
+ # If inherited from a parent shell with value "1", MIOpen's GetPerfConfFromEnv parses
+ # "1" as a degenerate config and can return dtype=float32 output from FP16 tensors.
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_PERF_VALS",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_PERF_VALS",
+}
+
+# Solvers whose MIOpen IsApplicable() explicitly rejects non-FP32 tensors.
+# They are safe to leave enabled in FP32 mode. When the active dtype is FP16 or BF16
+# we force them OFF so MIOpen skips the IsApplicable probe entirely — avoids overhead on
+# every conv shape find. These are NOT in _UNSET_VARS because they are valid in FP32.
+_FP32_ONLY_SOLVERS = {
+ "MIOPEN_DEBUG_CONV_FFT", # FFT convolution — FP32 only (MIOpen source: IsFp32 check)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_3X3", # Winograd 3x3 — FP32 only
+ "MIOPEN_DEBUG_AMD_FUSED_WINOGRAD", # Fused Winograd — FP32 only
+}
+
+
+def _resolve_dtype() -> str:
+ """Return the resolved active compute dtype: 'FP16', 'BF16', 'FP32', or '' (not yet known).
+ Prefers the resolved devices.dtype (post test_fp16/bf16) over the raw opts string."""
+ try:
+ import torch # pylint: disable=import-outside-toplevel
+ from modules import devices as _dev # pylint: disable=import-outside-toplevel
+ if _dev.dtype is not None:
+ if _dev.dtype == torch.float16:
+ return 'FP16'
+ if _dev.dtype == torch.bfloat16:
+ return 'BF16'
+ if _dev.dtype == torch.float32:
+ return 'FP32'
+ except Exception:
+ pass
+ try:
+ from modules import shared as _sh # pylint: disable=import-outside-toplevel
+ v = getattr(getattr(_sh, 'opts', None), 'cuda_dtype', None)
+ if v in ('FP16', 'BF16', 'FP32'):
+ return v
+ except Exception:
+ pass
+ return ''
+
+
+# --- venv helpers ---
+
+def _get_venv() -> str:
+ return os.environ.get("VIRTUAL_ENV", "") or sys.prefix
+
+
+def _expand_venv(value: str) -> str:
+ return value.replace("{VIRTUAL_ENV}", _get_venv())
+
+
+def _collapse_venv(value: str) -> str:
+ venv = _get_venv()
+ if venv and value.startswith(venv):
+ return "{VIRTUAL_ENV}" + value[len(venv):]
+ return value
+
+
+# --- dropdown helpers ---
+
+def _dropdown_display(stored_val: str, options) -> str:
+ if options and isinstance(options[0], tuple):
+ return next((label for label, val in options if val == str(stored_val)), str(stored_val))
+ return str(stored_val)
+
+
+def _dropdown_stored(display_val: str, options) -> str:
+ if options and isinstance(options[0], tuple):
+ return next((val for label, val in options if label == str(display_val)), str(display_val))
+ return str(display_val)
+
+
+def _dropdown_choices(options):
+ if options and isinstance(options[0], tuple):
+ return [label for label, _ in options]
+ return options
+
+
+# --- config I/O ---
+
+def load_config() -> Dict[str, str]:
+ global _cache # pylint: disable=global-statement
+ if _cache is None:
+ file_existed = CONFIG.exists()
+ if file_existed:
+ data = readfile(str(CONFIG), lock=True, as_type="dict")
+ _cache = data if data else {k: v["default"] for k, v in ROCM_ENV_VARS.items()}
+ # Purge unsafe vars from a stale saved config and re-persist only if the file existed.
+ # When running without a saved config (first run / after Delete), load_config() must
+ # never create the file — that only happens via save_config() on Apply or Apply Profile.
+ dirty = {k for k in _cache if k in _UNSET_VARS or (k != _ARCH_KEY and k not in ROCM_ENV_VARS)}
+ if dirty:
+ _cache = {k: v for k, v in _cache.items() if k not in dirty}
+ writefile(_cache, str(CONFIG))
+ log.debug(f'ROCm load_config: purged {len(dirty)} stale/unsafe var(s) from saved config')
+ else:
+ _cache = {k: v["default"] for k, v in ROCM_ENV_VARS.items()}
+ log.debug(f'ROCm load_config: path={CONFIG} existed={file_existed} items={len(_cache)}')
+ return _cache
+
+
+def save_config(config: Dict[str, str]) -> None:
+ global _cache # pylint: disable=global-statement
+ sanitized = {k: v for k, v in config.items() if k not in _UNSET_VARS}
+ # Enforce arch-incompatible solvers to "0" before writing.
+ # Prevents malformed edits (UI or JSON hand-edit) from persisting incompatible "1" values.
+ arch = sanitized.get(_ARCH_KEY, "")
+ unavailable = rocm_profiles.UNAVAILABLE.get(arch, set())
+ for var in unavailable:
+ if var in sanitized and sanitized[var] != "0":
+ sanitized[var] = "0"
+ log.debug(f'ROCm save_config: clamped arch-incompatible var={var} arch={arch}')
+ writefile(sanitized, str(CONFIG))
+ _cache = sanitized
+
+
+def apply_env(config: Optional[Dict[str, str]] = None) -> None:
+ if config is None:
+ config = load_config()
+ for var in _UNSET_VARS | _EXTRA_CLEAR_VARS:
+ if var in os.environ:
+ del os.environ[var]
+ for var, value in config.items():
+ if var == _ARCH_KEY:
+ continue
+ if var in _UNSET_VARS:
+ continue
+ if var not in ROCM_ENV_VARS:
+ continue
+ meta = ROCM_ENV_VARS.get(var, {})
+ if meta.get("options"):
+ value = _dropdown_stored(str(value), meta["options"])
+ expanded = _expand_venv(str(value))
+ if expanded == "":
+ continue
+ os.environ[var] = expanded
+ # Arch safety net: hard-force all hardware-incompatible vars to "0" in the env.
+ # This runs *after* the config loop so it overrides any stale "1" that survived in the JSON.
+ # Source of truth: rocm_profiles.UNAVAILABLE[arch] — vars with no supporting hardware.
+ arch = config.get(_ARCH_KEY, "")
+ unavailable = rocm_profiles.UNAVAILABLE.get(arch, set())
+ if unavailable:
+ for var in unavailable:
+ os.environ[var] = "0"
+ dtype_str = _resolve_dtype()
+ if dtype_str in ('FP16', 'BF16'):
+ for var in _FP32_ONLY_SOLVERS:
+ os.environ[var] = "0"
+
+
+def apply_all(names: list, values: list) -> None:
+ config = load_config().copy()
+ arch = config.get(_ARCH_KEY, "")
+ unavailable = rocm_profiles.UNAVAILABLE.get(arch, set())
+ for name, value in zip(names, values):
+ if name not in ROCM_ENV_VARS:
+ log.warning(f'ROCm apply_all: unknown variable={name}')
+ continue
+ # Arch safety net: silently clamp incompatible solvers back to "0".
+ # The UI may send the current checkbox state even for greyed-out vars.
+ if name in unavailable:
+ config[name] = "0"
+ continue
+ meta = ROCM_ENV_VARS[name]
+ if meta["widget"] == "checkbox":
+ if value is None:
+ pass # Gradio passed None (component not interacted with) — leave config unchanged
+ else:
+ config[name] = "1" if value else "0"
+ elif meta["widget"] == "radio":
+ stored = _dropdown_stored(str(value), meta["options"])
+ valid = {v for _, v in meta["options"]} if meta["options"] and isinstance(meta["options"][0], tuple) else set(meta["options"] or [])
+ if stored in valid:
+ config[name] = stored
+ # else: value was None/invalid — leave the existing saved value untouched
+ else:
+ if meta.get("options"):
+ value = _dropdown_stored(str(value), meta["options"])
+ config[name] = _collapse_venv(str(value))
+ save_config(config)
+ apply_env(config)
+
+
+def reset_defaults() -> None:
+ defaults = {k: v["default"] for k, v in ROCM_ENV_VARS.items()}
+ # Preserve the active arch key so safety nets survive a defaults reset.
+ arch = load_config().get(_ARCH_KEY, "")
+ if arch:
+ defaults[_ARCH_KEY] = arch
+ save_config(defaults)
+ apply_env(defaults)
+ log.info(f'ROCm reset_defaults: config reset to defaults arch={arch or "(none)"}')
+
+
+def clear_env() -> None:
+ """Remove all managed ROCm vars and known noise vars from os.environ without writing to disk."""
+ cleared = 0
+ for var in ROCM_ENV_VARS:
+ if var in os.environ:
+ del os.environ[var]
+ cleared += 1
+ for var in _UNSET_VARS | _EXTRA_CLEAR_VARS:
+ if var in os.environ:
+ del os.environ[var]
+ cleared += 1
+ log.info(f'ROCm clear_env: cleared={cleared}')
+
+
+def delete_config() -> None:
+ """Delete the saved config file, clear all vars, and wipe the MIOpen user DB cache."""
+ import shutil # pylint: disable=import-outside-toplevel
+ global _cache # pylint: disable=global-statement
+ clear_env()
+ if CONFIG.exists():
+ CONFIG.unlink()
+ log.info(f'ROCm delete_config: deleted {CONFIG}')
+ _cache = None
+ # Delete the MIOpen user DB (~/.miopen/db) — stale entries can cause solver mismatches
+ miopen_db = Path(os.path.expanduser('~')) / '.miopen' / 'db'
+ if miopen_db.exists():
+ shutil.rmtree(miopen_db, ignore_errors=True)
+ log.info(f'ROCm delete_config: wiped MIOpen user DB at {miopen_db}')
+ else:
+ log.debug(f'ROCm delete_config: MIOpen user DB not found at {miopen_db} — nothing to wipe')
+
+
+def apply_profile(name: str) -> None:
+ """Merge an architecture profile on top of the current config, then save and apply."""
+ profile = rocm_profiles.PROFILES.get(name)
+ if profile is None:
+ log.warning(f'ROCm apply_profile: unknown profile={name}')
+ return
+ config = load_config().copy()
+ config.update(profile)
+ config[_ARCH_KEY] = name # stamp the active arch so safety nets survive restarts
+ save_config(config)
+ apply_env(config)
+ log.info(f'ROCm apply_profile: profile={name} overrides={len(profile)}')
+
+
+def _hip_version_from_file(db_path: Path) -> str:
+ """Parse HIP_VERSION_* keys from .hipVersion in the SDK bin folder."""
+ hip_ver_file = db_path / ".hipVersion"
+ if not hip_ver_file.exists():
+ return ""
+ kv = {}
+ for line in hip_ver_file.read_text(errors="ignore").splitlines():
+ if "=" in line and not line.startswith("#"):
+ k, _, v = line.partition("=")
+ kv[k.strip()] = v.strip()
+ major = kv.get("HIP_VERSION_MAJOR", "")
+ minor = kv.get("HIP_VERSION_MINOR", "")
+ patch = kv.get("HIP_VERSION_PATCH", "")
+ git = kv.get("HIP_VERSION_GITHASH", "")
+ if major:
+ return f"{major}.{minor}.{patch} ({git})"
+ return ""
+
+
+def _pkg_version(name: str) -> str:
+ try:
+ import importlib.metadata as _m # pylint: disable=import-outside-toplevel
+ return _m.version(name)
+ except Exception:
+ return "n/a"
+
+
+def _db_file_summary(path: Path, patterns: list) -> dict:
+ """Return {filename: 'N KB'} for files matching any of the given glob patterns."""
+ out = {}
+ for pat in patterns:
+ for f in sorted(path.glob(pat)):
+ kb = f.stat().st_size // 1024
+ out[f.name] = f"{kb} KB"
+ return out
+
+
+def _user_db_summary(path: Path) -> dict:
+ """Return {filename: 'N KB, M entries'} for user MIOpen DB txt files."""
+ out = {}
+ for pat in ("*.udb.txt", "*.ufdb.txt"):
+ for f in sorted(path.glob(pat)):
+ kb = f.stat().st_size // 1024
+ try:
+ lines = sum(1 for _ in f.open(errors="ignore"))
+ except Exception:
+ lines = 0
+ out[f.name] = f"{kb} KB, {lines} entries"
+ return out
+
+
+def info() -> dict:
+ config = load_config()
+ db_path = Path(_expand_venv(config.get("MIOPEN_SYSTEM_DB_PATH", "")))
+
+ # --- ROCm / HIP package versions ---
+ rocm_pkgs = {}
+ for pkg in ("rocm", "rocm-sdk-core", "rocm-sdk-devel"):
+ v = _pkg_version(pkg)
+ if v != "n/a":
+ rocm_pkgs[pkg] = v
+ libs_pkg = _pkg_version("rocm-sdk-libraries-gfx103x-dgpu")
+ if libs_pkg != "n/a":
+ rocm_pkgs["rocm-sdk-libraries (gfx103x)"] = libs_pkg
+
+ hip_ver = _hip_version_from_file(db_path)
+ if not hip_ver:
+ try:
+ import torch # pylint: disable=import-outside-toplevel
+ hip_ver = getattr(torch.version, "hip", "") or ""
+ except Exception:
+ pass
+
+ rocm_section = {}
+ if hip_ver:
+ rocm_section["hip_version"] = hip_ver
+ rocm_section.update(rocm_pkgs)
+
+ # --- Torch ---
+ torch_section = {}
+ try:
+ import torch # pylint: disable=import-outside-toplevel
+ torch_section["version"] = torch.__version__
+ torch_section["hip"] = getattr(torch.version, "hip", None) or "n/a"
+ except Exception:
+ pass
+
+ # --- GPU ---
+ gpu_section = [dict(g) for g in installer.gpu_info]
+
+ # --- System DB ---
+ sdb = {"path": str(db_path)}
+ if db_path.exists():
+ solver_db = _db_file_summary(db_path, ["*.db.txt"])
+ find_db = _db_file_summary(db_path, ["*.HIP.fdb.txt", "*.fdb.txt"])
+ kernel_db = _db_file_summary(db_path, ["*.kdb"])
+ if solver_db:
+ sdb["solver_db"] = solver_db
+ if find_db:
+ sdb["find_db"] = find_db
+ if kernel_db:
+ sdb["kernel_db"] = kernel_db
+ else:
+ sdb["exists"] = False
+
+ # --- User DB (~/.miopen/db) ---
+ user_db_path = Path.home() / ".miopen" / "db"
+ udb = {"path": str(user_db_path), "exists": user_db_path.exists()}
+ if user_db_path.exists():
+ ufiles = _user_db_summary(user_db_path)
+ if ufiles:
+ udb["files"] = ufiles
+
+ return {
+ "rocm": rocm_section,
+ "torch": torch_section,
+ "gpu": gpu_section,
+ "system_db": sdb,
+ "user_db": udb,
+ }
+
+
+# Apply saved config to os.environ at import time (only when ROCm is present)
+if is_rocm:
+ try:
+ apply_env()
+ except Exception as _e:
+ print(f"[rocm_mgr] Warning: failed to apply env at import: {_e}", file=sys.stderr)
+else:
+ log.debug('ROCm is not installed — skipping rocm_mgr env apply')
diff --git a/scripts/rocm/rocm_profiles.py b/scripts/rocm/rocm_profiles.py
new file mode 100644
index 000000000..eeba0628e
--- /dev/null
+++ b/scripts/rocm/rocm_profiles.py
@@ -0,0 +1,253 @@
+"""
+Architecture-specific MIOpen solver profiles for AMD GCN/RDNA GPUs.
+
+Sources:
+ https://rocm.docs.amd.com/projects/MIOpen/en/develop/reference/env_variables.html
+
+Key axis: consumer RDNA GPUs have NO XDLOPS hardware (that's CDNA/Instinct only).
+ RDNA2 (gfx1030): RX 6000 series
+ RDNA3 (gfx1100): RX 7000 series — adds Fury Winograd, wider MPASS
+ RDNA4 (gfx1200): RX 9000 series — adds Rage Winograd, wider MPASS
+
+Each profile is a dict of {var: value} that will be MERGED on top of the
+current config (general vars like DB path / log level are preserved).
+"""
+
+from typing import Dict
+
+# ---------------------------------------------------------------------------
+# Shared: everything that must be OFF on ALL consumer RDNA (no XDLOPS hw)
+# ---------------------------------------------------------------------------
+_XDLOPS_OFF: Dict[str, str] = {
+ # GTC XDLOPS (CDNA-only)
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_BWD_GTC_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_WRW_GTC_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_XDLOPS_NHWC": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_BWD_GTC_XDLOPS_NHWC": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_WRW_GTC_XDLOPS_NHWC": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_GTC_DLOPS_NCHWC": "0",
+ # HIP XDLOPS variants (CDNA-only)
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R5_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_V1R1_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_V4R1_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_WRW_V4R4_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4_PADDED_GEMM_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_WRW_V4R4_PADDED_GEMM_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_XDLOPS_EMULATE": "0",
+ "MIOPEN_DEBUG_IMPLICIT_GEMM_XDLOPS_INLINE_ASM": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_GROUP_BWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_BWD_XDLOPS_AI_HEUR": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_FWD_V4R4_XDLOPS_ADD_VECTOR_LOAD_GEMMN_TUNE_PARAM": "0",
+ # 3D XDLOPS (CDNA-only; no 3D conv XDLOPS on consumer RDNA)
+ "MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_BWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_3D_CONV_IMPLICIT_GEMM_HIP_WRW_XDLOPS": "0",
+ # Composable Kernel (requires XDLOPS / CDNA)
+ "MIOPEN_DEBUG_CONV_CK_IGEMM_FWD_V6R1_DLOPS_NCHW": "0",
+ "MIOPEN_DEBUG_CONV_CK_IGEMM_FWD_BIAS_ACTIV": "0",
+ "MIOPEN_DEBUG_CONV_CK_IGEMM_FWD_BIAS_RES_ADD_ACTIV": "0",
+ # MLIR (CDNA-only in practice)
+ "MIOPEN_DEBUG_CONV_MLIR_IGEMM_WRW_XDLOPS": "0",
+ "MIOPEN_DEBUG_CONV_MLIR_IGEMM_BWD_XDLOPS": "0",
+ # MP BD Winograd (Multi-pass Block-Decomposed — CDNA / high-end only)
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_F2X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_F3X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_F4X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_F5X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_WINOGRAD_F6X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_XDLOPS_WINOGRAD_F2X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_XDLOPS_WINOGRAD_F3X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_XDLOPS_WINOGRAD_F4X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_XDLOPS_WINOGRAD_F5X3": "0",
+ "MIOPEN_DEBUG_AMD_MP_BD_XDLOPS_WINOGRAD_F6X3": "0",
+}
+
+# ---------------------------------------------------------------------------
+# RDNA2 — gfx1030 (RX 6000 series)
+# No XDLOPS, no Fury/Rage Winograd, MPASS limited to F3x2/F3x3
+# ASM IGEMM: V4R1 variants only; HIP IGEMM: non-XDLOPS V4R1/R4 only
+# ---------------------------------------------------------------------------
+RDNA2: Dict[str, str] = {
+ **_XDLOPS_OFF,
+ # General settings (architecture-independent; set here so all profiles cover them)
+ "MIOPEN_SEARCH_CUTOFF": "0",
+ "MIOPEN_DEBUG_CONVOLUTION_DETERMINISTIC": "0",
+ # Core algo enables — FFT is FP32-only but harmless (IsApplicable rejects it for fp16 tensors)
+ "MIOPEN_DEBUG_CONV_FFT": "1",
+ "MIOPEN_DEBUG_CONV_DIRECT": "1",
+ "MIOPEN_DEBUG_CONV_GEMM": "1",
+ "MIOPEN_DEBUG_CONV_WINOGRAD": "1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM": "1",
+ "MIOPEN_DEBUG_CONV_IMMED_FALLBACK": "1",
+ "MIOPEN_DEBUG_ENABLE_AI_IMMED_MODE_FALLBACK": "1",
+ "MIOPEN_DEBUG_FORCE_IMMED_MODE_FALLBACK": "0",
+ # Kernel backends
+ "MIOPEN_DEBUG_GCN_ASM_KERNELS": "1",
+ "MIOPEN_DEBUG_HIP_KERNELS": "1",
+ "MIOPEN_DEBUG_OPENCL_CONVOLUTIONS": "1",
+ "MIOPEN_DEBUG_OPENCL_WAVE64_NOWGP": "1",
+ "MIOPEN_DEBUG_ATTN_SOFTMAX": "1",
+ # Direct ASM — dtype notes
+ # 3X3U / 1X1U / 1X1UV2: FP32/FP16 forward — enabled
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_3X3U": "1",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U": "1",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1UV2": "1",
+ # 5X10U2V2: fixed geometry (5*10 stride-2), no SD conv matches — disabled
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_5X10U2V2": "0",
+ # 7X7C3H224W224: hard-coded ImageNet stem (C=3, H=W=224, K=64) — never matches SD — disabled
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_7X7C3H224W224": "0",
+ # WRW3X3 / WRW1X1: FP32-only weight-gradient (training only) — disabled for inference
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_WRW3X3": "0",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_WRW1X1": "0",
+ # PERF_VALS intentionally blank: MIOpen reads this as a config string not a boolean;
+ # setting to "1" causes GetPerfConfFromEnv to use a degenerate config and return float32
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_PERF_VALS": "",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_SEARCH_OPTIMIZED": "1",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_AI_HEUR": "1",
+ # NAIVE_CONV_FWD: scalar FP32 reference solver — IsApplicable does NOT reliably filter for FP16;
+ # can be selected for unusual shapes (e.g. VAE decoder 3-ch output) and returns dtype=float32
+ "MIOPEN_DEBUG_CONV_DIRECT_NAIVE_CONV_FWD": "0",
+ # Direct OCL — dtype notes
+ # FWD / FWD1X1: FP32/FP16 forward — enabled
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD": "1",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD1X1": "1",
+ # FWD11X11: requires 11*11 kernel — no SD match — disabled
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD11X11": "0",
+ # FWDGEN: FP32 generic OCL fallback — IsApplicable does NOT reliably reject for FP16;
+ # can produce dtype=float32 output for FP16 inputs — disabled
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWDGEN": "0",
+ # WRW2 / WRW53 / WRW1X1: training-only weight-gradient — disabled
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW2": "0",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW53": "0",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_WRW1X1": "0",
+ # Winograd RxS — dtype per MIOpen docs
+ # WINOGRAD_3X3: FP32-only — harmless (IsApplicable rejects for fp16); enabled
+ "MIOPEN_DEBUG_AMD_WINOGRAD_3X3": "1",
+ # RXS: covers FP32/FP16 F(3,3) Fwd/Bwd + FP32 F(3,2) WrW — keep enabled (fp16 fwd/bwd path exists)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS": "1",
+ # RXS_FWD_BWD: FP32/FP16 — explicitly the fp16-capable subset
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_FWD_BWD": "1",
+ # RXS_WRW: FP32 WrW only — training-only, disabled for inference fp16 profile
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_WRW": "0",
+ # RXS_F3X2: FP32/FP16 Fwd/Bwd
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F3X2": "1",
+ # RXS_F2X3: FP32/FP16 Fwd/Bwd (group convolutions)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3": "1",
+ # RXS_F2X3_G1: FP32/FP16 Fwd/Bwd (non-group convolutions)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_G1": "1",
+ # FUSED_WINOGRAD: FP32-only — harmless (IsApplicable rejects for fp16); enabled
+ "MIOPEN_DEBUG_AMD_FUSED_WINOGRAD": "1",
+ # PERF_VALS intentionally blank: same reason as ASM_1X1U — not a boolean, config string
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_PERF_VALS": "",
+ # Fury/Rage Winograd — NOT available on RDNA2
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3": "0",
+ # MPASS — only F3x2 and F3x3 are safe on RDNA2
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X2": "1",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X3": "1",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X4": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X5": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X6": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X3": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X4": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X2": "0",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X3": "0",
+ # ASM Implicit GEMM — forward V4R1 only; no GTC/XDLOPS on RDNA2
+ # BWD (backward data-gradient) and WrW (weight-gradient) are training-only — disabled
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1": "1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1_1X1": "1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_BWD_V4R1": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_WRW_V4R1": "0",
+ # HIP Implicit GEMM — non-XDLOPS V4R1/R4 forward only
+ # BWD (backward data-gradient) and WrW (weight-gradient) are training-only — disabled
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R1": "1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4": "1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_V1R1": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_BWD_V4R1": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_WRW_V4R1": "0",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_WRW_V4R4": "0",
+ # Group Conv XDLOPS / CK default kernels — RDNA3/4 only, not available on RDNA2
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "0",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR": "0",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS": "0",
+}
+
+# ---------------------------------------------------------------------------
+# RDNA3 — gfx1100 (RX 7000 series)
+# Fury Winograd added; MPASS F3x4 enabled; Group Conv XDLOPS + CK default kernels enabled
+# ---------------------------------------------------------------------------
+RDNA3: Dict[str, str] = {
+ **RDNA2,
+ # Fury Winograd — introduced for gfx1100 (RDNA3)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3": "1",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2": "1",
+ # Wider MPASS on RDNA3
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X4": "1",
+ # Group Conv XDLOPS / CK — available from gfx1100 (RDNA3) onwards
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "1",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR": "1",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS": "1",
+}
+
+# ---------------------------------------------------------------------------
+# RDNA4 — gfx1200 (RX 9000 series)
+# Rage Winograd added; MPASS F3x5 enabled
+# ---------------------------------------------------------------------------
+RDNA4: Dict[str, str] = {
+ **RDNA3,
+ # Rage Winograd — introduced for gfx1200 (RDNA4)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3": "1",
+ # Wider MPASS on RDNA4
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X5": "1",
+}
+
+PROFILES: Dict[str, Dict[str, str]] = {
+ "RDNA2": RDNA2,
+ "RDNA3": RDNA3,
+ "RDNA4": RDNA4,
+}
+
+# Vars that are architecturally unavailable (no supporting hardware) per arch.
+# These will be visually marked in the UI with strikethrough.
+_UNAVAILABLE_ALL_RDNA = set(_XDLOPS_OFF.keys())
+
+UNAVAILABLE: Dict[str, set] = {
+ "RDNA2": _UNAVAILABLE_ALL_RDNA | {
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X4",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X5",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X6",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X4",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X3",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS",
+ },
+ "RDNA3": _UNAVAILABLE_ALL_RDNA | {
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X5",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X6",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X4",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X3",
+ },
+ "RDNA4": _UNAVAILABLE_ALL_RDNA | {
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X6",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F5X4",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F7X3",
+ },
+}
diff --git a/scripts/rocm/rocm_vars.py b/scripts/rocm/rocm_vars.py
new file mode 100644
index 000000000..ac1e720c6
--- /dev/null
+++ b/scripts/rocm/rocm_vars.py
@@ -0,0 +1,253 @@
+from typing import Dict, Any, List, Tuple
+
+# --- General MIOpen/rocBLAS variables (dropdown/textbox/checkbox) ---
+GENERAL_VARS: Dict[str, Dict[str, Any]] = {
+
+ "MIOPEN_GEMM_ENFORCE_BACKEND": {
+ "default": "1",
+ "desc": "Enforce GEMM backend",
+ "widget": "dropdown",
+ "options": [("1 - rocBLAS", "1"), ("5 - hipBLASLt", "5")],
+ "restart_required": False,
+ },
+ "MIOPEN_FIND_MODE": {
+ "default": "2",
+ "desc": "MIOpen Find Mode",
+ "widget": "dropdown",
+ "options": [("1 - NORMAL", "1"), ("2 - FAST", "2"), ("3 - HYBRID", "3"), ("5 - DYNAMIC_HYBRID", "5"), ("6 - TRUST_VERIFY", "6"), ("7 - TRUST_VERIFY_FULL", "7")],
+ "restart_required": True,
+ },
+ "MIOPEN_FIND_ENFORCE": {
+ "default": "1",
+ "desc": "MIOpen Find Enforce",
+ "widget": "dropdown",
+ "options": [("1 - NONE", "1"), ("2 - DB_UPDATE", "2"), ("3 - SEARCH", "3"), ("4 - SEARCH_DB_UPDATE", "4"), ("5 - DB_CLEAN", "5")],
+ "restart_required": True,
+ },
+ "MIOPEN_SEARCH_CUTOFF": {
+ "default": "0",
+ "desc": "Enable early termination of suboptimal searches",
+ "widget": "dropdown",
+ "options": [("0 - Off", "0"), ("1 - On", "1")],
+ "restart_required": True,
+ },
+ "MIOPEN_SYSTEM_DB_PATH": {
+ "default": "{VIRTUAL_ENV}\\Lib\\site-packages\\_rocm_sdk_devel\\bin\\",
+ "desc": "MIOpen system DB path",
+ "widget": "textbox",
+ "options": None,
+ "restart_required": True,
+ },
+ "MIOPEN_LOG_LEVEL": {
+ "default": "0",
+ "desc": "MIOpen log verbosity level",
+ "widget": "dropdown",
+ "options": [("0 - Default", "0"), ("1 - Quiet", "1"), ("3 - Error", "3"), ("4 - Warning", "4"), ("5 - Info", "5"), ("6 - Detail", "6"), ("7 - Trace", "7")],
+ "restart_required": False,
+ },
+ "MIOPEN_DEBUG_ENABLE": {
+ "default": "0",
+ "desc": "Enable MIOpen logging",
+ "widget": "dropdown",
+ "options": [("0 - Off", "0"), ("1 - On", "1")],
+ "restart_required": False,
+ },
+ "ROCBLAS_LAYER": {
+ "default": "0",
+ "desc": "rocBLAS logging",
+ "widget": "dropdown",
+ "options": [("0 - Off", "0"), ("1 - Trace", "1"), ("2 - Bench", "2"), ("3 - Trace+Bench", "3"), ("4 - Profile", "4"), ("5 - Trace+Profile", "5"), ("6 - Bench+Profile", "6"), ("7 - All", "7")],
+ "restart_required": False,
+ },
+ "HIPBLASLT_LOG_LEVEL": {
+ "default": "0",
+ "desc": "hipBLASLt logging",
+ "widget": "dropdown",
+ "options": [("0 - Off", "0"), ("1 - Error", "1"), ("2 - Trace", "2"), ("3 - Hints", "3"), ("4 - Info", "4"), ("5 - API Trace", "5")],
+ "restart_required": False,
+ },
+ "MIOPEN_DEBUG_CONVOLUTION_DETERMINISTIC": {
+ "default": "0",
+ "desc": "Deterministic convolution (reproducible results, may be slower)",
+ "widget": "dropdown",
+ "options": [("0 - Off", "0"), ("1 - On", "1")],
+ "restart_required": False,
+ },
+}
+
+# --- Solver toggles (inference/FWD only, RDNA2/3/4 compatible) ---
+# Removed entirely — not representable in the UI, cannot be set by users:
+# WRW (weight-gradient) and BWD (data-gradient) — training passes only, never run during inference
+# XDLOPS/CK CDNA-exclusive (MI100/MI200/MI300 matrix engine variants) — not on any RDNA
+# Fixed-geometry (5x10, 7x7-ImageNet, 11x11) — shapes never appear in SD/video inference
+# FP32-reference (NAIVE_CONV_FWD, FWDGEN) — IsApplicable() unreliable for FP16/BF16
+# Wide MPASS (F3x4..F7x3) — kernel sizes that cannot match any SD convolution shape
+# Disabled by default (added but off): RDNA3/4-only — Group Conv XDLOPS, CK default kernels
+_SOLVER_DESCS: Dict[str, str] = {}
+
+_SOLVER_DESCS.update({
+ "MIOPEN_DEBUG_CONV_FFT": "Enable FFT solver",
+ "MIOPEN_DEBUG_CONV_DIRECT": "Enable Direct solver",
+ "MIOPEN_DEBUG_CONV_GEMM": "Enable GEMM solver",
+ "MIOPEN_DEBUG_CONV_WINOGRAD": "Enable Winograd solver",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM": "Enable Implicit GEMM solver",
+})
+_SOLVER_DESCS.update({
+ "MIOPEN_DEBUG_CONV_IMMED_FALLBACK": "Enable Immediate Fallback",
+ "MIOPEN_DEBUG_ENABLE_AI_IMMED_MODE_FALLBACK": "Enable AI Immediate Mode Fallback",
+ "MIOPEN_DEBUG_FORCE_IMMED_MODE_FALLBACK": "Force Immediate Mode Fallback",
+})
+_SOLVER_DESCS.update({
+ "MIOPEN_DEBUG_GCN_ASM_KERNELS": "Enable GCN ASM kernels",
+ "MIOPEN_DEBUG_HIP_KERNELS": "Enable HIP kernels",
+ "MIOPEN_DEBUG_OPENCL_CONVOLUTIONS": "Enable OpenCL convolutions",
+ "MIOPEN_DEBUG_OPENCL_WAVE64_NOWGP": "Enable OpenCL Wave64 NOWGP",
+ "MIOPEN_DEBUG_ATTN_SOFTMAX": "Enable Attention Softmax",
+})
+_SOLVER_DESCS.update({
+ # Direct ASM — FWD inference only (WRW, fixed-geometry, FP32-reference removed)
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_3X3U": "Enable Direct ASM 3x3U",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U": "Enable Direct ASM 1x1U",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1UV2": "Enable Direct ASM 1x1UV2",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_SEARCH_OPTIMIZED": "Enable Direct ASM 1x1U Search Optimized",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_AI_HEUR": "Enable Direct ASM 1x1U AI Heuristic",
+})
+_SOLVER_DESCS.update({
+ # Direct OCL — FWD inference only (WRW, FWD11X11 fixed-geom, FWDGEN FP32-ref removed)
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD": "Enable Direct OCL FWD",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD1X1": "Enable Direct OCL FWD1X1",
+})
+_SOLVER_DESCS.update({
+ # Winograd FWD — WRW removed; Fury/Rage kept as RDNA3/4 inference (off by default)
+ "MIOPEN_DEBUG_AMD_WINOGRAD_3X3": "Enable AMD Winograd 3x3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS": "Enable AMD Winograd RxS",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_FWD_BWD": "Enable AMD Winograd RxS FWD",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F3X2": "Enable AMD Winograd RxS F3x2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3": "Enable AMD Winograd RxS F2x3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_G1": "Enable AMD Winograd RxS F2x3 G1",
+ "MIOPEN_DEBUG_AMD_FUSED_WINOGRAD": "Enable AMD Fused Winograd",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3": "Enable AMD Winograd Fury RxS F2x3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2": "Enable AMD Winograd Fury RxS F3x2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3": "Enable AMD Winograd Rage RxS F2x3",
+})
+_SOLVER_DESCS.update({
+ # Multi-pass Winograd — only F3x2/F3x3 match typical 3x3 SD shapes; wider kernels removed
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X2": "Enable AMD Winograd MPASS F3x2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X3": "Enable AMD Winograd MPASS F3x3",
+})
+_SOLVER_DESCS.update({
+ # Implicit GEMM FWD — BWD/WRW (training), CDNA-exclusive XDLOPS variants removed
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1": "Enable ASM Implicit GEMM FWD V4R1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1_1X1": "Enable ASM Implicit GEMM FWD V4R1 1x1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R1": "Enable HIP Implicit GEMM FWD V4R1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4": "Enable HIP Implicit GEMM FWD V4R4",
+})
+_SOLVER_DESCS.update({
+ # Group Conv XDLOPS FWD — RDNA3/4 (gfx1100+) only; disabled by default
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "Enable Group Conv Implicit GEMM XDLOPS FWD",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR": "Enable Group Conv Implicit GEMM XDLOPS FWD AI Heuristic",
+ # CK (Composable Kernel) default kernels — RDNA3/4 (gfx1100+); disabled by default
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS": "Enable CK (Composable Kernel) default kernels",
+})
+
+
+# Solvers still in the registry but disabled by default.
+# FORCE_IMMED_MODE_FALLBACK — overrides FIND_MODE entirely, defeats tuning DB
+# Fury RxS F2x3/F3x2 — RDNA3/4-only; harmless on RDNA2 but won't select
+# Rage RxS F2x3 — RDNA4-only
+# Group Conv XDLOPS — RDNA3/4-only (gfx1100+)
+# CK_DEFAULT_KERNELS — RDNA3/4-only (gfx1100+)
+SOLVER_DISABLED_BY_DEFAULT = {
+ "MIOPEN_DEBUG_FORCE_IMMED_MODE_FALLBACK",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS",
+}
+
+SOLVER_DTYPE_TAGS: Dict[str, str] = {
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_3X3U": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1UV2": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD1X1": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_3X3": "FP32",
+ "MIOPEN_DEBUG_AMD_FUSED_WINOGRAD": "FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_FWD_BWD": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F3X2": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_G1": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X2": "FP16/FP32",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X3": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1_1X1": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R1": "FP16/FP32",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4": "FP16/FP32",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS": "FP16/BF16",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR": "FP16/BF16",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS": "FP16/BF16/FP32",
+}
+
+# Build full merged var registry
+ROCM_ENV_VARS: Dict[str, Dict[str, Any]] = {}
+ROCM_ENV_VARS.update(GENERAL_VARS)
+for _var, _desc in _SOLVER_DESCS.items():
+ ROCM_ENV_VARS[_var] = {
+ "default": "0" if _var in SOLVER_DISABLED_BY_DEFAULT else "1",
+ "desc": _desc,
+ "widget": "checkbox",
+ "options": None,
+ "dtype": SOLVER_DTYPE_TAGS.get(_var),
+ "restart_required": False,
+ }
+
+# UI group ordering for solver sections
+SOLVER_GROUPS: List[Tuple[str, List[str]]] = [
+ ("Algorithm/Solver Group Enables", [
+ "MIOPEN_DEBUG_CONV_FFT", "MIOPEN_DEBUG_CONV_DIRECT", "MIOPEN_DEBUG_CONV_GEMM",
+ "MIOPEN_DEBUG_CONV_WINOGRAD", "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM",
+ ]),
+ ("Immediate Fallback Mode", [
+ "MIOPEN_DEBUG_CONV_IMMED_FALLBACK", "MIOPEN_DEBUG_ENABLE_AI_IMMED_MODE_FALLBACK",
+ "MIOPEN_DEBUG_FORCE_IMMED_MODE_FALLBACK",
+ ]),
+ ("Build Method Toggles", [
+ "MIOPEN_DEBUG_GCN_ASM_KERNELS", "MIOPEN_DEBUG_HIP_KERNELS",
+ "MIOPEN_DEBUG_OPENCL_CONVOLUTIONS", "MIOPEN_DEBUG_OPENCL_WAVE64_NOWGP",
+ "MIOPEN_DEBUG_ATTN_SOFTMAX",
+ ]),
+ ("Direct ASM Solver Toggles", [
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_3X3U", "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1UV2",
+ "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_SEARCH_OPTIMIZED", "MIOPEN_DEBUG_CONV_DIRECT_ASM_1X1U_AI_HEUR",
+ ]),
+ ("Direct OpenCL Solver Toggles", [
+ "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD", "MIOPEN_DEBUG_CONV_DIRECT_OCL_FWD1X1",
+ ]),
+ ("Winograd Solver Toggles", [
+ "MIOPEN_DEBUG_AMD_WINOGRAD_3X3", "MIOPEN_DEBUG_AMD_WINOGRAD_RXS",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_FWD_BWD",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F3X2", "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_RXS_F2X3_G1", "MIOPEN_DEBUG_AMD_FUSED_WINOGRAD",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F2X3",
+ "MIOPEN_DEBUG_AMD_WINOGRAD_FURY_RXS_F3X2", "MIOPEN_DEBUG_AMD_WINOGRAD_RAGE_RXS_F2X3",
+ ]),
+ ("Multi-pass Winograd Toggles", [
+ "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X2", "MIOPEN_DEBUG_AMD_WINOGRAD_MPASS_F3X3",
+ ]),
+ ("Implicit GEMM Toggles", [
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1", "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_ASM_FWD_V4R1_1X1",
+ "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R1", "MIOPEN_DEBUG_CONV_IMPLICIT_GEMM_HIP_FWD_V4R4",
+ ]),
+ ("Group Conv / CK Toggles (RDNA3/4+)", [
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS",
+ "MIOPEN_DEBUG_GROUP_CONV_IMPLICIT_GEMM_HIP_FWD_XDLOPS_AI_HEUR",
+ "MIOPEN_DEBUG_CK_DEFAULT_KERNELS",
+ ]),
+]
diff --git a/scripts/rocm_ext.py b/scripts/rocm_ext.py
new file mode 100644
index 000000000..6563387ce
--- /dev/null
+++ b/scripts/rocm_ext.py
@@ -0,0 +1,203 @@
+import gradio as gr
+import installer
+from modules import scripts_manager, shared
+
+# rocm_mgr exposes package-internal helpers (prefixed _) that are intentionally called here
+# pylint: disable=protected-access
+
+
+class Script(scripts_manager.Script):
+ def title(self):
+ return "ROCm: Advanced Config"
+
+ def show(self, _is_img2img):
+ if shared.cmd_opts.use_rocm or installer.torch_info.get('type') == 'rocm':
+ return scripts_manager.AlwaysVisible # script should be visible only if rocm is detected or forced
+ return False
+
+ def ui(self, _is_img2img):
+ if not shared.cmd_opts.use_rocm and not installer.torch_info.get('type') == 'rocm': # skip ui creation if not rocm
+ return []
+
+ from scripts.rocm import rocm_mgr, rocm_vars # pylint: disable=no-name-in-module
+
+ config = rocm_mgr.load_config()
+ var_names = []
+ components = []
+
+ def _make_component(name, meta, cfg):
+ val = cfg.get(name, meta["default"])
+ widget = meta["widget"]
+ if widget == "checkbox":
+ dtype_tag = meta.get("dtype")
+ label = f"[{dtype_tag}] {meta['desc']}" if dtype_tag else meta["desc"]
+ return gr.Checkbox(label=label, value=(val == "1"), elem_id=f"rocm_var_{name.lower()}")
+ if widget == "dropdown":
+ choices = rocm_mgr._dropdown_choices(meta["options"])
+ display = rocm_mgr._dropdown_display(val, meta["options"])
+ return gr.Dropdown(label=meta["desc"], choices=choices, value=display, elem_id=f"rocm_var_{name.lower()}")
+ return gr.Textbox(label=meta["desc"], value=rocm_mgr._expand_venv(val), lines=1)
+
+ def _info_html():
+ d = rocm_mgr.info()
+ rows = []
+ def section(title):
+ rows.append(f"{title} ")
+ def row(k, v):
+ rows.append(f"{k} {v} ")
+ section("ROCm / HIP")
+ for k, v in d.get("rocm", {}).items():
+ row(k, v)
+ section("System DB")
+ sdb = d.get("system_db", {})
+ row("path", sdb.get("path", ""))
+ for sub in ("solver_db", "find_db", "kernel_db"):
+ for fname, sz in sdb.get(sub, {}).items():
+ row(sub.replace("_", " "), f"{fname} {sz}")
+ section("User DB (~/.miopen/db)")
+ udb = d.get("user_db", {})
+ row("path", udb.get("path", ""))
+ for fname, finfo in udb.get("files", {}).items():
+ row(fname, finfo)
+ return f""
+
+ with gr.Accordion('ROCm: Advanced Config', open=False, elem_id='rocm_config'):
+ with gr.Row():
+ gr.HTML("Advanced configuration for ROCm users.
Set your database and solver selections based on GPU profile or individually.
Enable cuDNN in Backend Settings to activate MIOpen.
")
+ with gr.Row():
+ btn_info = gr.Button("Refresh Info", variant="primary", elem_id="rocm_btn_info", size="sm")
+ btn_apply = gr.Button("Apply", variant="primary", elem_id="rocm_btn_apply", size="sm")
+ btn_reset = gr.Button("Defaults", elem_id="rocm_btn_reset", size="sm")
+ btn_clear = gr.Button("Clear Run Vars", elem_id="rocm_btn_clear", size="sm")
+ btn_delete = gr.Button("Delete UserDb", variant="stop", elem_id="rocm_btn_delete", size="sm")
+ with gr.Row():
+ btn_rdna2 = gr.Button("RDNA2 (RX 6000)", elem_id="rocm_btn_rdna2")
+ btn_rdna3 = gr.Button("RDNA3 (RX 7000)", elem_id="rocm_btn_rdna3")
+ btn_rdna4 = gr.Button("RDNA4 (RX 9000)", elem_id="rocm_btn_rdna4")
+ style_out = gr.HTML("")
+ info_out = gr.HTML(value=_info_html, elem_id="rocm_info_table")
+
+ # General vars (dropdowns, textboxes, checkboxes)
+ with gr.Group():
+ gr.HTML("MIOpen Settings ")
+ for name, meta in rocm_vars.GENERAL_VARS.items():
+ comp = _make_component(name, meta, config)
+ var_names.append(name)
+ components.append(comp)
+
+ # Solver groups (all checkboxes, grouped by section)
+ for group_name, varlist in rocm_vars.SOLVER_GROUPS:
+ with gr.Group():
+ gr.HTML(f"{group_name} ")
+ for name in varlist:
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ comp = _make_component(name, meta, config)
+ var_names.append(name)
+ components.append(comp)
+ gr.HTML(" ")
+
+ def _autosave_field(name, value):
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ stored = rocm_mgr._dropdown_stored(str(value), meta["options"])
+ cfg = rocm_mgr.load_config()
+ cfg[name] = stored
+ rocm_mgr.save_config(cfg)
+ rocm_mgr.apply_env(cfg)
+
+ for name, comp in zip(var_names, components):
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ if meta["widget"] == "dropdown":
+ comp.change(fn=lambda v, n=name: _autosave_field(n, v), inputs=[comp], outputs=[], show_progress='hidden')
+
+ def apply_fn(*values):
+ rocm_mgr.apply_all(var_names, list(values))
+ saved = rocm_mgr.load_config()
+ result = [gr.update(value="")]
+ for name in var_names:
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ val = saved.get(name, meta["default"])
+ if meta["widget"] == "checkbox":
+ result.append(gr.update(value=val == "1"))
+ elif meta["widget"] == "dropdown":
+ result.append(gr.update(value=rocm_mgr._dropdown_display(val, meta["options"])))
+ else:
+ result.append(gr.update(value=rocm_mgr._expand_venv(val)))
+ return result
+
+ def _build_style(unavailable):
+ if not unavailable:
+ return ""
+ rules = " ".join(
+ f"#rocm_var_{v.lower()} label {{ text-decoration: line-through; opacity: 0.5; }}"
+ for v in unavailable
+ )
+ return f""
+
+ def reset_fn():
+ rocm_mgr.reset_defaults()
+ updated = rocm_mgr.load_config()
+ result = [gr.update(value="")]
+ for name in var_names:
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ val = updated.get(name, meta["default"])
+ if meta["widget"] == "checkbox":
+ result.append(gr.update(value=val == "1"))
+ elif meta["widget"] == "dropdown":
+ result.append(gr.update(value=rocm_mgr._dropdown_display(val, meta["options"])))
+ else:
+ result.append(gr.update(value=rocm_mgr._expand_venv(val)))
+ return result
+
+ def clear_fn():
+ rocm_mgr.clear_env()
+ result = [gr.update(value="")]
+ for name in var_names:
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ if meta["widget"] == "checkbox":
+ result.append(gr.update(value=False))
+ elif meta["widget"] == "dropdown":
+ result.append(gr.update(value=rocm_mgr._dropdown_display(meta["default"], meta["options"])))
+ else:
+ result.append(gr.update(value=""))
+ return result
+
+ def delete_fn():
+ rocm_mgr.delete_config()
+ result = [gr.update(value="")]
+ for name in var_names:
+ meta = rocm_vars.ROCM_ENV_VARS[name]
+ if meta["widget"] == "checkbox":
+ result.append(gr.update(value=False))
+ elif meta["widget"] == "dropdown":
+ result.append(gr.update(value=rocm_mgr._dropdown_display(meta["default"], meta["options"])))
+ else:
+ result.append(gr.update(value=""))
+ return result
+
+ def profile_fn(arch):
+ from scripts.rocm import rocm_profiles # pylint: disable=no-name-in-module
+ rocm_mgr.apply_profile(arch)
+ updated = rocm_mgr.load_config()
+ unavailable = rocm_profiles.UNAVAILABLE.get(arch, set())
+ result = [gr.update(value=_build_style(unavailable))]
+ for pname in var_names:
+ meta = rocm_vars.ROCM_ENV_VARS[pname]
+ val = updated.get(pname, meta["default"])
+ if meta["widget"] == "checkbox":
+ result.append(gr.update(value=val == "1"))
+ elif meta["widget"] == "dropdown":
+ result.append(gr.update(value=rocm_mgr._dropdown_display(val, meta["options"])))
+ else:
+ result.append(gr.update(value=rocm_mgr._expand_venv(val)))
+ return result
+
+ btn_info.click(fn=_info_html, inputs=[], outputs=[info_out], show_progress='hidden')
+ btn_apply.click(fn=apply_fn, inputs=components, outputs=[style_out] + components, show_progress='hidden')
+ btn_reset.click(fn=reset_fn, inputs=[], outputs=[style_out] + components, show_progress='hidden')
+ btn_clear.click(fn=clear_fn, inputs=[], outputs=[style_out] + components, show_progress='hidden')
+ btn_delete.click(fn=delete_fn, inputs=[], outputs=[style_out] + components, show_progress='hidden')
+ btn_rdna2.click(fn=lambda: profile_fn("RDNA2"), inputs=[], outputs=[style_out] + components, show_progress='hidden')
+ btn_rdna3.click(fn=lambda: profile_fn("RDNA3"), inputs=[], outputs=[style_out] + components, show_progress='hidden')
+ btn_rdna4.click(fn=lambda: profile_fn("RDNA4"), inputs=[], outputs=[style_out] + components, show_progress='hidden')
+
+ return components
diff --git a/test/reformat.js b/test/reformat.js
new file mode 100644
index 000000000..e00897279
--- /dev/null
+++ b/test/reformat.js
@@ -0,0 +1,55 @@
+const fs = require('fs');
+
+/**
+ * Custom stringifier that switches to minified format at a specific depth
+ */
+const mixedStringify = (data, maxDepth, indent = 2, currentDepth = 0) => {
+ if (currentDepth >= maxDepth) {
+ return JSON.stringify(data);
+ }
+
+ const spacing = ' '.repeat(indent * currentDepth);
+ const nextSpacing = ' '.repeat(indent * (currentDepth + 1));
+
+ if (Array.isArray(data)) {
+ if (data.length === 0) return '[]';
+ const items = data.map((item) => nextSpacing + mixedStringify(item, maxDepth, indent, currentDepth + 1));
+ return `[\n${items.join(',\n')}\n${spacing}]`;
+ }
+
+ if (typeof data === 'object' && data !== null) {
+ const keys = Object.keys(data);
+ if (keys.length === 0) return '{}';
+ const items = keys.map((key) => {
+ const value = mixedStringify(data[key], maxDepth, indent, currentDepth + 1);
+ return `${nextSpacing}"${key}": ${value}`;
+ });
+ return `{\n${items.join(',\n')}\n${spacing}}`;
+ }
+
+ return JSON.stringify(data);
+};
+
+// Capture CLI arguments
+const [,, inputFile, outputFile, maxDepth] = process.argv;
+console.log(`Input File: ${inputFile}, Output File: ${outputFile}, Max Depth: ${maxDepth}`);
+
+if (!inputFile || !outputFile || !maxDepth) {
+ console.log('Usage: node reformat.js ');
+ process.exit(1);
+}
+
+try {
+ // Read input file
+ const rawData = fs.readFileSync(inputFile, 'utf8');
+ const jsonData = JSON.parse(rawData);
+
+ // Reformat with mixed depth
+ const result = mixedStringify(jsonData, parseInt(maxDepth, 10));
+
+ // Write output file
+ fs.writeFileSync(outputFile, result);
+ console.log(`Success! File saved to ${outputFile} (levels expanded: ${maxDepth})`);
+} catch (err) {
+ console.error('Error processing JSON:', err.message);
+}
diff --git a/test/test-grading.py b/test/test-grading.py
index 2018519c6..0334faba6 100644
--- a/test/test-grading.py
+++ b/test/test-grading.py
@@ -95,7 +95,7 @@ def test_grading_params_defaults():
assert p.split_tone_balance == 0.5
assert p.vignette == 0.0
assert p.grain == 0.0
- assert p.lut_file == ""
+ assert p.lut_cube_file == ""
assert p.lut_strength == 1.0
return True
diff --git a/wiki b/wiki
index 33dbd026a..99f4e13d0 160000
--- a/wiki
+++ b/wiki
@@ -1 +1 @@
-Subproject commit 33dbd026a2e2fb7311d545a3b2d2db0363bb887f
+Subproject commit 99f4e13d03191b5269b869c71283d7fcf9c98f60