Skip to content

Commit

Permalink
#45 - change global default workflow settings and megapixel options
Browse files Browse the repository at this point in the history
Signed-off-by: julianbollig <[email protected]>
  • Loading branch information
julianbollig authored and mschuettlerTNG committed Jan 23, 2025
1 parent 0baf9e3 commit c13ab44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions WebUI/src/assets/js/store/imageGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ const globalDefaultSettings = {
seed: -1,
width: 512,
height: 512,
inferenceSteps: 20,
resolution: '512x512',
inferenceSteps: 4,
resolution: '704x384',
batchSize: 1,
negativePrompt: 'nsfw',
imageModel: 'Lykon/dreamshaper-8',
Expand Down Expand Up @@ -264,9 +264,9 @@ export const useImageGeneration = defineStore("imageGeneration", () => {
defaultSettings: {
imageModel: 'Lykon/dreamshaper-8',
inpaintModel: 'Lykon/dreamshaper-8-inpainting',
resolution: '512x512',
resolution: '704x384',
guidanceScale: 1,
inferenceSteps: 6,
inferenceSteps: 4,
scheduler: "LCM",
lora: "latent-consistency/lcm-lora-sdv1-5"
},
Expand Down Expand Up @@ -418,7 +418,7 @@ export const useImageGeneration = defineStore("imageGeneration", () => {
const hdWarningDismissed = ref(false);

const workflows = ref<Workflow[]>(predefinedWorkflows);
const activeWorkflowName = ref<string | null>('Standard');
const activeWorkflowName = ref<string | null>('Standard - Fast');
const activeWorkflow = computed(() => {
console.log('### activeWorkflowName', activeWorkflowName.value)
return workflows.value.find(w => w.name === activeWorkflowName.value) ?? predefinedWorkflows[0]
Expand Down
21 changes: 11 additions & 10 deletions WebUI/src/components/ui/slider/ResolutionPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ const aspectRatios = [
{ label: '5/12', value: 5 / 12 },
]
const megaPixelsOptions = computed(() =>
imageGeneration.activeWorkflow.tags.includes('sd1.5') ? [
{ label: '0.25', totalPixels: 512 * 512 }
] :
[
{ label: '0.25', totalPixels: 512 * 512 },
{ label: '0.5', totalPixels: 704 * 704 },
{ label: '0.8', totalPixels: 896 * 896 },
{ label: '1.0', totalPixels: 1024 * 1024 },
])
const megaPixelsOptions = computed(() =>
imageGeneration.activeWorkflow.tags.includes('sd1.5') ? [
{label: '0.25', totalPixels: 512 * 512},
{label: '0.5', totalPixels: 704 * 704}
] :
[
{label: '0.25', totalPixels: 512 * 512},
{label: '0.5', totalPixels: 704 * 704},
{label: '0.8', totalPixels: 896 * 896},
{label: '1.0', totalPixels: 1024 * 1024},
])
function findBestResolution(totalPixels: number, aspectRatio: number) {
const MIN_SIZE = 256
Expand Down

0 comments on commit c13ab44

Please sign in to comment.