import{FormView}from"../../base.mjs";import{SelectInputView}from"../enumerable.mjs";class PipelineSwitchModeInputView extends SelectInputView{static defaultOptions={offload:"Offload to CPU",unload:"Unload"};static defaultValue="offload";static allowEmpty=!0;static placeholder="Keep in Memory";static tooltip="When making an image, you may switch between a text or infererence pipeline, an inpainting pipeline, and a refining pipeline. In order to balance time spent moving between disk, system memory (RAM), and graphics memory (VRAM), as well as the amount of those resources consumed, the default setting sends pipelines from VRAM to RAM when not needed, then reloads from RAM when needed.<br/><br/>If you set this to <strong>Unload</strong>, pipelines will be freed from VRAM and not sent to RAM when not needed. This will minimize memory consumption, but increase the time spent loading from disk.<br/><br/>If you set this to <strong>Keep in Memory</strong>, pipelines will never be freed from VRAM, and up to three pipelines will be kept available, elimining swapping time. This should only be used with powerful GPUs with <em>at least</em> 12GB of VRAM for SD 1.5 models, or 24GB of VRAM for SDXL models."}class PipelineCacheModeInputView extends SelectInputView{static defaultOptions={xl:"Cache XL Pipelines and TensorRT Pipelines",always:"Cache All Pipelines"};static allowEmpty=!0;static placeholder="Cache TensorRT Pipelines";static tooltip="Models are distributed as <em>.ckpt</em> or <em>.safetensors</em> files for convenience, but opening them and reading them into memory can take some time. For this reason, a cache can be created that speeds up loading time, but takes up approximately as much space as the original checkpoint did, effectively doubling the space a model would take up.<br/><br/>For technical reasons, TensorRT pipelines must always be cached, so this setting cannot be disabled.<br/><br/>The default setting additionally caches when using SDXL models, as this speeds up loading by several factors.<br/><br/>Change this setting to <strong>Cache All Pipelines</strong> in order to cache every pipeline you load. This takes up the most space, but makes switching pipelines the fastest."}class PipelinePrecisionModeInputView extends SelectInputView{static defaultOptions={full:"Always Use Full Precision"};static allowEmpty=!0;static placeholder="Use Half-Precision When Available";static tooltip="When performing calculations on your GPU, we use floating-point numbers of a certain precision. In some cases we must use full-precision in order to calculate correctly, but in some places this is not necessary and calculations can be performed at half-precision instead, without losing quality. In general, you should only change this setting to 'Always Use Full Precision' when you experience errors during diffusion."}class PipelineInpaintingModeInputView extends SelectInputView{static defaultOptions={never:"Never Create Inpainting Checkpoint"};static allowEmpty=!0;static placeholder="Create Inpainting Checkpoint when Available";static tooltip="When <strong>inpainting</strong>, that is, changing only a portion of an image, you <strong>can</strong> directly use a regular model to do so. However, this does not always produce good results, and a more consistent means of inpainting effectively can be employed by creating an inpainting checkpoint from fine-tuned checkpoints.<br /><br />The default setting of Enfugue creates these checkpoints when inpainting is requested. This can use more storage space than desired, so the option is provided to disable this feature."}export{PipelineSwitchModeInputView,PipelineCacheModeInputView,PipelinePrecisionModeInputView,PipelineInpaintingModeInputView};
