Skip to content

Commit

Permalink
Init Commit
Browse files Browse the repository at this point in the history
yes
  • Loading branch information
ChiNoel-osu committed Oct 16, 2022
0 parents commit 6f33221
Show file tree
Hide file tree
Showing 24 changed files with 2,945 additions and 0 deletions.
405 changes: 405 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="SDPromptTool.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SDPromptTool"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace SDPromptTool
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
Binary file added AppIcon.ico
Binary file not shown.
10 changes: 10 additions & 0 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
846 changes: 846 additions & 0 deletions GlobalResDictionary.xaml

Large diffs are not rendered by default.

674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Window x:Class="SDPromptTool.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SDPromptTool"
xmlns:view="clr-namespace:SDPromptTool.View"
mc:Ignorable="d"
Title="Prompt Tools"
Height="450"
Width="600"
Background="#1E1E1E"
KeyDown="Window_KeyDown">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GlobalResDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<TabControl x:Name="MainTab"
Background="Transparent"
Margin="4"
BorderBrush="CornflowerBlue">
<TabItem Style="{StaticResource TabItemStyle1}"
Header="Prompt Selector"
Background="Transparent"
Foreground="White">
<view:PromptSelector />
</TabItem>
<TabItem Style="{StaticResource TabItemStyle1}"
Header="Danbooru Tags Wiki"
Background="Transparent"
Foreground="White">
<view:WebTab />
</TabItem>
<TabItem Style="{StaticResource TabItemStyle1}"
Header="Settings"
Background="Transparent"
Foreground="White">

</TabItem>
</TabControl>
</Grid>
</Window>
40 changes: 40 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using SDPromptTool.ViewModel;
using System.Collections;
using System.Windows;
using System.Windows.Input;

namespace SDPromptTool
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public static MainViewModel MainVM = new MainViewModel();
public MainWindow()
{
InitializeComponent();
}

private void Window_KeyDown(object sender, KeyEventArgs e)
{
if(Keyboard.IsKeyDown(Key.LeftCtrl))
{
switch(e.Key)
{
case Key.D1:
MainTab.SelectedIndex = 0;
break;
case Key.D2:
MainTab.SelectedIndex = 1;
break;
case Key.D3:
MainTab.SelectedIndex = 2;
break;
default:
break;
}
}
}
}
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SDPromptTool
A stable diffusion prompt tool, presets and stuff, yeah.
Built using VS 2022, .NET Core 3.1, C#, WPF, and some NuGet packages.

---
## How to use
Download the thing from release. Or you can build urself, idk.
30 changes: 30 additions & 0 deletions SDPromptTool.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<LangVersion>10.0</LangVersion>
<ApplicationIcon>AppIcon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<Content Include="AppIcon.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1370.28" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<None Update="UserPresets\Negative.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="UserPresets\Positive.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions SDPromptTool.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDPromptTool", "SDPromptTool.csproj", "{6171FC26-1A89-4E00-9AE4-5DEE3F0E0C85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6171FC26-1A89-4E00-9AE4-5DEE3F0E0C85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6171FC26-1A89-4E00-9AE4-5DEE3F0E0C85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6171FC26-1A89-4E00-9AE4-5DEE3F0E0C85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6171FC26-1A89-4E00-9AE4-5DEE3F0E0C85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D4D25378-ACE0-43E7-A9B7-59A031B7E287}
EndGlobalSection
EndGlobal
7 changes: 7 additions & 0 deletions UserPresets/Negative.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"Name": "STD NPrompts",
"Prompts": "((ugly)), (out of frame), skinny, extra fingers, poory drawn hands, poorly drawn face, blurry, bad anatomy, cloned face, disfigured, more than 2 nipples, extra limbs, (malformed limbs), (missing arms), (missing legs), extra arms, extra legs, (fused fingers), too many fingers, (long neck), lowres, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, logo, watermark, username, blurry, text font ui, malformed hands, missing limb, (long body :1.3), multiple breasts, bad feet, futa, yaoi, stubble, blurry, bad feet, blood, gore, injury, skinny, sharp ears, pubic tattoo, {{{{furry}}}}, {{{{inhuman}}}}, animal, black and white",
"Notes": "Standard issue #01."
}
]
12 changes: 12 additions & 0 deletions UserPresets/Positive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"Name": "!00 Test",
"Prompts": "Thank you for downloading this program.\r\nBy navigating to ./UserPresets/ and open the .json file, you can delete this preset.",
"Notes": "Test.\r\nPLS FIND BUGS"
},
{
"Name": "General #01",
"Prompts": "{masterpiece}, {anime}, waifu, {cute}, {solo}, small breasts, {navel}, happy, relieved, extremely detailed, ",
"Notes": "idk man\r\nyou can build on top of this if you want"
}
]
Loading

0 comments on commit 6f33221

Please sign in to comment.