Skip to content

Commit

Permalink
revert bad upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 23, 2024
1 parent ac9fa5d commit a6ed52f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
6 changes: 0 additions & 6 deletions browser_tests/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ test.describe('Missing models warning', () => {
await comfyPage.page.evaluate((url: string) => {
return fetch(`${url}/api/devtools/cleanup_fake_model`)
}, comfyPage.url)
await comfyPage.setSetting('Comfy.Workflow.ModelDownload.AllowedSources', [
'http://localhost:8188'
])
await comfyPage.setSetting('Comfy.Workflow.ModelDownload.AllowedSuffixes', [
'.safetensors'
])
})

test('Should display a warning when missing models are found', async ({
Expand Down
12 changes: 3 additions & 9 deletions src/components/dialog/content/MissingModelsWarning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,11 @@ import { SelectChangeEvent } from 'primevue/select'
import Button from 'primevue/button'
import { api } from '@/scripts/api'
import { DownloadModelStatus } from '@/types/apiTypes'
import { useSettingStore } from '@/stores/settingStore'
const showFolderSelect = ref(false)
const settingStore = useSettingStore()
const allowedSources = settingStore.get(
'Comfy.Workflow.ModelDownload.AllowedSources'
)
const allowedSuffixes = settingStore.get(
'Comfy.Workflow.ModelDownload.AllowedSuffixes'
)
const allowedSources = ['https://civitai.com/', 'https://huggingface.co/']
const allowedSuffixes = ['.safetensors', '.sft']
interface ModelInfo {
name: string
Expand Down Expand Up @@ -219,7 +213,7 @@ const missingModels = computed(() => {
label: `${model.directory} / ${model.name}`,
hint: model.url,
error:
'Download not allowed from this source: ' + allowedSources.join(', ')
`Download not allowed from source '${model.url}'', only allowed from '${allowedSources.join(', ')}''`
}
}
if (!allowedSuffixes.some((suffix) => model.name.endsWith(suffix))) {
Expand Down
12 changes: 0 additions & 12 deletions src/stores/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,6 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'hidden',
defaultValue: 'cover'
},
{
id: 'Comfy.Workflow.ModelDownload.AllowedSources',
name: 'Allowed model download sources',
type: 'hidden',
defaultValue: ['https://huggingface.co/', 'https://civitai.com/']
},
{
id: 'Comfy.Workflow.ModelDownload.AllowedSuffixes',
name: 'Allowed model download suffixes',
type: 'hidden',
defaultValue: ['.safetensors', '.sft']
},
{
id: 'Comfy.GroupSelectedNodes.Padding',
name: 'Group selected nodes padding',
Expand Down
2 changes: 0 additions & 2 deletions src/types/apiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ const zSettings = z.record(z.any()).and(
'Comfy.Validation.Workflows': z.boolean(),
'Comfy.Workflow.SortNodeIdOnSave': z.boolean(),
'Comfy.Queue.ImageFit': z.enum(['contain', 'cover']),
'Comfy.Workflow.ModelDownload.AllowedSources': z.array(z.string()),
'Comfy.Workflow.ModelDownload.AllowedSuffixes': z.array(z.string()),
'Comfy.Node.DoubleClickTitleToEdit': z.boolean(),
'Comfy.Window.UnloadConfirmation': z.boolean(),
'Comfy.NodeBadge.NodeSourceBadgeMode': zNodeBadgeMode,
Expand Down

0 comments on commit a6ed52f

Please sign in to comment.