Skip to content

Commit

Permalink
Clean up project files.
Browse files Browse the repository at this point in the history
Nah Visual Studio is kinda a hassle to maintain.

Signed-off-by: net2cn <[email protected]>
  • Loading branch information
net2cn committed Mar 30, 2022
1 parent 3a3426c commit 2f3c08b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 74 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ A C# GUI super-resolution inference utility of [Real-ESRGAN](https://github.com/
PRs are welcomed.

## Usage
I guess you probably know how a GUI works.
Install .NET Desktop Runtime 5.0.15 or higher. (x64)

And then I guess you probably know how a GUI works. ;-)

To use GPU acceleration, a DirectML compatible GPU and an installation of Windows 10 1709 or higher is required. Set the device id to the GPU that you want to use to enable GPU acceleration (on single GPU PC, 0 is the default GPU. However, on some PC with an integrated GPU, 0 is the integrated GPU and 1 is the dedicated GPU). Check out [here](https://github.com/microsoft/DirectML#hardware-requirements) for a more specific hardware requirements.

Expand Down
4 changes: 3 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
欢迎提出Pull Requests。

## 使用方法
我觉得你应该知道GUI应该怎么用。
首先安装.NET Desktop Runtime 5.0.15。(x64)

然后我觉得你应该知道GUI应该怎么用。;-)

要使用GPU加速,你需要一块兼容DirectML的GPU与Windows 10 1709或更高的版本,以及兼容的GPU。请将Device Id设置为你想要使用的GPU序号以启用GPU加速(在一台只有一块GPU的PC上,0是默认GPU。但是在配备了集成GPU的PC上,0是集成GPU,1才是独立GPU)。你可以查看[这里](https://github.com/microsoft/DirectML#hardware-requirements)来获取一个更详细的GPU硬件需求。

Expand Down
6 changes: 0 additions & 6 deletions Real-ESRGAN_GUI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Debug|x64.ActiveCfg = Debug|x64
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Debug|x64.Build.0 = Debug|x64
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Release|Any CPU.Build.0 = Release|Any CPU
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Release|x64.ActiveCfg = Release|x64
{B2293D00-32BE-45DF-AB67-B357CCFD3955}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
106 changes: 40 additions & 66 deletions Real-ESRGAN_GUI/Real-ESRGAN_GUI.csproj
Original file line number Diff line number Diff line change
@@ -1,70 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>Real_ESRGAN_GUI</RootNamespace>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x64</Platforms>
<ApplicationIcon />
<StartupObject />
<SignAssembly>false</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.11.0" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="1.11.0" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
<None Update="models\realesrgan-x4plus.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrgan-x4plus_anime_6B.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrganv2-animevideo-xsx2.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrganv2-animevideo-xsx4.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrgan_x2plus.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Content Remove="C:\Users\mcope\.nuget\packages\microsoft.ai.directml\1.8.0\build\..\bin\x64-win\DirectML.Debug.dll" />
</ItemGroup>

<ItemGroup>
<Content Remove="C:\Users\mcope\.nuget\packages\microsoft.ai.directml\1.8.0\build\..\bin\x64-win\DirectML.Debug.pdb" />
</ItemGroup>

<ItemGroup>
<Content Remove="C:\Users\mcope\.nuget\packages\microsoft.ai.directml\1.8.0\build\..\bin\x64-win\DirectML.dll" />
</ItemGroup>

<ItemGroup>
<Content Remove="C:\Users\mcope\.nuget\packages\microsoft.ai.directml\1.8.0\build\..\bin\x64-win\DirectML.pdb" />
</ItemGroup>
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>Real_ESRGAN_GUI</RootNamespace>
<UseWPF>true</UseWPF>
<StartupObject></StartupObject>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.11.0" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="1.11.0" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
<None Update="models\realesrgan-x4plus.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrgan-x4plus_anime_6B.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrganv2-animevideo-xsx2.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrganv2-animevideo-xsx4.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="models\realesrgan_x2plus.onnx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>


</Project>

0 comments on commit 2f3c08b

Please sign in to comment.