mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2025-12-13 05:48:40 +00:00
Compare commits
No commits in common. "de732763b882c9da31eb356edae7e76077d2f339" and "8f99e38f99a1dbd75333f6e4905f9fa999b382e5" have entirely different histories.
de732763b8
...
8f99e38f99
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -24,13 +24,13 @@ jobs:
|
|||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore StableDiffusion.NET
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build StableDiffusion.NET --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }}
|
run: dotnet build --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }}
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test StableDiffusion.NET --no-build --verbosity normal --configuration Release
|
run: dotnet test --no-build --verbosity normal --configuration Release
|
||||||
|
|
||||||
- name: Upload Nuget Build Artifact
|
- name: Upload Nuget Build Artifact
|
||||||
uses: actions/upload-artifact@v4.3.1
|
uses: actions/upload-artifact@v4.3.1
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package>
|
<package>
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>StableDiffusion.NET.Backend.Cpu</id>
|
<id>StableDifffusion.NET.Backend.Cpu</id>
|
||||||
<version>$version$</version>
|
<version>$version$</version>
|
||||||
<title>StableDiffusion.NET.Backend.Cpu</title>
|
<title>StableDifffusion.NET.Backend.Cpu</title>
|
||||||
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package>
|
<package>
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>StableDiffusion.NET.Backend.Cuda</id>
|
<id>StableDifffusion.NET.Backend.Cuda</id>
|
||||||
<version>$version$</version>
|
<version>$version$</version>
|
||||||
<title>StableDiffusion.NET.Backend.Cuda</title>
|
<title>StableDifffusion.NET.Backend.Cuda</title>
|
||||||
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<file src="windows-cuda11/stable-diffusion.dll" target="runtimes\win-x64\native\cuda11\stable-diffusion.dll" />
|
<file src="windows-cuda11/stable-diffusion.dll" target="runtimes\win-x64\native\cuda11\stable-diffusion.dll" />
|
||||||
<file src="windows-cuda12/stable-diffusion.dll" target="runtimes\win-x64\native\cuda12\stable-diffusion.dll" />
|
<file src="windows-cuda12/stable-diffusion.dll" target="runtimes\win-x64\native\cuda12\stable-diffusion.dll" />
|
||||||
|
|
||||||
<file src="linux-cuda11/libstable-diffusion.so" target="runtimes\linux-x64\native\cuda11\libstable-diffusion.so" />
|
<file src="linux-cuda11/libstable-diffusion.so" target="runtimes\linux-x64\native\cuda11\libstable-diffusion.so" />
|
||||||
<file src="linux-cuda12/libstable-diffusion.so" target="runtimes\linux-x64\native\cuda12\libstable-diffusion.so" />
|
<file src="linux-cuda12/libstable-diffusion.so" target="runtimes\linux-x64\native\cuda12\libstable-diffusion.so" />
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package>
|
<package>
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>StableDiffusion.NET.Backend.Rocm</id>
|
<id>StableDifffusion.NET.Backend.Rocm</id>
|
||||||
<version>$version$</version>
|
<version>$version$</version>
|
||||||
<title>StableDiffusion.NET.Backend.Rocm</title>
|
<title>StableDifffusion.NET.Backend.Rocm</title>
|
||||||
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
<authors>Darth Affe & stable-diffusion.cpp Authors</authors>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<file src="StableDiffusion.NET.Backend.props" target="build/net8.0/StableDiffusion.NET.Backend.Rocm.props" />
|
<file src="StableDiffusion.NET.Backend.props" target="build/net8.0/StableDiffusion.NET.Backend.Rocm.props" />
|
||||||
|
|
||||||
<file src="windows-rocm5/stable-diffusion.dll" target="runtimes\win-x64\native\rocm5\stable-diffusion.dll" />
|
<file src="windows-rocm5/stable-diffusion.dll" target="runtimes\win-x64\native\rocm5\stable-diffusion.dll" />
|
||||||
|
|
||||||
<file src="linux-rocm6/libstable-diffusion.so" target="runtimes\linux-x64\native\rocm6\libstable-diffusion.so" />
|
<file src="linux-rocm6/libstable-diffusion.so" target="runtimes\linux-x64\native\rocm6\libstable-diffusion.so" />
|
||||||
|
|
||||||
<file src="sd_net_rocm.png" target="sd_net_rocm.png" />
|
<file src="sd_net_rocm.png" target="sd_net_rocm.png" />
|
||||||
|
|||||||
@ -10,11 +10,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="StableDiffusion.NET.Backend.Cpu" Version="1.2.0" />
|
<PackageReference Include="StableDifffusion.NET.Backend.Cpu" Version="1.0.0" />
|
||||||
<PackageReference Include="StableDiffusion.NET.Backend.Cuda" Version="1.2.0" />
|
<PackageReference Include="StableDifffusion.NET.Backend.Cuda" Version="1.0.0" />
|
||||||
<PackageReference Include="StableDiffusion.NET.Backend.Rocm" Version="1.2.0" />
|
<PackageReference Include="StableDifffusion.NET.Backend.Rocm" Version="1.0.0" />
|
||||||
<PackageReference Include="StableDiffusion.NET" Version="1.2.0" />
|
<PackageReference Include="StableDiffusion.NET" Version="1.0.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="8.0.4" />
|
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -5,32 +5,14 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ImageCreationUI"
|
xmlns:local="clr-namespace:ImageCreationUI"
|
||||||
xmlns:converter="clr-namespace:ImageCreationUI.Converter"
|
xmlns:converter="clr-namespace:ImageCreationUI.Converter"
|
||||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
|
||||||
xmlns:sd="clr-namespace:StableDiffusion.NET;assembly=StableDiffusion.NET"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="StableDiffusion.NET" Width="1280" Height="800">
|
Title="StableDiffusion.NET" Width="1280" Height="720">
|
||||||
<Window.DataContext>
|
<Window.DataContext>
|
||||||
<local:MainWindowViewModel />
|
<local:MainWindowViewModel />
|
||||||
</Window.DataContext>
|
</Window.DataContext>
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<converter:ImageToImageSourceConverter x:Key="ImageToImageSourceConverter" />
|
<converter:ImageToImageSourceConverter x:Key="ImageToImageSourceConverter" />
|
||||||
|
|
||||||
<ObjectDataProvider x:Key="ScheduleDataSource"
|
|
||||||
ObjectType="{x:Type sys:Enum}"
|
|
||||||
MethodName="GetValues">
|
|
||||||
<ObjectDataProvider.MethodParameters>
|
|
||||||
<x:Type TypeName="sd:Schedule" />
|
|
||||||
</ObjectDataProvider.MethodParameters>
|
|
||||||
</ObjectDataProvider>
|
|
||||||
|
|
||||||
<ObjectDataProvider x:Key="SamplerDataSource"
|
|
||||||
ObjectType="{x:Type sys:Enum}"
|
|
||||||
MethodName="GetValues">
|
|
||||||
<ObjectDataProvider.MethodParameters>
|
|
||||||
<x:Type TypeName="sd:Sampler" />
|
|
||||||
</ObjectDataProvider.MethodParameters>
|
|
||||||
</ObjectDataProvider>
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@ -47,21 +29,18 @@
|
|||||||
|
|
||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<Label Content="Model-Path" />
|
<Label Content="Model-Path"/>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectModelCommand}" IsEnabled="{Binding IsReady}" />
|
<Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectModelCommand}" IsEnabled="{Binding IsReady}" />
|
||||||
<TextBox Text="{Binding ModelPath}" />
|
<TextBox Text="{Binding ModelPath}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<Label Content="Vae-Path (Optional)" />
|
<Label Content="Vae-Path (Optional)"/>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectVaeCommand}" IsEnabled="{Binding IsReady}" />
|
<Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectVaeCommand}" IsEnabled="{Binding IsReady}" />
|
||||||
<TextBox Text="{Binding VaePath}" />
|
<TextBox Text="{Binding VaePath}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<Label Content="Schedule" />
|
|
||||||
<ComboBox ItemsSource="{Binding Source={StaticResource ScheduleDataSource}}" SelectedItem="{Binding Schedule}" />
|
|
||||||
|
|
||||||
<Button Margin="0,8" Content="Load Model" Command="{Binding LoadModelCommand}" IsEnabled="{Binding IsReady}" />
|
<Button Margin="0,8" Content="Load Model" Command="{Binding LoadModelCommand}" IsEnabled="{Binding IsReady}" />
|
||||||
|
|
||||||
<Separator />
|
<Separator />
|
||||||
@ -97,9 +76,6 @@
|
|||||||
<TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Seed}" />
|
<TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Seed}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Label Content="Sample-Method" />
|
|
||||||
<ComboBox ItemsSource="{Binding Source={StaticResource SamplerDataSource}}" SelectedItem="{Binding SampleMethod}" />
|
|
||||||
|
|
||||||
<Button Margin="0,16,0,0" Content="Create Image" Command="{Binding CreateImageCommand}" IsEnabled="{Binding IsReady}" />
|
<Button Margin="0,16,0,0" Content="Create Image" Command="{Binding CreateImageCommand}" IsEnabled="{Binding IsReady}" />
|
||||||
<Button Margin="0,16,0,0" Content="Save Image" Command="{Binding SaveImageCommand}" IsEnabled="{Binding IsReady}" />
|
<Button Margin="0,16,0,0" Content="Save Image" Command="{Binding SaveImageCommand}" IsEnabled="{Binding IsReady}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@ -27,13 +27,6 @@ public class MainWindowViewModel : INotifyPropertyChanged
|
|||||||
set => SetProperty(ref _vaePath, value);
|
set => SetProperty(ref _vaePath, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Schedule _schedule = Schedule.Default;
|
|
||||||
public Schedule Schedule
|
|
||||||
{
|
|
||||||
get => _schedule;
|
|
||||||
set => SetProperty(ref _schedule, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private string _prompt = string.Empty;
|
private string _prompt = string.Empty;
|
||||||
public string Prompt
|
public string Prompt
|
||||||
{
|
{
|
||||||
@ -83,13 +76,6 @@ public class MainWindowViewModel : INotifyPropertyChanged
|
|||||||
set => SetProperty(ref _seed, value);
|
set => SetProperty(ref _seed, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Sampler _sampleMethod = Sampler.Euler_A;
|
|
||||||
public Sampler SampleMethod
|
|
||||||
{
|
|
||||||
get => _sampleMethod;
|
|
||||||
set => SetProperty(ref _sampleMethod, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private IImage? _image;
|
private IImage? _image;
|
||||||
public IImage? Image
|
public IImage? Image
|
||||||
{
|
{
|
||||||
@ -160,7 +146,7 @@ public class MainWindowViewModel : INotifyPropertyChanged
|
|||||||
_model?.Dispose();
|
_model?.Dispose();
|
||||||
|
|
||||||
LogLine($"Loading model '{ModelPath}'");
|
LogLine($"Loading model '{ModelPath}'");
|
||||||
_model = await Task.Run(() => new StableDiffusionModel(ModelPath, new ModelParameter { VaePath = VaePath, Schedule = Schedule }));
|
_model = await Task.Run(() => new StableDiffusionModel(ModelPath, new ModelParameter { VaePath = VaePath }));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -186,8 +172,7 @@ public class MainWindowViewModel : INotifyPropertyChanged
|
|||||||
Height = Height,
|
Height = Height,
|
||||||
CfgScale = Cfg,
|
CfgScale = Cfg,
|
||||||
SampleSteps = Steps,
|
SampleSteps = Steps,
|
||||||
Seed = Seed,
|
Seed = Seed
|
||||||
SampleMethod = SampleMethod
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Image = image?.ToImage();
|
Image = image?.ToImage();
|
||||||
|
|||||||
@ -5,6 +5,5 @@ public enum Schedule
|
|||||||
Default,
|
Default,
|
||||||
Discrete,
|
Discrete,
|
||||||
Karras,
|
Karras,
|
||||||
AYS,
|
|
||||||
N_Schedules
|
N_Schedules
|
||||||
}
|
}
|
||||||
@ -4,7 +4,7 @@ if not exist stable-diffusion.cpp (
|
|||||||
|
|
||||||
cd stable-diffusion.cpp
|
cd stable-diffusion.cpp
|
||||||
git fetch
|
git fetch
|
||||||
git checkout ce1bcc74a6bf1f2c187d4d8ea14ee247cf562af2
|
git checkout ec82d5279ab7d3b20d95bf1e803c78306030e6b1
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user