Skip to content

Commit

Permalink
Merge pull request intel#166 from TNG/ReEnableSafetyCheckOption
Browse files Browse the repository at this point in the history
Re-enable safety check option
  • Loading branch information
Nuullll authored Feb 4, 2025
2 parents 65712fd + 6b51cec commit a1073ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 3 additions & 10 deletions WebUI/src/assets/js/store/imageGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ export const useImageGeneration = defineStore(
'negativePrompt',
'batchSize',
'imagePreview',
'safetyCheck',
],
},
{
Expand All @@ -338,7 +337,6 @@ export const useImageGeneration = defineStore(
'negativePrompt',
'batchSize',
'imagePreview',
'safetyCheck',
],
},
{
Expand All @@ -358,14 +356,7 @@ export const useImageGeneration = defineStore(
lora: 'latent-consistency/lcm-lora-sdxl',
},
displayedSettings: ['imageModel', 'inpaintModel', 'guidanceScale', 'scheduler'],
modifiableSettings: [
'resolution',
'seed',
'inferenceSteps',
'batchSize',
'imagePreview',
'safetyCheck',
],
modifiableSettings: ['resolution', 'seed', 'inferenceSteps', 'batchSize', 'imagePreview'],
},
{
name: 'Manual',
Expand Down Expand Up @@ -685,13 +676,15 @@ export const useImageGeneration = defineStore(
return -1
}
}

return {
type: modelTypeToId(requiredModel.type),
repo_id: requiredModel.model,
backend: 'comfyui',
additionalLicenseLink: requiredModel.additionalLicenceLink,
}
}

const checkList: CheckModelAlreadyLoadedParameters[] =
workflow.comfyUIRequirements.requiredModels.map(extractDownloadModelParamsFromString)
const checkedModels: CheckModelAlreadyLoadedResult[] =
Expand Down
8 changes: 8 additions & 0 deletions WebUI/src/components/SettingsImageGeneration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
v-model="imageGeneration.negativePrompt"
></textarea>
</div>
<div v-if="modifiableOrDisplayed('safetyCheck')" class="flex items-center gap-5">
<p>{{ languages.SETTINGS_MODEL_SAFE_CHECK }}</p>
<button
class="v-checkbox-control flex-none w-5 h-5"
:class="{ 'v-checkbox-checked': imageGeneration.safeCheck }"
@click="() => (imageGeneration.safeCheck = !imageGeneration.safeCheck)"
></button>
</div>
<h2
v-if="
anyModifiableOrDisplayed([
Expand Down

0 comments on commit a1073ba

Please sign in to comment.