[
  {
    "path": ".gitattributes",
    "content": "* -text\n\n*.cs        text eol=lf diff=csharp\n*.shader    text eol=lf\n*.cginc     text eol=lf\n*.hlsl      text eol=lf\n*.compute   text eol=lf\n\n*.meta      text eol=lf\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: UPM on npsjs.com\non:\n  release:\n    types: [created]\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n    - uses: actions/setup-node@v2\n      with:\n        registry-url: 'https://registry.npmjs.org'\n    - run: npm publish\n      working-directory: Packages/jp.keijiro.ml-stable-diffusion\n      env:\n        NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}\n"
  },
  {
    "path": ".gitignore",
    "content": "Thumbs.db\nDesktop.ini\n.DS_Store\n*.swp\n\n/Library\n/Logs\n/Recordings\n/Temp\n/UserSettings\n\n/Plugin/.build\n/Plugin/.xcodebuild\n\n/Assets/StreamingAssets/StableDiffusion\n"
  },
  {
    "path": "Assets/GeneratorSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &11400000\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 0}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 11500000, guid: 9d43a3895980548c3b1521155a9aa388, type: 3}\n  m_Name: GeneratorSettings\n  m_EditorClassIdentifier: \n  prompt: The quick brown fox jumps over the lazy dog\n  stepCount: 9\n  seed: 4096\n  guidance: 10\n  strength: 0.5\n"
  },
  {
    "path": "Assets/GeneratorSettings.asset.meta",
    "content": "fileFormatVersion: 2\nguid: be9e5417d77194ccd92f9f47b1e29ec0\nNativeFormatImporter:\n  externalObjects: {}\n  mainObjectFileID: 11400000\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Pexels/pexels-anna-galimova-10416679.jpg.meta",
    "content": "fileFormatVersion: 2\nguid: a7f6159b4e3b24b0bae8cade1479b130\nTextureImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 12\n  mipmaps:\n    mipMapMode: 0\n    enableMipMap: 0\n    sRGBTexture: 1\n    linearTexture: 0\n    fadeOut: 0\n    borderMipMap: 0\n    mipMapsPreserveCoverage: 0\n    alphaTestReferenceValue: 0.5\n    mipMapFadeDistanceStart: 1\n    mipMapFadeDistanceEnd: 3\n  bumpmap:\n    convertToNormalMap: 0\n    externalNormalMap: 0\n    heightScale: 0.25\n    normalMapFilter: 0\n    flipGreenChannel: 0\n  isReadable: 0\n  streamingMipmaps: 0\n  streamingMipmapsPriority: 0\n  vTOnly: 0\n  ignoreMipmapLimit: 0\n  grayScaleToAlpha: 0\n  generateCubemap: 6\n  cubemapConvolution: 0\n  seamlessCubemap: 0\n  textureFormat: 1\n  maxTextureSize: 2048\n  textureSettings:\n    serializedVersion: 2\n    filterMode: 1\n    aniso: 1\n    mipBias: 0\n    wrapU: 0\n    wrapV: 0\n    wrapW: 0\n  nPOTScale: 1\n  lightmap: 0\n  compressionQuality: 50\n  spriteMode: 0\n  spriteExtrude: 1\n  spriteMeshType: 1\n  alignment: 0\n  spritePivot: {x: 0.5, y: 0.5}\n  spritePixelsToUnits: 100\n  spriteBorder: {x: 0, y: 0, z: 0, w: 0}\n  spriteGenerateFallbackPhysicsShape: 1\n  alphaUsage: 0\n  alphaIsTransparency: 0\n  spriteTessellationDetail: -1\n  textureType: 0\n  textureShape: 1\n  singleChannelComponent: 0\n  flipbookRows: 1\n  flipbookColumns: 1\n  maxTextureSizeSet: 0\n  compressionQualitySet: 0\n  textureFormatSet: 0\n  ignorePngGamma: 0\n  applyGammaDecoding: 0\n  swizzle: 50462976\n  cookieLightType: 0\n  platformSettings:\n  - serializedVersion: 3\n    buildTarget: DefaultTexturePlatform\n    maxTextureSize: 512\n    resizeAlgorithm: 0\n    textureFormat: 3\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  - serializedVersion: 3\n    buildTarget: Standalone\n    maxTextureSize: 2048\n    resizeAlgorithm: 0\n    textureFormat: -1\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  - serializedVersion: 3\n    buildTarget: iPhone\n    maxTextureSize: 2048\n    resizeAlgorithm: 0\n    textureFormat: -1\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  spriteSheet:\n    serializedVersion: 2\n    sprites: []\n    outline: []\n    physicsShape: []\n    bones: []\n    spriteID: \n    internalID: 0\n    vertices: []\n    indices: \n    edges: []\n    weights: []\n    secondaryTextures: []\n    nameFileIdTable: {}\n  mipmapLimitGroupName: \n  pSDRemoveMatte: 0\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Pexels/pexels-moose-photos-1036627.jpg.meta",
    "content": "fileFormatVersion: 2\nguid: b22a707369e654ce5b797e408e8b7df0\nTextureImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 12\n  mipmaps:\n    mipMapMode: 0\n    enableMipMap: 0\n    sRGBTexture: 1\n    linearTexture: 0\n    fadeOut: 0\n    borderMipMap: 0\n    mipMapsPreserveCoverage: 0\n    alphaTestReferenceValue: 0.5\n    mipMapFadeDistanceStart: 1\n    mipMapFadeDistanceEnd: 3\n  bumpmap:\n    convertToNormalMap: 0\n    externalNormalMap: 0\n    heightScale: 0.25\n    normalMapFilter: 0\n    flipGreenChannel: 0\n  isReadable: 0\n  streamingMipmaps: 0\n  streamingMipmapsPriority: 0\n  vTOnly: 0\n  ignoreMipmapLimit: 0\n  grayScaleToAlpha: 0\n  generateCubemap: 6\n  cubemapConvolution: 0\n  seamlessCubemap: 0\n  textureFormat: 1\n  maxTextureSize: 2048\n  textureSettings:\n    serializedVersion: 2\n    filterMode: 1\n    aniso: 1\n    mipBias: 0\n    wrapU: 0\n    wrapV: 0\n    wrapW: 0\n  nPOTScale: 1\n  lightmap: 0\n  compressionQuality: 50\n  spriteMode: 0\n  spriteExtrude: 1\n  spriteMeshType: 1\n  alignment: 0\n  spritePivot: {x: 0.5, y: 0.5}\n  spritePixelsToUnits: 100\n  spriteBorder: {x: 0, y: 0, z: 0, w: 0}\n  spriteGenerateFallbackPhysicsShape: 1\n  alphaUsage: 0\n  alphaIsTransparency: 0\n  spriteTessellationDetail: -1\n  textureType: 0\n  textureShape: 1\n  singleChannelComponent: 0\n  flipbookRows: 1\n  flipbookColumns: 1\n  maxTextureSizeSet: 0\n  compressionQualitySet: 0\n  textureFormatSet: 0\n  ignorePngGamma: 0\n  applyGammaDecoding: 0\n  swizzle: 50462976\n  cookieLightType: 0\n  platformSettings:\n  - serializedVersion: 3\n    buildTarget: DefaultTexturePlatform\n    maxTextureSize: 512\n    resizeAlgorithm: 0\n    textureFormat: 3\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  - serializedVersion: 3\n    buildTarget: Standalone\n    maxTextureSize: 2048\n    resizeAlgorithm: 0\n    textureFormat: -1\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  - serializedVersion: 3\n    buildTarget: iPhone\n    maxTextureSize: 2048\n    resizeAlgorithm: 0\n    textureFormat: -1\n    textureCompression: 1\n    compressionQuality: 50\n    crunchedCompression: 0\n    allowsAlphaSplitting: 0\n    overridden: 0\n    androidETC2FallbackOverride: 0\n    forceMaximumCompressionQuality_BC6H_BC7: 0\n  spriteSheet:\n    serializedVersion: 2\n    sprites: []\n    outline: []\n    physicsShape: []\n    bones: []\n    spriteID: \n    internalID: 0\n    vertices: []\n    indices: \n    edges: []\n    weights: []\n    secondaryTextures: []\n    nameFileIdTable: {}\n  mipmapLimitGroupName: \n  pSDRemoveMatte: 0\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Pexels.meta",
    "content": "fileFormatVersion: 2\nguid: 369e9dd51216e45dcb05bb142876b148\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Scripts/GeneratorSettings.cs",
    "content": "using UnityEngine;\n\n[CreateAssetMenu]\npublic sealed class GeneratorSettings : ScriptableObject\n{\n    public string prompt;\n    public int stepCount;\n    public int seed;\n    public float guidance;\n    public float strength;\n}\n"
  },
  {
    "path": "Assets/Scripts/GeneratorSettings.cs.meta",
    "content": "fileFormatVersion: 2\nguid: 9d43a3895980548c3b1521155a9aa388"
  },
  {
    "path": "Assets/Scripts/SourceSelector.cs",
    "content": "using Klak.TestTools;\nusing System.Collections.Generic;\nusing System.Linq;\nusing UnityEngine;\nusing UnityEngine.UIElements;\nusing Unity.Properties;\n\npublic sealed class SourceSelector : MonoBehaviour\n{\n    #region Editable properties\n\n    [field:SerializeField]\n    public Texture2D[] ImageList = null;\n\n    #endregion\n\n    #region Accessors for UI Toolkit\n\n    [CreateProperty]\n    public List<string> ImageNameList\n      => ImageList.Select(x => x.name).ToList();\n\n    [CreateProperty]\n    public List<string> WebcamNameList\n      => WebCamTexture.devices.Select(x => x.name).ToList();\n\n    void OnChangeTab(Tab prev, Tab next)\n    {\n        ImageDropdown.value = null;\n        WebcamDropdown.value = null;\n    }\n\n    void OnSelectImage(ChangeEvent<string> evt)\n    {\n        if (string.IsNullOrEmpty(evt.newValue)) return;\n        Target.SourceType = ImageSourceType.Texture;\n        Target.SourceTexture = ImageList.First(x => x.name == evt.newValue);\n        ImagePreview.style.backgroundImage\n          = Background.FromRenderTexture(Target.AsRenderTexture);\n    }\n\n    void OnSelectWebcam(ChangeEvent<string> evt)\n    {\n        if (string.IsNullOrEmpty(evt.newValue)) return;\n        Target.SourceType = ImageSourceType.Webcam;\n        Target.SourceName = evt.newValue;\n        WebcamPreview.style.backgroundImage\n          = Background.FromRenderTexture(Target.AsRenderTexture);\n    }\n\n    #endregion\n\n    #region Private helper properties\n\n    ImageSource Target\n      => GetComponent<ImageSource>();\n\n    VisualElement UIRoot\n      => GetComponent<UIDocument>().rootVisualElement;\n\n    TabView SourceTabs\n      => UIRoot.Q<TabView>(\"image-source-tabs\");\n\n    DropdownField ImageDropdown\n      => UIRoot.Q<DropdownField>(\"image-selector\");\n\n    VisualElement ImagePreview\n      => UIRoot.Q<VisualElement>(\"image-preview\");\n\n    DropdownField WebcamDropdown\n      => UIRoot.Q<DropdownField>(\"webcam-selector\");\n\n    VisualElement WebcamPreview\n      => UIRoot.Q<VisualElement>(\"webcam-preview\");\n\n    #endregion\n\n    #region MonoBehaviour implementation\n\n    void Start()\n    {\n        SourceTabs.activeTabChanged += OnChangeTab;\n\n        ImageDropdown.dataSource = this;\n        ImageDropdown.RegisterValueChangedCallback(OnSelectImage);\n\n        WebcamDropdown.dataSource = this;\n        WebcamDropdown.RegisterValueChangedCallback(OnSelectWebcam);\n    }\n\n    #endregion\n}\n"
  },
  {
    "path": "Assets/Scripts/SourceSelector.cs.meta",
    "content": "fileFormatVersion: 2\nguid: 4392a036104d54e40b7eccfc3016884b"
  },
  {
    "path": "Assets/Scripts/Tester.cs",
    "content": "using Unity.Properties;\nusing UnityEngine.UIElements;\nusing UnityEngine;\nusing Stopwatch = System.Diagnostics.Stopwatch;\nusing ImageSource = Klak.TestTools.ImageSource;\nusing ComputeUnits = MLStableDiffusion.ComputeUnits;\nusing Scheduler = MLStableDiffusion.Scheduler;\n\npublic sealed class Tester : MonoBehaviour\n{\n    #region Properties for UI binding\n\n    [CreateProperty]\n    public string LogText { get; set; }\n\n    #endregion\n\n    #region Editor-only properties\n\n    [SerializeField]\n    GeneratorSettings _settings = null;\n\n    [SerializeField]\n    string _resourceDir = \"StableDiffusion\";\n\n    [SerializeField]\n    Vector2Int _modelSize = new Vector2Int(512, 512);\n\n    [SerializeField]\n    ComputeUnits _computeUnits = ComputeUnits.CpuAndNE;\n\n    [SerializeField]\n    Scheduler _scheduler = Scheduler.Dpmpp;\n\n    #endregion\n\n    #region Project asset references\n\n    [SerializeField, HideInInspector] ComputeShader _preprocessShader = null;\n\n    #endregion\n\n    #region UI helpers\n\n    ImageSource ImageSource => GetComponent<ImageSource>();\n\n    VisualElement UIRoot => GetComponent<UIDocument>().rootVisualElement;\n    VisualElement UIControlPanel => UIRoot.Q(\"control-panel\");\n    VisualElement UIImageSourceTabs => UIRoot.Q(\"image-source-tabs\");\n    VisualElement UIPreview => UIRoot.Q(\"preview\");\n    VisualElement UIGenerateByTextButton => UIRoot.Q(\"text-generate-button\");\n    VisualElement UIGenerateByImageButton => UIRoot.Q(\"image-generate-button\");\n    VisualElement UIGenerateByWebcamButton => UIRoot.Q(\"webcam-generate-button\");\n    VisualElement UILogText => UIRoot.Q(\"log-label\");\n\n    async void OnClickGenerateByTextButton(ClickEvent e)\n    {\n        UIImageSourceTabs.SetEnabled(false);\n        await RunPipelineAsync(null);\n        UIImageSourceTabs.SetEnabled(true);\n    }\n\n    async void OnClickGenerateByImageButton(ClickEvent e)\n    {\n        UIImageSourceTabs.SetEnabled(false);\n        await RunPipelineAsync(ImageSource.AsTexture);\n        UIImageSourceTabs.SetEnabled(true);\n    }\n\n    async void OnClickGenerateByWebcamButton(ClickEvent e)\n    {\n        UIImageSourceTabs.SetEnabled(false);\n        await RunPipelineAsync(ImageSource.AsTexture);\n        UIImageSourceTabs.SetEnabled(true);\n    }\n\n    #endregion\n\n    #region Stable Diffusion pipeline objects\n\n    string ResourcePath\n      => Application.streamingAssetsPath + \"/\" + _resourceDir;\n\n    MLStableDiffusion.ResourceInfo ResourceInfo\n      => MLStableDiffusion.ResourceInfo.FixedSizeModel\n           (ResourcePath, _modelSize.x, _modelSize.y);\n\n    MLStableDiffusion.Pipeline _pipeline;\n    (RenderTexture rt, Texture2D tex2d) _generated;\n    Awaitable _task;\n\n    #endregion\n\n    #region Async operations\n\n    async Awaitable SetUpPipelineAsync()\n    {\n        LogText = \"Loading resources...\\n\" +\n          \"(This takes a few minites for the first time.)\";\n        UIImageSourceTabs.SetEnabled(false);\n\n        _pipeline = new MLStableDiffusion.Pipeline(_preprocessShader);\n        await _pipeline.InitializeAsync(ResourceInfo, _computeUnits);\n\n        LogText = \"\";\n        UIImageSourceTabs.SetEnabled(true);\n    }\n\n    async Awaitable RunPipelineAsync(Texture sourceImage)\n    {\n        LogText = \"Generating...\";;\n\n        _pipeline.Prompt = _settings.prompt;\n        _pipeline.Strength = _settings.strength;\n        _pipeline.Scheduler = _scheduler;\n        _pipeline.StepCount = _settings.stepCount;\n        _pipeline.Seed = _settings.seed;\n        _pipeline.GuidanceScale = _settings.guidance;\n\n        var time = new Stopwatch();\n        time.Start();\n        await _pipeline.RunAsync(sourceImage, _generated.rt, destroyCancellationToken);\n        time.Stop();\n\n        Graphics.CopyTexture(_generated.rt, _generated.tex2d);\n\n        LogText = $\"Generation time: {time.Elapsed.TotalSeconds:f2} sec\";\n    }\n\n    #endregion\n\n    #region MonoBehaviour implementation\n\n    void Start()\n    {\n        UIControlPanel.dataSource = _settings;\n        UILogText.dataSource = this;\n\n        UIGenerateByTextButton.RegisterCallback<ClickEvent>(OnClickGenerateByTextButton);\n        UIGenerateByImageButton.RegisterCallback<ClickEvent>(OnClickGenerateByImageButton);\n        UIGenerateByWebcamButton.RegisterCallback<ClickEvent>(OnClickGenerateByWebcamButton);\n\n        var (w, h) = (_modelSize.x, _modelSize.y);\n        _generated.rt = new RenderTexture(w, h, 0, RenderTextureFormat.BGRA32);\n        _generated.tex2d = new Texture2D(w, h, TextureFormat.BGRA32, false);\n        UIPreview.style.backgroundImage = new StyleBackground(_generated.tex2d);\n\n        _task = SetUpPipelineAsync();\n    }\n\n    #endregion\n}\n"
  },
  {
    "path": "Assets/Scripts/Tester.cs.meta",
    "content": "fileFormatVersion: 2\nguid: 1772d845a3b3d481ebbac31a4cc679b0\nMonoImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  defaultReferences:\n  - _settings: {fileID: 11400000, guid: be9e5417d77194ccd92f9f47b1e29ec0, type: 2}\n  - _preprocessShader: {fileID: 7200000, guid: 7c06db8e339994c05bc2ad5e44c940de, type: 3}\n  executionOrder: 0\n  icon: {instanceID: 0}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Scripts.meta",
    "content": "fileFormatVersion: 2\nguid: ed9f09d179e4c4a95a7cc87a654d6f09\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/StreamingAssets/StableDiffusion.meta",
    "content": "fileFormatVersion: 2\nguid: 13bb5be97e83744f288b5d6afc2aa6dc\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/StreamingAssets.meta",
    "content": "fileFormatVersion: 2\nguid: 274436d4e5b354aa3b25d05901143ee6\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/Tester.unity",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!29 &1\nOcclusionCullingSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  m_OcclusionBakeSettings:\n    smallestOccluder: 5\n    smallestHole: 0.25\n    backfaceThreshold: 100\n  m_SceneGUID: 00000000000000000000000000000000\n  m_OcclusionCullingData: {fileID: 0}\n--- !u!104 &2\nRenderSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 10\n  m_Fog: 0\n  m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}\n  m_FogMode: 3\n  m_FogDensity: 0.01\n  m_LinearFogStart: 0\n  m_LinearFogEnd: 300\n  m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}\n  m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}\n  m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}\n  m_AmbientIntensity: 1\n  m_AmbientMode: 0\n  m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}\n  m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}\n  m_HaloStrength: 0.5\n  m_FlareStrength: 1\n  m_FlareFadeSpeed: 3\n  m_HaloTexture: {fileID: 0}\n  m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}\n  m_DefaultReflectionMode: 0\n  m_DefaultReflectionResolution: 128\n  m_ReflectionBounces: 1\n  m_ReflectionIntensity: 1\n  m_CustomReflection: {fileID: 0}\n  m_Sun: {fileID: 0}\n  m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}\n  m_UseRadianceAmbientProbe: 0\n--- !u!157 &3\nLightmapSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 12\n  m_GISettings:\n    serializedVersion: 2\n    m_BounceScale: 1\n    m_IndirectOutputScale: 1\n    m_AlbedoBoost: 1\n    m_EnvironmentLightingMode: 0\n    m_EnableBakedLightmaps: 1\n    m_EnableRealtimeLightmaps: 0\n  m_LightmapEditorSettings:\n    serializedVersion: 12\n    m_Resolution: 2\n    m_BakeResolution: 40\n    m_AtlasSize: 1024\n    m_AO: 0\n    m_AOMaxDistance: 1\n    m_CompAOExponent: 1\n    m_CompAOExponentDirect: 0\n    m_ExtractAmbientOcclusion: 0\n    m_Padding: 2\n    m_LightmapParameters: {fileID: 0}\n    m_LightmapsBakeMode: 1\n    m_TextureCompression: 1\n    m_ReflectionCompression: 2\n    m_MixedBakeMode: 2\n    m_BakeBackend: 1\n    m_PVRSampling: 1\n    m_PVRDirectSampleCount: 32\n    m_PVRSampleCount: 512\n    m_PVRBounces: 2\n    m_PVREnvironmentSampleCount: 256\n    m_PVREnvironmentReferencePointCount: 2048\n    m_PVRFilteringMode: 1\n    m_PVRDenoiserTypeDirect: 1\n    m_PVRDenoiserTypeIndirect: 1\n    m_PVRDenoiserTypeAO: 1\n    m_PVRFilterTypeDirect: 0\n    m_PVRFilterTypeIndirect: 0\n    m_PVRFilterTypeAO: 0\n    m_PVREnvironmentMIS: 1\n    m_PVRCulling: 1\n    m_PVRFilteringGaussRadiusDirect: 1\n    m_PVRFilteringGaussRadiusIndirect: 5\n    m_PVRFilteringGaussRadiusAO: 2\n    m_PVRFilteringAtrousPositionSigmaDirect: 0.5\n    m_PVRFilteringAtrousPositionSigmaIndirect: 2\n    m_PVRFilteringAtrousPositionSigmaAO: 1\n    m_ExportTrainingData: 0\n    m_TrainingDataDestination: TrainingData\n    m_LightProbeSampleCountMultiplier: 4\n  m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}\n  m_LightingSettings: {fileID: 0}\n--- !u!196 &4\nNavMeshSettings:\n  serializedVersion: 2\n  m_ObjectHideFlags: 0\n  m_BuildSettings:\n    serializedVersion: 3\n    agentTypeID: 0\n    agentRadius: 0.5\n    agentHeight: 2\n    agentSlope: 45\n    agentClimb: 0.4\n    ledgeDropHeight: 0\n    maxJumpAcrossDistance: 0\n    minRegionArea: 2\n    manualCellSize: 0\n    cellSize: 0.16666667\n    manualTileSize: 0\n    tileSize: 256\n    buildHeightMesh: 0\n    maxJobWorkers: 0\n    preserveTilesOutsideBounds: 0\n    debug:\n      m_Flags: 0\n  m_NavMeshData: {fileID: 0}\n--- !u!1 &1807317833\nGameObject:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  serializedVersion: 6\n  m_Component:\n  - component: {fileID: 1807317835}\n  - component: {fileID: 1807317834}\n  m_Layer: 0\n  m_Name: Main Camera\n  m_TagString: MainCamera\n  m_Icon: {fileID: 0}\n  m_NavMeshLayer: 0\n  m_StaticEditorFlags: 0\n  m_IsActive: 1\n--- !u!20 &1807317834\nCamera:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1807317833}\n  m_Enabled: 1\n  serializedVersion: 2\n  m_ClearFlags: 2\n  m_BackGroundColor: {r: 0.16838461, g: 0.18063076, b: 0.199, a: 0}\n  m_projectionMatrixMode: 1\n  m_GateFitMode: 2\n  m_FOVAxisMode: 0\n  m_Iso: 200\n  m_ShutterSpeed: 0.005\n  m_Aperture: 16\n  m_FocusDistance: 10\n  m_FocalLength: 50\n  m_BladeCount: 5\n  m_Curvature: {x: 2, y: 11}\n  m_BarrelClipping: 0.25\n  m_Anamorphism: 0\n  m_SensorSize: {x: 36, y: 24}\n  m_LensShift: {x: 0, y: 0}\n  m_NormalizedViewPortRect:\n    serializedVersion: 2\n    x: 0\n    y: 0\n    width: 1\n    height: 1\n  near clip plane: 1\n  far clip plane: 100\n  field of view: 60\n  orthographic: 1\n  orthographic size: 0.5\n  m_Depth: 0\n  m_CullingMask:\n    serializedVersion: 2\n    m_Bits: 4294967295\n  m_RenderingPath: -1\n  m_TargetTexture: {fileID: 0}\n  m_TargetDisplay: 0\n  m_TargetEye: 3\n  m_HDR: 0\n  m_AllowMSAA: 0\n  m_AllowDynamicResolution: 0\n  m_ForceIntoRT: 0\n  m_OcclusionCulling: 0\n  m_StereoConvergence: 10\n  m_StereoSeparation: 0.022\n--- !u!4 &1807317835\nTransform:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1807317833}\n  serializedVersion: 2\n  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n  m_LocalPosition: {x: 0, y: 0, z: 0}\n  m_LocalScale: {x: 1, y: 1, z: 1}\n  m_ConstrainProportionsScale: 0\n  m_Children: []\n  m_Father: {fileID: 0}\n  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!1 &1955398681\nGameObject:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  serializedVersion: 6\n  m_Component:\n  - component: {fileID: 1955398683}\n  - component: {fileID: 1955398682}\n  - component: {fileID: 1955398684}\n  - component: {fileID: 1955398686}\n  - component: {fileID: 1955398685}\n  m_Layer: 0\n  m_Name: UI\n  m_TagString: Untagged\n  m_Icon: {fileID: 0}\n  m_NavMeshLayer: 0\n  m_StaticEditorFlags: 0\n  m_IsActive: 1\n--- !u!114 &1955398682\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1955398681}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}\n  m_Name: \n  m_EditorClassIdentifier: \n  m_PanelSettings: {fileID: 11400000, guid: baee66811cd131440a1088b4bf5187ed, type: 2}\n  m_ParentUI: {fileID: 0}\n  sourceAsset: {fileID: 9197481963319205126, guid: 069389883b500486c84dd24074edd035, type: 3}\n  m_SortingOrder: 0\n--- !u!4 &1955398683\nTransform:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1955398681}\n  serializedVersion: 2\n  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}\n  m_LocalPosition: {x: 0, y: 0, z: 0}\n  m_LocalScale: {x: 1, y: 1, z: 1}\n  m_ConstrainProportionsScale: 0\n  m_Children: []\n  m_Father: {fileID: 0}\n  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}\n--- !u!114 &1955398684\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1955398681}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 11500000, guid: 1772d845a3b3d481ebbac31a4cc679b0, type: 3}\n  m_Name: \n  m_EditorClassIdentifier: \n  _settings: {fileID: 11400000, guid: be9e5417d77194ccd92f9f47b1e29ec0, type: 2}\n  _resourceDir: StableDiffusion\n  _modelSize: {x: 512, y: 512}\n  _computeUnits: 3\n  _scheduler: 1\n  _preprocessShader: {fileID: 7200000, guid: 7c06db8e339994c05bc2ad5e44c940de, type: 3}\n--- !u!114 &1955398685\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1955398681}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 11500000, guid: 40ff2e515a81541cbb664860588e2c6e, type: 3}\n  m_Name: \n  m_EditorClassIdentifier: \n  _generatorShader: {fileID: 4800000, guid: 3f7d8db4748f54c638a46cec0b0e61f8, type: 3}\n  _sourceType: 0\n  _outputResolution: {x: 512, y: 512}\n  _outputDestination: {fileID: 0}\n  <SourceTexture>k__BackingField: {fileID: 2800000, guid: a7f6159b4e3b24b0bae8cade1479b130, type: 3}\n  _sourceVideo: {fileID: 0}\n  <SourceCamera>k__BackingField: {fileID: 0}\n  _sourceUrl: \n  _sourceName: \n  _deviceResolution: {x: 0, y: 0}\n  _deviceFrameRate: 0\n--- !u!114 &1955398686\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 1955398681}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 11500000, guid: 4392a036104d54e40b7eccfc3016884b, type: 3}\n  m_Name: \n  m_EditorClassIdentifier: \n  ImageList:\n  - {fileID: 2800000, guid: a7f6159b4e3b24b0bae8cade1479b130, type: 3}\n  - {fileID: 2800000, guid: b22a707369e654ce5b797e408e8b7df0, type: 3}\n--- !u!1660057539 &9223372036854775807\nSceneRoots:\n  m_ObjectHideFlags: 0\n  m_Roots:\n  - {fileID: 1807317835}\n  - {fileID: 1955398683}\n"
  },
  {
    "path": "Assets/Tester.unity.meta",
    "content": "fileFormatVersion: 2\nguid: 1ee26f4b46b0d4ce383435cbcd10fb03\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/UI/Control.uxml",
    "content": "<engine:UXML xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:engine=\"UnityEngine.UIElements\" xmlns:editor=\"UnityEditor.UIElements\" noNamespaceSchemaLocation=\"../UIElementsSchema/UIElements.xsd\" editor-extension-mode=\"False\">\n    <Style src=\"project://database/Assets/UI/FlatStyles.uss?fileID=7433441132597879392&amp;guid=f66488d5732f645af8d4ea5c4842cb98&amp;type=3#FlatStyles\" />\n    <engine:VisualElement name=\"control-panel\" data-source=\"project://database/Assets/GeneratorSettings.asset?fileID=11400000&amp;guid=be9e5417d77194ccd92f9f47b1e29ec0&amp;type=2#GeneratorSettings\" style=\"flex-grow: 1; background-color: rgb(55, 59, 65);\">\n        <engine:VisualElement name=\"main-control-container\" style=\"margin-top: 20px; margin-right: 20px; margin-bottom: 20px; margin-left: 20px;\">\n            <engine:TextField label=\"Prompt\" name=\"prompt\">\n                <Bindings>\n                    <engine:DataBinding property=\"value\" data-source-path=\"prompt\" />\n                </Bindings>\n            </engine:TextField>\n            <engine:SliderInt label=\"Step Count\" high-value=\"50\" name=\"step-count-slider\" show-input-field=\"true\" style=\"flex-grow: 1;\">\n                <Bindings>\n                    <engine:DataBinding property=\"value\" data-source-path=\"stepCount\" />\n                </Bindings>\n            </engine:SliderInt>\n            <engine:SliderInt label=\"Seed\" high-value=\"65536\" name=\"seed-slider\" show-input-field=\"true\" style=\"flex-grow: 1;\">\n                <Bindings>\n                    <engine:DataBinding property=\"value\" data-source-path=\"seed\" />\n                </Bindings>\n            </engine:SliderInt>\n            <engine:Slider label=\"Guidance\" high-value=\"30\" name=\"guidance-slider\" show-input-field=\"true\" style=\"flex-grow: 1;\">\n                <Bindings>\n                    <engine:DataBinding property=\"value\" data-source-path=\"guidance\" />\n                </Bindings>\n            </engine:Slider>\n        </engine:VisualElement>\n        <engine:VisualElement name=\"info-container\" style=\"flex-grow: 1; flex-shrink: 1; flex-direction: column-reverse; margin-top: 20px; margin-right: 20px; margin-bottom: 20px; margin-left: 20px;\">\n            <engine:Label name=\"log-label\" style=\"-unity-text-align: upper-right;\">\n                <Bindings>\n                    <engine:DataBinding property=\"text\" binding-mode=\"ToTarget\" data-source-path=\"LogText\" />\n                </Bindings>\n            </engine:Label>\n        </engine:VisualElement>\n        <engine:TabView name=\"image-source-tabs\">\n            <engine:Tab label=\"Webcam to Image\">\n                <engine:DropdownField label=\"Device\" name=\"webcam-selector\" data-source-type=\"SourceSelector, Assembly-CSharp\">\n                    <Bindings>\n                        <engine:DataBinding property=\"choices\" data-source-path=\"WebcamNameList\" />\n                    </Bindings>\n                </engine:DropdownField>\n                <engine:VisualElement name=\"webcam-preview\" style=\"width: 200px; height: 200px; background-color: rgb(0, 0, 0); align-self: center; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;\" />\n                <engine:Slider label=\"Strength\" name=\"webcam-strength\" high-value=\"1\" show-input-field=\"true\" style=\"flex-grow: 1;\">\n                    <Bindings>\n                        <engine:DataBinding property=\"value\" data-source-path=\"strength\" />\n                    </Bindings>\n                </engine:Slider>\n                <engine:Button text=\"Generate&#x9;\" name=\"webcam-generate-button\" />\n            </engine:Tab>\n            <engine:Tab label=\"Image to Image\">\n                <engine:DropdownField label=\"Image\" name=\"image-selector\" data-source-type=\"SourceSelector, Assembly-CSharp\">\n                    <Bindings>\n                        <engine:DataBinding property=\"choices\" data-source-path=\"ImageNameList\" />\n                    </Bindings>\n                </engine:DropdownField>\n                <engine:VisualElement name=\"image-preview\" style=\"width: 200px; height: 200px; background-color: rgb(0, 0, 0); align-self: center; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;\" />\n                <engine:Slider label=\"Strength\" name=\"image-strength\" high-value=\"1\" show-input-field=\"true\" style=\"flex-grow: 1;\">\n                    <Bindings>\n                        <engine:DataBinding property=\"value\" data-source-path=\"strength\" />\n                    </Bindings>\n                </engine:Slider>\n                <engine:Button text=\"Generate&#x9;\" name=\"image-generate-button\" />\n            </engine:Tab>\n            <engine:Tab label=\"Text to Image\">\n                <engine:Button text=\"Generate&#x9;\" name=\"text-generate-button\" />\n            </engine:Tab>\n        </engine:TabView>\n    </engine:VisualElement>\n</engine:UXML>\n"
  },
  {
    "path": "Assets/UI/Control.uxml.meta",
    "content": "fileFormatVersion: 2\nguid: 4587e37b00da06b43ba4abebc7bfc4bb\nScriptedImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 2\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n  script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}\n"
  },
  {
    "path": "Assets/UI/FlatStyles.uss",
    "content": "Label {\n    color: rgb(226, 226, 226);\n    font-size: 16px;\n}\n\nTextElement {\n    color: rgb(255, 255, 255);\n    font-size: 16px;\n}\n\nPopupTextElement {\n    color: rgb(255, 255, 255);\n    font-size: 16px;\n}\n\nTabView {\n    margin-top: 10px;\n    margin-right: 10px;\n    margin-bottom: 10px;\n    margin-left: 10px;\n}\n\nTab {\n    margin-top: 10px;\n    margin-right: 10px;\n    margin-bottom: 10px;\n    margin-left: 10px;\n}\n\n.unity-button {\n    background-color: rgba(0, 0, 0, 0.19);\n    border-top-left-radius: 4px;\n    border-top-right-radius: 4px;\n    border-bottom-right-radius: 4px;\n    border-bottom-left-radius: 4px;\n    color: rgb(255, 255, 255);\n    font-size: 16px;\n    -unity-font-style: bold;\n}\n\n.unity-button:disabled {\n    background-color: rgba(0, 0, 0, 0);\n    color: rgba(255, 255, 255, 0.13);\n}\n\n.unity-button:hover:enabled {\n    border-left-color: rgb(255, 255, 255);\n    border-right-color: rgb(255, 255, 255);\n    border-top-color: rgb(255, 255, 255);\n    border-bottom-color: rgb(255, 255, 255);\n    background-color: rgba(0, 0, 0, 0.3);\n}\n\n.unity-button:active:enabled {\n    background-color: rgba(0, 0, 0, 0.57);\n}\n\n.unity-base-field {\n    margin-top: 10px;\n    margin-right: 10px;\n    margin-bottom: 10px;\n    margin-left: 10px;\n}\n\n.unity-base-field__label {\n    -unity-font-style: bold;\n}\n\n.unity-base-field:focus:enabled > .unity-base-field__label {\n    color: rgb(207, 207, 207);\n}\n\n.unity-base-text-field__input {\n    background-color: rgba(0, 0, 0, 0);\n    border-top-width: 0;\n    border-left-width: 0;\n    border-right-width: 0;\n    border-left-color: rgb(156, 156, 156);\n    border-right-color: rgb(156, 156, 156);\n    border-top-color: rgb(156, 156, 156);\n    border-bottom-color: rgb(156, 156, 156);\n}\n\n.unity-base-text-field__input:disabled {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-text-field {\n    --unity-cursor-color: rgb(255, 255, 255);\n}\n\n.unity-tab__header {\n    padding-top: 10px;\n    padding-right: 10px;\n    padding-bottom: 10px;\n    padding-left: 10px;\n    min-width: 192px;\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-tab__header-label {\n    color: rgb(118, 118, 118);\n    -unity-font-style: bold;\n    -unity-text-align: upper-center;\n    flex-grow: 1;\n}\n\n.unity-tab__header-underline {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-tab__header:checked > .unity-tab__header-underline {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-tab__header:checked > .unity-tab__header-label {\n    color: rgb(238, 238, 238);\n}\n\n.unity-tab__header:hover {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-tab__header:hover > .unity-tab__header-label {\n    color: rgb(221, 221, 221);\n}\n\n.unity-base-slider--horizontal .unity-base-slider__tracker {\n    height: 1px;\n}\n\n.unity-base-slider--horizontal .unity-base-slider__dragger {\n    width: 3px;\n}\n\n.unity-base-popup-field__input {\n    background-color: rgba(0, 0, 0, 0);\n    border-bottom-width: 1px;\n    border-top-width: 0;\n    border-right-width: 0;\n    border-left-width: 0;\n}\n\n.unity-base-popup-field__input:disabled {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-base-popup-field__arrow {\n    -unity-background-image-tint-color: rgb(255, 255, 255);\n}\n\n.unity-base-popup-field:active:enabled > .unity-base-popup-field__input {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-base-popup-field:hover:enabled > .unity-base-popup-field__input {\n    background-color: rgba(0, 0, 0, 0);\n}\n\n.unity-base-dropdown__container-inner {\n    background-color: rgb(46, 49, 54);\n}\n\n.unity-base-dropdown__label {\n    color: rgb(255, 255, 255);\n}\n\n.unity-base-dropdown__item:checked > .unity-base-dropdown__checkmark {\n    -unity-background-image-tint-color: rgb(255, 255, 255);\n}\n\n.unity-base-slider__text-field {\n    min-width: 100px;\n}\n\n.unity-base-slider .unity-base-text-field__input--single-line {\n    -unity-text-align: upper-right;\n}\n"
  },
  {
    "path": "Assets/UI/FlatStyles.uss.meta",
    "content": "fileFormatVersion: 2\nguid: f66488d5732f645af8d4ea5c4842cb98\nScriptedImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 2\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n  script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}\n  disableValidation: 0\n"
  },
  {
    "path": "Assets/UI/Main.uxml",
    "content": "<engine:UXML xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:engine=\"UnityEngine.UIElements\" xmlns:editor=\"UnityEditor.UIElements\" noNamespaceSchemaLocation=\"../../UIElementsSchema/UIElements.xsd\" editor-extension-mode=\"False\">\n    <engine:Template name=\"Control\" src=\"project://database/Assets/UI/Control.uxml?fileID=9197481963319205126&amp;guid=4587e37b00da06b43ba4abebc7bfc4bb&amp;type=3#Control\" />\n    <Style src=\"project://database/Assets/UI/FlatStyles.uss?fileID=7433441132597879392&amp;guid=f66488d5732f645af8d4ea5c4842cb98&amp;type=3#FlatStyles\" />\n    <engine:VisualElement name=\"root\" style=\"flex-direction: row; flex-grow: 1;\">\n        <engine:Instance template=\"Control\" />\n        <engine:VisualElement name=\"preview\" style=\"flex-grow: 1; -unity-background-scale-mode: scale-to-fit;\" />\n    </engine:VisualElement>\n</engine:UXML>\n"
  },
  {
    "path": "Assets/UI/Main.uxml.meta",
    "content": "fileFormatVersion: 2\nguid: 069389883b500486c84dd24074edd035\nScriptedImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 2\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n  script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}\n"
  },
  {
    "path": "Assets/UI/Panel.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &11400000\nMonoBehaviour:\n  m_ObjectHideFlags: 0\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 0}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0}\n  m_Name: Panel\n  m_EditorClassIdentifier: \n  themeUss: {fileID: -4733365628477956816, guid: fc13e98ced2863a498ac563b785f68af, type: 3}\n  m_TargetTexture: {fileID: 0}\n  m_RenderMode: 0\n  m_WorldSpaceLayer: 0\n  m_ScaleMode: 1\n  m_ReferenceSpritePixelsPerUnit: 100\n  m_PixelsPerUnit: 100\n  m_Scale: 1\n  m_ReferenceDpi: 200\n  m_FallbackDpi: 200\n  m_ReferenceResolution: {x: 1280, y: 1080}\n  m_ScreenMatchMode: 0\n  m_Match: 0\n  m_SortingOrder: 0\n  m_TargetDisplay: 0\n  m_BindingLogLevel: 0\n  m_ClearDepthStencil: 1\n  m_ClearColor: 0\n  m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0}\n  m_VertexBudget: 0\n  m_DynamicAtlasSettings:\n    m_MinAtlasSize: 64\n    m_MaxAtlasSize: 4096\n    m_MaxSubTextureSize: 64\n    m_ActiveFilters: -1\n  m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0}\n  m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0}\n  m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0}\n  textSettings: {fileID: 0}\n"
  },
  {
    "path": "Assets/UI/Panel.asset.meta",
    "content": "fileFormatVersion: 2\nguid: baee66811cd131440a1088b4bf5187ed\nNativeFormatImporter:\n  externalObjects: {}\n  mainObjectFileID: 11400000\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Assets/UI/Theme.tss",
    "content": "@import url(\"unity-theme://default\");\n\n@import url(\"FlatStyles.uss\");\n\nVisualElement {}\n"
  },
  {
    "path": "Assets/UI/Theme.tss.meta",
    "content": "fileFormatVersion: 2\nguid: fc13e98ced2863a498ac563b785f68af\nScriptedImporter:\n  internalIDToNameTable: []\n  externalObjects: {}\n  serializedVersion: 2\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n  script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0}\n  disableValidation: 0\n"
  },
  {
    "path": "Assets/UI.meta",
    "content": "fileFormatVersion: 2\nguid: 26452de3019074f08858f9080a5c095d\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "LICENSE",
    "content": "# Stable Diffusion\n\nMIT License\n\nCopyright (c) 2022 Stability AI\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n---\n\n# ml-stable-diffusion\n\nCopyright (C) 2022 Apple Inc. All Rights Reserved.\n\nIMPORTANT:  This Apple software is supplied to you by Apple\nInc. (\"Apple\") in consideration of your agreement to the following\nterms, and your use, installation, modification or redistribution of\nthis Apple software constitutes acceptance of these terms.  If you do\nnot agree with these terms, please do not use, install, modify or\nredistribute this Apple software.\n\nIn consideration of your agreement to abide by the following terms, and\nsubject to these terms, Apple grants you a personal, non-exclusive\nlicense, under Apple's copyrights in this original Apple software (the\n\"Apple Software\"), to use, reproduce, modify and redistribute the Apple\nSoftware, with or without modifications, in source and/or binary forms;\nprovided that if you redistribute the Apple Software in its entirety and\nwithout modifications, you must retain this notice and the following\ntext and disclaimers in all such redistributions of the Apple Software.\nNeither the name, trademarks, service marks or logos of Apple Inc. may\nbe used to endorse or promote products derived from the Apple Software\nwithout specific prior written permission from Apple.  Except as\nexpressly stated in this notice, no other rights or licenses, express or\nimplied, are granted by Apple herein, including but not limited to any\npatent rights that may be infringed by your derivative works or by other\nworks in which the Apple Software may be incorporated.\n\nThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\nMAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\nTHE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\nOPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\nIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\nMODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\nAND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\nSTRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/LICENSE",
    "content": "# Stable Diffusion\n\nMIT License\n\nCopyright (c) 2022 Stability AI\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n---\n\n# ml-stable-diffusion\n\nCopyright (C) 2022 Apple Inc. All Rights Reserved.\n\nIMPORTANT:  This Apple software is supplied to you by Apple\nInc. (\"Apple\") in consideration of your agreement to the following\nterms, and your use, installation, modification or redistribution of\nthis Apple software constitutes acceptance of these terms.  If you do\nnot agree with these terms, please do not use, install, modify or\nredistribute this Apple software.\n\nIn consideration of your agreement to abide by the following terms, and\nsubject to these terms, Apple grants you a personal, non-exclusive\nlicense, under Apple's copyrights in this original Apple software (the\n\"Apple Software\"), to use, reproduce, modify and redistribute the Apple\nSoftware, with or without modifications, in source and/or binary forms;\nprovided that if you redistribute the Apple Software in its entirety and\nwithout modifications, you must retain this notice and the following\ntext and disclaimers in all such redistributions of the Apple Software.\nNeither the name, trademarks, service marks or logos of Apple Inc. may\nbe used to endorse or promote products derived from the Apple Software\nwithout specific prior written permission from Apple.  Except as\nexpressly stated in this notice, no other rights or licenses, express or\nimplied, are granted by Apple herein, including but not limited to any\npatent rights that may be infringed by your derivative works or by other\nworks in which the Apple Software may be incorporated.\n\nThe Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\nMAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\nTHE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\nOPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n\nIN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\nMODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\nAND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\nSTRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/LICENSE.meta",
    "content": "fileFormatVersion: 2\nguid: d4243f69ce2ed40308c95ee95743a0cb\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/README.md",
    "content": "Unity Core ML Stable Diffusion Plugin\n=====================================\n\n![gif](https://user-images.githubusercontent.com/343936/228759539-a35a37f2-77d6-4a10-8392-d875b968fea6.gif)\n\nStable Diffusion plugin for Unity, based on [Apple's Core ML port]. You can run\nthe model on-editor and at-runtime without needing any extra components.\n\n[Apple's Core ML port]: https://github.com/apple/ml-stable-diffusion\n\nSystem Requirements\n-------------------\n\n- Unity 2023.1 or later\n- Apple Silicon Mac (editor/runtime support) with macOS 13.1 or later\n- iPad Pro with Apple silicon (runtime support) with iOS 16.2 or later\n\nAlthough the plugin supports iOS, it requires huge amount of memory to run the\nmodel, so it only supports memory-rich iPad models.\n\nHow To Try\n----------\n\nBefore running the sample project, you must put the model files in the\n`Assets/StreamingAssets` directory.\n\n- Clone or download the [pre-converted Stable Diffusion 2 model repository].\n- Copy the `split_einsum/compiled` directory into `Assets/StreamingAssets`.\n- Rename the directory to `StableDiffusion`.\n\n[pre-converted Stable Diffusion 2 model repository]:\n  https://huggingface.co/apple/coreml-stable-diffusion-2-base\n\nIt takes a long time (a few minutes) for the first run. After this\ninitialization step, it only takes a few tens of seconds to generate an image.\n\nPerformance Considerations\n--------------------------\n\nYou can change which processing unit it uses by switching the \"Compute Units\"\nproperty in the Tester component.\n\nIt depends on the device model to choose the best option:\n\n- M1/M2 Mac and iOS: GPUs in those devices are not powerful enough, so you\n  should select \"CPU and NE\" (Neural Engine) or \"All\".\n- M1/M2 Pro/Max Mac: GPUs in those devices have enough processing power\n  compared to NE, so \"CPU and GPU\" can be a better option.\n\nWhen using \"CPU and GPU\" mode, you must use the \"original\" model instead of\nthe \"split_einsum\" model. Please overwrite the `StreamingAssets/StableDiffusion`\ndirectory with the `original/compiled` directory.\n\nLCM (SD-Turbo) Support\n----------------------\n\nYou can use [SD-Turbo] or other LCMs (latent consistency models) with setting\n`Pipeline.Scheduler` to `Lcm`. You might also have to change `StepCount` to 1\\~4\nand `GuidanceScale` to 1\\~2. Please refer to the model description to know the\ncorrect settings.\n\nYou can download the [pre-converted SD-Turbo model] from my Hugging Face\nrepository.\n\n[SD-Turbo]: https://huggingface.co/stabilityai/sd-turbo\n[pre-converted SD-Turbo model]:\n  https://huggingface.co/keijiro-tk/coreml-sd-turbo\n\nSample Projects\n---------------\n\n![gif](https://user-images.githubusercontent.com/343936/228760795-9e712684-2ee6-4e63-9241-06d8aa125a17.gif)\n\n- [Flipbook3](https://github.com/keijiro/Flipbook3): Running the image-to-image\n  pipeline with a real-time 3D scene.\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/README.md.meta",
    "content": "fileFormatVersion: 2\nguid: f7df32e0c538641d0ab92aa1cbef1d32\nTextScriptImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/MLStableDiffusion.asmdef",
    "content": "{\n    \"name\": \"MLStableDiffusion\",\n    \"rootNamespace\": \"\",\n    \"references\": [],\n    \"includePlatforms\": [\n        \"Editor\",\n        \"iOS\",\n        \"macOSStandalone\",\n        \"macOSStandaloneServer\"\n    ],\n    \"excludePlatforms\": [],\n    \"allowUnsafeCode\": true,\n    \"overrideReferences\": false,\n    \"precompiledReferences\": [],\n    \"autoReferenced\": true,\n    \"defineConstraints\": [],\n    \"versionDefines\": [],\n    \"noEngineReferences\": false\n}"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/MLStableDiffusion.asmdef.meta",
    "content": "fileFormatVersion: 2\nguid: 672e15718a4504ac48f62b8b7906bee8\nAssemblyDefinitionImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Pipeline.cs",
    "content": "using Unity.Collections;\nusing UnityEngine.Rendering;\nusing UnityEngine;\nusing CancellationToken = System.Threading.CancellationToken;\n\nnamespace MLStableDiffusion {\n\npublic sealed class Pipeline : System.IDisposable\n{\n    #region Public properties\n\n    public int Width { get; private set; }\n    public int Height { get; private set; }\n    public string Prompt { get; set; }\n    public float Strength { get; set; }\n    public Scheduler Scheduler { get; set; }\n    public int StepCount { get; set; }\n    public int Seed { get; set; }\n    public float GuidanceScale { get; set; }\n\n    #endregion\n\n    #region Private members\n\n    Plugin _plugin;\n    ComputeShader _preprocess;\n    (GraphicsBuffer reorder, NativeArray<byte> source, Texture2D output) _buffer;\n\n    // Async readback from a GPU backed texture into a NativeArray\n    async Awaitable ReadbackSourceAsync(Texture source)\n    {\n        // Is gamma decompression needed?\n        var isLinear = QualitySettings.activeColorSpace == ColorSpace.Linear;\n\n        // Reordering compute shader invocation\n        _preprocess.SetTexture(0, \"Input\", source);\n        _preprocess.SetBuffer(0, \"Output\", _buffer.reorder);\n        _preprocess.SetInts(\"Size\", Width, Height);\n        _preprocess.SetBool(\"IsLinear\", isLinear);\n        _preprocess.Dispatch(0, Width / 4 / 8, Height / 8, 1);\n\n        // Async readback\n        await AsyncGPUReadback.\n           RequestIntoNativeArrayAsync(ref _buffer.source, _buffer.reorder);\n    }\n\n    #endregion\n\n    #region Public members\n\n    public Pipeline(ComputeShader preprocess)\n      => _preprocess = preprocess;\n\n    public void Dispose()\n    {\n        _buffer.reorder?.Release();\n        _buffer.reorder = null;\n\n        if (_buffer.source.IsCreated) _buffer.source.Dispose();\n\n        if (_buffer.output != null) Object.Destroy(_buffer.output);\n        _buffer.output = null;\n\n        _plugin?.Dispose();\n        _plugin = null;\n    }\n\n    public async Awaitable InitializeAsync(ResourceInfo res, ComputeUnits units)\n    {\n        // Model information\n        Width = res.ModelWidth;\n        Height = res.ModelHeight;\n\n        // Buffer allocation\n        _buffer.reorder = new GraphicsBuffer(GraphicsBuffer.Target.Structured,\n                                             Width * Height * 3 / 4, 4);\n        _buffer.source = new NativeArray<byte>(Width * Height * 3, Allocator.Persistent,\n                                               NativeArrayOptions.UninitializedMemory);\n        _buffer.output = new Texture2D(Width, Height, TextureFormat.RGB24, false);\n\n        // Pipeline initialization on the background thread\n        await Awaitable.BackgroundThreadAsync();\n        _plugin = Plugin.Create(res.ModelPath, units);\n        await Awaitable.MainThreadAsync();\n    }\n\n    public async Awaitable RunAsync\n      (Texture source, RenderTexture dest, CancellationToken cancel)\n    {\n        // Pipeline configuration\n        _plugin.SetConfig(Prompt, Scheduler, StepCount, Seed, GuidanceScale);\n\n        // Source texture async readback\n        if (source) await ReadbackSourceAsync(source);\n\n        // Run the pipeline on the background thread.\n        await Awaitable.BackgroundThreadAsync();\n\n        if (source)\n            _plugin.RunGeneratorFromImage(_buffer.source.AsReadOnlySpan(), Width, Height, Strength);\n        else\n            _plugin.RunGenerator();\n\n        await Awaitable.MainThreadAsync();\n        cancel.ThrowIfCancellationRequested();\n\n        // Load into a temporary texture and flip it into the destination.\n        _buffer.output.LoadRawTextureData(_plugin.ImageBufferPointer, Width * Height * 3);\n        _buffer.output.Apply();\n        Graphics.Blit(_buffer.output, dest, new Vector2(1, -1), new Vector2(0, 1));\n    }\n\n    #endregion\n}\n\n} // namespace MLStableDiffusion\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Pipeline.cs.meta",
    "content": "fileFormatVersion: 2\nguid: f367b86f5710e4616b782648e19d45d1\nMonoImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  defaultReferences: []\n  executionOrder: 0\n  icon: {instanceID: 0}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Plugin.cs",
    "content": "using System.Runtime.InteropServices;\nusing IntPtr = System.IntPtr;\nusing Microsoft.Win32.SafeHandles;\nusing System;\n\nnamespace MLStableDiffusion {\n\npublic enum ComputeUnits { Cpu, CpuAndGpu, All, CpuAndNE }\npublic enum Scheduler { Pndm, Dpmpp, Lcm }\n\npublic class Plugin : SafeHandleZeroOrMinusOneIsInvalid\n{\n    #region SafeHandle implementation\n\n    Plugin() : base(true) {}\n\n    protected override bool ReleaseHandle()\n    {\n        _Destroy(handle);\n        return true;\n    }\n\n    #endregion\n\n    #region Public methods\n\n    public static Plugin Create(string resourcePath, ComputeUnits units)\n      => _Create(resourcePath, (int)units);\n\n    public void SetConfig\n      (string prompt, Scheduler scheduler, int steps, int seed, float guidance)\n      => _SetConfig(this, prompt, (int)scheduler, steps, seed, guidance);\n\n    public void RunGenerator()\n      => _Generate(this);\n\n    public unsafe void RunGeneratorFromImage\n      (ReadOnlySpan<byte> image, int width, int height, float strength)\n    {\n        fixed (byte* ptr = image)\n          _GenerateFromImage(this, (IntPtr)ptr, width, height, strength);\n    }\n\n    public IntPtr ImageBufferPointer\n      => _GetImage(this);\n\n    #endregion\n\n    #region Unmanaged interface\n\n#if UNITY_IOS && !UNITY_EDITOR\n    const string DllName = \"__Internal\";\n#else\n    const string DllName = \"StableDiffusionPlugin\";\n#endif\n\n    [DllImport(DllName, EntryPoint = \"SDCreate\")]\n    static extern Plugin _Create(string resourcePath, int computeUnits);\n\n    [DllImport(DllName, EntryPoint = \"SDSetConfig\")]\n    static extern void _SetConfig\n      (Plugin self, string prompt,\n       int scheduler, int steps, int seed, float guidance);\n\n    [DllImport(DllName, EntryPoint = \"SDGenerate\")]\n    static extern void _Generate(Plugin self);\n\n    [DllImport(DllName, EntryPoint = \"SDGenerateFromImage\")]\n    static extern void _GenerateFromImage\n      (Plugin self, IntPtr image, int width, int height, float strength);\n\n    [DllImport(DllName, EntryPoint = \"SDGetImage\")]\n    static extern IntPtr _GetImage(Plugin self);\n\n    [DllImport(DllName, EntryPoint = \"SDDestroy\")]\n    static extern void _Destroy(IntPtr self);\n\n    #endregion\n}\n\n} // namespace MLStableDiffusion\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Plugin.cs.meta",
    "content": "fileFormatVersion: 2\nguid: 84a57271a519042d78360dbe7f909445\nMonoImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  defaultReferences: []\n  executionOrder: 0\n  icon: {instanceID: 0}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Preprocess.compute",
    "content": "#pragma kernel Preprocess\n\n// Input\nsampler2D Input;\nuint2 Size;\nbool IsLinear;\n\n// Output\nRWStructuredBuffer<uint> Output;\n\n// Color space conversion between sRGB and linear space.\n// http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\nfloat3 Preprocess_LinearToSRGB(float3 c)\n{\n    return max(1.055 * pow(saturate(c), 0.416666667) - 0.055, 0.0);\n}\n\nuint Float4ToByte4AsUInt(float4 v)\n{\n    uint4 i = v * 255;\n    return i.x + (i.y << 8) + (i.z << 16) + (i.w << 24);\n}\n\nfloat3 SampleInput(uint x, uint y)\n{\n    // UV (vertically flipped)\n    float2 uv = float2(0.5 + x, Size.y - 0.5 - y) / Size;\n\n    // UV gradients\n    float2 duv_dx = float2(1.0 / Size.x, 0);\n    float2 duv_dy = float2(0, -1.0 / Size.y);\n\n    // Texture sample\n    float3 rgb = tex2Dgrad(Input, uv, duv_dx, duv_dy).rgb;\n    if (IsLinear) rgb = Preprocess_LinearToSRGB(rgb);\n\n    return rgb;\n}\n\n[numthreads(8, 8, 1)]\nvoid Preprocess(uint2 id : SV_DispatchThreadID)\n{\n    uint x = id.x * 4;\n    uint y = id.y;\n\n    float3 s1 = SampleInput(x + 0, y);\n    float3 s2 = SampleInput(x + 1, y);\n    float3 s3 = SampleInput(x + 2, y);\n    float3 s4 = SampleInput(x + 3, y);\n\n    uint addr = (y * Size.x / 4 + id.x) * 3;\n    Output[addr + 0] = Float4ToByte4AsUInt(float4(s1.xyz, s2.x));\n    Output[addr + 1] = Float4ToByte4AsUInt(float4(s2.yz, s3.xy));\n    Output[addr + 2] = Float4ToByte4AsUInt(float4(s3.z, s4.xyz));\n}\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/Preprocess.compute.meta",
    "content": "fileFormatVersion: 2\nguid: 7c06db8e339994c05bc2ad5e44c940de\nComputeShaderImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/ResourceInfo.cs",
    "content": "namespace MLStableDiffusion {\n\npublic readonly struct ResourceInfo\n{\n    public readonly string ModelPath;\n    public readonly int ModelWidth;\n    public readonly int ModelHeight;\n\n    ResourceInfo(string path, int width, int height)\n    {\n        ModelPath = path;\n        ModelWidth = width;\n        ModelHeight = height;\n    }\n\n    public static implicit operator ResourceInfo(string path)\n      => new ResourceInfo(path, 512, 512);\n\n    public static ResourceInfo FixedSizeModel(string path, int width, int height)\n      => new ResourceInfo(path, width, height);\n}\n\n} // namespace MLStableDiffusion\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/ResourceInfo.cs.meta",
    "content": "fileFormatVersion: 2\nguid: efb4a975c8b8d4052aecd75ad075838d\nMonoImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  defaultReferences: []\n  executionOrder: 0\n  icon: {instanceID: 0}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/iOS/StableDiffusionPlugin.framework.meta",
    "content": "fileFormatVersion: 2\nguid: 8a1d754a030f643529fc8a230efbb0fd\nPluginImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  iconMap: {}\n  executionOrder: {}\n  defineConstraints: []\n  isPreloaded: 0\n  isOverridable: 0\n  isExplicitlyReferenced: 0\n  validateReferences: 1\n  platformData:\n  - first:\n      : Any\n    second:\n      enabled: 0\n      settings:\n        Exclude Editor: 1\n        Exclude Linux64: 1\n        Exclude OSXUniversal: 1\n        Exclude Win: 1\n        Exclude Win64: 1\n        Exclude iOS: 0\n  - first:\n      Any: \n    second:\n      enabled: 0\n      settings: {}\n  - first:\n      Editor: Editor\n    second:\n      enabled: 0\n      settings:\n        CPU: AnyCPU\n        DefaultValueInitialized: true\n        OS: AnyOS\n  - first:\n      Standalone: Linux64\n    second:\n      enabled: 0\n      settings:\n        CPU: None\n  - first:\n      Standalone: OSXUniversal\n    second:\n      enabled: 0\n      settings:\n        CPU: None\n  - first:\n      Standalone: Win\n    second:\n      enabled: 0\n      settings:\n        CPU: None\n  - first:\n      Standalone: Win64\n    second:\n      enabled: 0\n      settings:\n        CPU: None\n  - first:\n      iPhone: iOS\n    second:\n      enabled: 1\n      settings:\n        AddToEmbeddedBinaries: true\n        CPU: AnyCPU\n        CompileFlags: \n        FrameworkDependencies: \n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/iOS.meta",
    "content": "fileFormatVersion: 2\nguid: 9f3358e5221834d7994dde8dd9a8a9b4\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/macOS/libStableDiffusionPlugin.dylib.meta",
    "content": "fileFormatVersion: 2\nguid: 1447006e087fc452c8cc7167d5ec5436\nPluginImporter:\n  externalObjects: {}\n  serializedVersion: 2\n  iconMap: {}\n  executionOrder: {}\n  defineConstraints: []\n  isPreloaded: 0\n  isOverridable: 0\n  isExplicitlyReferenced: 0\n  validateReferences: 1\n  platformData:\n  - first:\n      Any: \n    second:\n      enabled: 0\n      settings: {}\n  - first:\n      Editor: Editor\n    second:\n      enabled: 1\n      settings:\n        DefaultValueInitialized: true\n  - first:\n      Standalone: OSXUniversal\n    second:\n      enabled: 1\n      settings:\n        CPU: AnyCPU\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime/macOS.meta",
    "content": "fileFormatVersion: 2\nguid: aa13cf6dd7f174a54903ad2e36fa456f\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/Runtime.meta",
    "content": "fileFormatVersion: 2\nguid: a6bd89b5f5a1a4590878b4d824248c59\nfolderAsset: yes\nDefaultImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/package.json",
    "content": "{\n    \"author\": \"Keijiro Takahashi\",\n    \"dependencies\": {},\n    \"description\": \"Stable Diffusion plugin based on Apple's Core ML port\",\n    \"displayName\": \"Core ML Stable Diffusion\",\n    \"keywords\": [ \"unity\" ],\n    \"license\": \"SEE LICENSE in LICENSE\",\n    \"name\": \"jp.keijiro.ml-stable-diffusion\",\n    \"unity\": \"6000.0\",\n    \"unityRelease\": \"0f1\",\n    \"version\": \"1.5.0\"\n}\n"
  },
  {
    "path": "Packages/jp.keijiro.ml-stable-diffusion/package.json.meta",
    "content": "fileFormatVersion: 2\nguid: 31ed9f4181cec4838a72ab5738764629\nPackageManifestImporter:\n  externalObjects: {}\n  userData: \n  assetBundleName: \n  assetBundleVariant: \n"
  },
  {
    "path": "Packages/manifest.json",
    "content": "{\n  \"dependencies\": {\n    \"jp.keijiro.klak.testtools\": \"3.1.0\",\n    \"com.unity.modules.uielements\": \"1.0.0\"\n  },\n  \"scopedRegistries\": [\n    {\n      \"name\": \"Keijiro\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [\n        \"jp.keijiro\"\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "Packages/packages-lock.json",
    "content": "{\n  \"dependencies\": {\n    \"jp.keijiro.klak.testtools\": {\n      \"version\": \"3.1.0\",\n      \"depth\": 0,\n      \"source\": \"registry\",\n      \"dependencies\": {\n        \"com.unity.modules.audio\": \"1.0.0\",\n        \"com.unity.modules.unitywebrequest\": \"1.0.0\",\n        \"com.unity.modules.unitywebrequesttexture\": \"1.0.0\",\n        \"com.unity.modules.video\": \"1.0.0\"\n      },\n      \"url\": \"https://registry.npmjs.com\"\n    },\n    \"jp.keijiro.ml-stable-diffusion\": {\n      \"version\": \"file:jp.keijiro.ml-stable-diffusion\",\n      \"depth\": 0,\n      \"source\": \"embedded\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.audio\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.hierarchycore\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.imageconversion\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 2,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.imgui\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.jsonserialize\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.ui\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.uielements\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 0,\n      \"source\": \"builtin\",\n      \"dependencies\": {\n        \"com.unity.modules.ui\": \"1.0.0\",\n        \"com.unity.modules.imgui\": \"1.0.0\",\n        \"com.unity.modules.jsonserialize\": \"1.0.0\",\n        \"com.unity.modules.hierarchycore\": \"1.0.0\"\n      }\n    },\n    \"com.unity.modules.unitywebrequest\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {}\n    },\n    \"com.unity.modules.unitywebrequesttexture\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {\n        \"com.unity.modules.unitywebrequest\": \"1.0.0\",\n        \"com.unity.modules.imageconversion\": \"1.0.0\"\n      }\n    },\n    \"com.unity.modules.video\": {\n      \"version\": \"1.0.0\",\n      \"depth\": 1,\n      \"source\": \"builtin\",\n      \"dependencies\": {\n        \"com.unity.modules.audio\": \"1.0.0\",\n        \"com.unity.modules.ui\": \"1.0.0\",\n        \"com.unity.modules.unitywebrequest\": \"1.0.0\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "Plugin/Package.resolved",
    "content": "{\n  \"pins\" : [\n    {\n      \"identity\" : \"ml-stable-diffusion\",\n      \"kind\" : \"remoteSourceControl\",\n      \"location\" : \"https://github.com/keijiro/ml-stable-diffusion.git\",\n      \"state\" : {\n        \"revision\" : \"996a58170bb2bb22e0105eb687842c4d1b9231a5\",\n        \"version\" : \"1.2.0\"\n      }\n    },\n    {\n      \"identity\" : \"swift-argument-parser\",\n      \"kind\" : \"remoteSourceControl\",\n      \"location\" : \"https://github.com/apple/swift-argument-parser.git\",\n      \"state\" : {\n        \"revision\" : \"fddd1c00396eed152c45a46bea9f47b98e59301d\",\n        \"version\" : \"1.2.0\"\n      }\n    }\n  ],\n  \"version\" : 2\n}\n"
  },
  {
    "path": "Plugin/Package.swift",
    "content": "// swift-tools-version: 5.7\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"StableDiffusionPlugin\",\n    platforms: [\n        .macOS(\"13.1\"),\n        .iOS(\"16.2\")\n    ],\n    products: [\n        .library(\n            name: \"StableDiffusionPlugin\",\n            type: .dynamic,\n            targets: [\"StableDiffusionPlugin\"]),\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/keijiro/ml-stable-diffusion.git\", from: \"1.2.0\")\n    ],\n    targets: [\n        .target(\n            name: \"StableDiffusionPlugin\",\n            dependencies: [\n                .product(name: \"StableDiffusion\", package: \"ml-stable-diffusion\")\n            ])\n    ]\n)\n"
  },
  {
    "path": "Plugin/Sources/StableDiffusionPlugin/StableDiffusionPlugin.swift",
    "content": "import CoreML\nimport Accelerate\nimport StableDiffusion\n\nfinal class Plugin {\n\n    var pipeline: StableDiffusionPipeline\n\n    var config: StableDiffusionPipeline.Configuration\n\n    var generated: CGImage?\n\n    // Create a pipeline and load resources into it\n    init(resourcePath: String, computeUnits: MLComputeUnits) throws {\n        // Compute unit selection (all)\n        let mlConfig = MLModelConfiguration()\n        mlConfig.computeUnits = computeUnits\n\n        // Pipeline initialization\n        let resourceURL = URL(filePath: resourcePath)\n        pipeline = try StableDiffusionPipeline(\n            resourcesAt: resourceURL,\n            controlNet: [],\n            configuration: mlConfig,\n            disableSafety: true,\n            reduceMemory: false)\n        try pipeline.loadResources()\n\n        // Initial configuration\n        config = StableDiffusionPipeline.Configuration(prompt: \"\")\n    }\n\n    // Run the pipeline and generate an image\n    func runGenerator() throws {\n        let images = try pipeline.generateImages(configuration: config)\n        generated = images[0]!\n    }\n}\n\n@_cdecl(\"SDCreate\")\npublic func SDCreate(resourcePath: OpaquePointer, units: CInt) -> OpaquePointer! {\n    let resourcePath = String(cString: UnsafePointer<CChar>(resourcePath))\n    let units = MLComputeUnits(rawValue: Int(units))!\n    if let plugin = try? Plugin(resourcePath: resourcePath, computeUnits: units) {\n        return OpaquePointer(Unmanaged.passRetained(plugin).toOpaque())\n    }\n    return nil;\n}\n\n@_cdecl(\"SDSetConfig\")\npublic func SDSetConfig(\n    _ plugin: OpaquePointer,\n    prompt: OpaquePointer,\n    scheduler: CInt,\n    stepCount: CInt,\n    seed: CInt,\n    guidanceScale: CFloat\n) {\n    let plugin = Unmanaged<Plugin>.fromOpaque(UnsafeRawPointer(plugin)).takeUnretainedValue()\n    plugin.config.prompt = String(cString: UnsafePointer<CChar>(prompt))\n    plugin.config.schedulerType = StableDiffusionScheduler(rawValue: Int(scheduler))!\n    plugin.config.stepCount = Int(stepCount)\n    plugin.config.seed = UInt32(seed)\n    plugin.config.guidanceScale = guidanceScale\n}\n\n@_cdecl(\"SDGenerate\")\npublic func SDGenerate(_ plugin: OpaquePointer) {\n    let plugin = Unmanaged<Plugin>.fromOpaque(UnsafeRawPointer(plugin)).takeUnretainedValue()\n    try? plugin.runGenerator()\n}\n\n@_cdecl(\"SDGenerateFromImage\")\npublic func SDGenerateFromImage(\n    _ plugin: OpaquePointer,\n    image: OpaquePointer,\n    width: CInt,\n    height: CInt,\n    strength: CFloat\n) {\n    let plugin = Unmanaged<Plugin>.fromOpaque(UnsafeRawPointer(plugin)).takeUnretainedValue()\n    let pointer = UnsafeMutableRawPointer(image)\n\n    // Raw pointer to CGImage object\n    let buffer = vImage.PixelBuffer<vImage.Interleaved8x3>(\n        data: pointer,\n        width: Int(width),\n        height: Int(height),\n        byteCountPerRow: Int(width) * 3)\n    let format = vImage_CGImageFormat(\n        bitsPerComponent: 8,\n        bitsPerPixel: 3 * 8,\n        colorSpace: CGColorSpaceCreateDeviceRGB(),\n        bitmapInfo: CGBitmapInfo(rawValue: CGImageAlphaInfo.none.rawValue))!\n    let cgImage = buffer.makeCGImage(cgImageFormat: format)!\n\n    // img2img run\n    plugin.config.startingImage = cgImage\n    plugin.config.strength = strength\n    try? plugin.runGenerator()\n}\n\n@_cdecl(\"SDGetImage\")\npublic func SDGetImage(_ plugin: OpaquePointer) -> OpaquePointer! {\n    let plugin = Unmanaged<Plugin>.fromOpaque(UnsafeRawPointer(plugin)).takeUnretainedValue()\n    return OpaquePointer(CFDataGetBytePtr(plugin.generated!.dataProvider!.data))\n}\n\n@_cdecl(\"SDDestroy\")\npublic func SDDestroy(_ plugin: OpaquePointer) {\n    _ = Unmanaged<Plugin>.fromOpaque(UnsafeRawPointer(plugin)).takeRetainedValue()\n}\n"
  },
  {
    "path": "Plugin/build.sh",
    "content": "#!/bin/sh -e -x\n\nMODE=\"Release\"\nMODE_LOW=`echo $MODE | tr '[:upper:]' '[:lower:]'`\n\nDEST='../Packages/jp.keijiro.ml-stable-diffusion/Runtime'\n\n# Build directory removal\n#rm -rf .build\n#rm -rf .xcodebuild\n\n# macOS binary build using SPM\nswift build -c $MODE_LOW --arch arm64 --arch x86_64\n\n# iOS binary build using Xcode\nxcodebuild build -scheme StableDiffusionPlugin -configuration $MODE -sdk iphoneos \\\n -destination generic/platform=iOS -derivedDataPath .xcodebuild ENABLE_BITCODE=YES\n\n# Binary copy to the destination\ncp -f .build/apple/Products/$MODE/libStableDiffusionPlugin.dylib $DEST/macOS\ncp -rf .xcodebuild/Build/Products/$MODE-iphoneos/PackageFrameworks/StableDiffusionPlugin.framework $DEST/iOS\n"
  },
  {
    "path": "ProjectSettings/AudioManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!11 &1\nAudioManager:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  m_Volume: 1\n  Rolloff Scale: 1\n  Doppler Factor: 1\n  Default Speaker Mode: 2\n  m_SampleRate: 0\n  m_DSPBufferSize: 1024\n  m_VirtualVoiceCount: 512\n  m_RealVoiceCount: 32\n  m_SpatializerPlugin: \n  m_AmbisonicDecoderPlugin: \n  m_DisableAudio: 0\n  m_VirtualizeEffects: 1\n  m_RequestedDSPBufferSize: 1024\n"
  },
  {
    "path": "ProjectSettings/ClusterInputManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!236 &1\nClusterInputManager:\n  m_ObjectHideFlags: 0\n  m_Inputs: []\n"
  },
  {
    "path": "ProjectSettings/DynamicsManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!55 &1\nPhysicsManager:\n  m_ObjectHideFlags: 0\n  serializedVersion: 11\n  m_Gravity: {x: 0, y: -9.81, z: 0}\n  m_DefaultMaterial: {fileID: 0}\n  m_BounceThreshold: 2\n  m_SleepThreshold: 0.005\n  m_DefaultContactOffset: 0.01\n  m_DefaultSolverIterations: 6\n  m_DefaultSolverVelocityIterations: 1\n  m_QueriesHitBackfaces: 0\n  m_QueriesHitTriggers: 1\n  m_EnableAdaptiveForce: 0\n  m_ClothInterCollisionDistance: 0\n  m_ClothInterCollisionStiffness: 0\n  m_ContactsGeneration: 1\n  m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n  m_AutoSimulation: 1\n  m_AutoSyncTransforms: 0\n  m_ReuseCollisionCallbacks: 1\n  m_ClothInterCollisionSettingsToggle: 0\n  m_ContactPairsMode: 0\n  m_BroadphaseType: 0\n  m_WorldBounds:\n    m_Center: {x: 0, y: 0, z: 0}\n    m_Extent: {x: 250, y: 250, z: 250}\n  m_WorldSubdivisions: 8\n  m_FrictionType: 0\n  m_EnableEnhancedDeterminism: 0\n  m_EnableUnifiedHeightmaps: 1\n  m_DefaultMaxAngluarSpeed: 7\n"
  },
  {
    "path": "ProjectSettings/EditorBuildSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!1045 &1\nEditorBuildSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  m_Scenes:\n  - enabled: 1\n    path: Assets/Scenes/Benchmark.unity\n    guid: f52ee04921bed461ea030da3929e2ad5\n  m_configObjects: {}\n  m_UseUCBPForAssetBundles: 0\n"
  },
  {
    "path": "ProjectSettings/EditorSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!159 &1\nEditorSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 11\n  m_SerializationMode: 2\n  m_LineEndingsForNewScripts: 1\n  m_DefaultBehaviorMode: 0\n  m_PrefabRegularEnvironment: {fileID: 0}\n  m_PrefabUIEnvironment: {fileID: 0}\n  m_SpritePackerMode: 0\n  m_SpritePackerPaddingPower: 1\n  m_Bc7TextureCompressor: 0\n  m_EtcTextureCompressorBehavior: 1\n  m_EtcTextureFastCompressor: 1\n  m_EtcTextureNormalCompressor: 2\n  m_EtcTextureBestCompressor: 4\n  m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref\n  m_ProjectGenerationRootNamespace: \n  m_EnableTextureStreamingInEditMode: 1\n  m_EnableTextureStreamingInPlayMode: 1\n  m_AsyncShaderCompilation: 1\n  m_CachingShaderPreprocessor: 1\n  m_PrefabModeAllowAutoSave: 1\n  m_EnterPlayModeOptionsEnabled: 1\n  m_EnterPlayModeOptions: 3\n  m_GameObjectNamingDigits: 1\n  m_GameObjectNamingScheme: 0\n  m_AssetNamingUsesSpace: 1\n  m_UseLegacyProbeSampleCount: 0\n  m_SerializeInlineMappingsOnOneLine: 1\n  m_DisableCookiesInLightmapper: 0\n  m_AssetPipelineMode: 1\n  m_RefreshImportMode: 0\n  m_CacheServerMode: 0\n  m_CacheServerEndpoint: \n  m_CacheServerNamespacePrefix: default\n  m_CacheServerEnableDownload: 1\n  m_CacheServerEnableUpload: 1\n  m_CacheServerEnableAuth: 0\n  m_CacheServerEnableTls: 0\n  m_CacheServerValidationMode: 2\n  m_CacheServerDownloadBatchSize: 128\n"
  },
  {
    "path": "ProjectSettings/GraphicsSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!30 &1\nGraphicsSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 13\n  m_Deferred:\n    m_Mode: 1\n    m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}\n  m_DeferredReflections:\n    m_Mode: 1\n    m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}\n  m_ScreenSpaceShadows:\n    m_Mode: 1\n    m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}\n  m_LegacyDeferred:\n    m_Mode: 1\n    m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}\n  m_DepthNormals:\n    m_Mode: 1\n    m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}\n  m_MotionVectors:\n    m_Mode: 1\n    m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}\n  m_LightHalo:\n    m_Mode: 1\n    m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}\n  m_LensFlare:\n    m_Mode: 1\n    m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}\n  m_AlwaysIncludedShaders:\n  - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}\n  - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}\n  - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}\n  - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}\n  - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}\n  - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}\n  m_PreloadedShaders: []\n  m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,\n    type: 0}\n  m_CustomRenderPipeline: {fileID: 0}\n  m_TransparencySortMode: 0\n  m_TransparencySortAxis: {x: 0, y: 0, z: 1}\n  m_DefaultRenderingPath: 1\n  m_DefaultMobileRenderingPath: 1\n  m_TierSettings: []\n  m_LightmapStripping: 0\n  m_FogStripping: 0\n  m_InstancingStripping: 0\n  m_LightmapKeepPlain: 1\n  m_LightmapKeepDirCombined: 1\n  m_LightmapKeepDynamicPlain: 1\n  m_LightmapKeepDynamicDirCombined: 1\n  m_LightmapKeepShadowMask: 1\n  m_LightmapKeepSubtractive: 1\n  m_FogKeepLinear: 1\n  m_FogKeepExp: 1\n  m_FogKeepExp2: 1\n  m_AlbedoSwatchInfos: []\n  m_LightsUseLinearIntensity: 0\n  m_LightsUseColorTemperature: 0\n  m_LogWhenShaderIsCompiled: 0\n  m_AllowEnlightenSupportForUpgradedProject: 0\n"
  },
  {
    "path": "ProjectSettings/InputManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!13 &1\nInputManager:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  m_Axes:\n  - serializedVersion: 3\n    m_Name: Horizontal\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: left\n    positiveButton: right\n    altNegativeButton: a\n    altPositiveButton: d\n    gravity: 3\n    dead: 0.001\n    sensitivity: 3\n    snap: 1\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Vertical\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: down\n    positiveButton: up\n    altNegativeButton: s\n    altPositiveButton: w\n    gravity: 3\n    dead: 0.001\n    sensitivity: 3\n    snap: 1\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire1\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: left ctrl\n    altNegativeButton: \n    altPositiveButton: mouse 0\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire2\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: left alt\n    altNegativeButton: \n    altPositiveButton: mouse 1\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire3\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: left shift\n    altNegativeButton: \n    altPositiveButton: mouse 2\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Jump\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: space\n    altNegativeButton: \n    altPositiveButton: \n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Mouse X\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: \n    altNegativeButton: \n    altPositiveButton: \n    gravity: 0\n    dead: 0\n    sensitivity: 0.1\n    snap: 0\n    invert: 0\n    type: 1\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Mouse Y\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: \n    altNegativeButton: \n    altPositiveButton: \n    gravity: 0\n    dead: 0\n    sensitivity: 0.1\n    snap: 0\n    invert: 0\n    type: 1\n    axis: 1\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Mouse ScrollWheel\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: \n    altNegativeButton: \n    altPositiveButton: \n    gravity: 0\n    dead: 0\n    sensitivity: 0.1\n    snap: 0\n    invert: 0\n    type: 1\n    axis: 2\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Horizontal\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: \n    altNegativeButton: \n    altPositiveButton: \n    gravity: 0\n    dead: 0.19\n    sensitivity: 1\n    snap: 0\n    invert: 0\n    type: 2\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Vertical\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: \n    altNegativeButton: \n    altPositiveButton: \n    gravity: 0\n    dead: 0.19\n    sensitivity: 1\n    snap: 0\n    invert: 1\n    type: 2\n    axis: 1\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire1\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: joystick button 0\n    altNegativeButton: \n    altPositiveButton: \n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire2\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: joystick button 1\n    altNegativeButton: \n    altPositiveButton: \n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Fire3\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: joystick button 2\n    altNegativeButton: \n    altPositiveButton: \n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Jump\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: joystick button 3\n    altNegativeButton: \n    altPositiveButton: \n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Submit\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: return\n    altNegativeButton: \n    altPositiveButton: joystick button 0\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Submit\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: enter\n    altNegativeButton: \n    altPositiveButton: space\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n  - serializedVersion: 3\n    m_Name: Cancel\n    descriptiveName: \n    descriptiveNegativeName: \n    negativeButton: \n    positiveButton: escape\n    altNegativeButton: \n    altPositiveButton: joystick button 1\n    gravity: 1000\n    dead: 0.001\n    sensitivity: 1000\n    snap: 0\n    invert: 0\n    type: 0\n    axis: 0\n    joyNum: 0\n"
  },
  {
    "path": "ProjectSettings/MemorySettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!387306366 &1\nMemorySettings:\n  m_ObjectHideFlags: 0\n  m_EditorMemorySettings:\n    m_MainAllocatorBlockSize: -1\n    m_ThreadAllocatorBlockSize: -1\n    m_MainGfxBlockSize: -1\n    m_ThreadGfxBlockSize: -1\n    m_CacheBlockSize: -1\n    m_TypetreeBlockSize: -1\n    m_ProfilerBlockSize: -1\n    m_ProfilerEditorBlockSize: -1\n    m_BucketAllocatorGranularity: -1\n    m_BucketAllocatorBucketsCount: -1\n    m_BucketAllocatorBlockSize: -1\n    m_BucketAllocatorBlockCount: -1\n    m_ProfilerBucketAllocatorGranularity: -1\n    m_ProfilerBucketAllocatorBucketsCount: -1\n    m_ProfilerBucketAllocatorBlockSize: -1\n    m_ProfilerBucketAllocatorBlockCount: -1\n    m_TempAllocatorSizeMain: -1\n    m_JobTempAllocatorBlockSize: -1\n    m_BackgroundJobTempAllocatorBlockSize: -1\n    m_JobTempAllocatorReducedBlockSize: -1\n    m_TempAllocatorSizeGIBakingWorker: -1\n    m_TempAllocatorSizeNavMeshWorker: -1\n    m_TempAllocatorSizeAudioWorker: -1\n    m_TempAllocatorSizeCloudWorker: -1\n    m_TempAllocatorSizeGfx: -1\n    m_TempAllocatorSizeJobWorker: -1\n    m_TempAllocatorSizeBackgroundWorker: -1\n    m_TempAllocatorSizePreloadManager: -1\n  m_PlatformMemorySettings: {}\n"
  },
  {
    "path": "ProjectSettings/MultiplayerManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!655991488 &1\nMultiplayerManager:\n  m_ObjectHideFlags: 0\n  m_EnableMultiplayerRoles: 0\n  m_ActiveMultiplayerRole: 0\n"
  },
  {
    "path": "ProjectSettings/NavMeshAreas.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!126 &1\nNavMeshProjectSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  areas:\n  - name: Walkable\n    cost: 1\n  - name: Not Walkable\n    cost: 1\n  - name: Jump\n    cost: 2\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  - name: \n    cost: 1\n  m_LastAgentTypeID: -887442657\n  m_Settings:\n  - serializedVersion: 2\n    agentTypeID: 0\n    agentRadius: 0.5\n    agentHeight: 2\n    agentSlope: 45\n    agentClimb: 0.75\n    ledgeDropHeight: 0\n    maxJumpAcrossDistance: 0\n    minRegionArea: 2\n    manualCellSize: 0\n    cellSize: 0.16666667\n    manualTileSize: 0\n    tileSize: 256\n    accuratePlacement: 0\n    debug:\n      m_Flags: 0\n  m_SettingNames:\n  - Humanoid\n"
  },
  {
    "path": "ProjectSettings/PackageManagerSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &1\nMonoBehaviour:\n  m_ObjectHideFlags: 61\n  m_CorrespondingSourceObject: {fileID: 0}\n  m_PrefabInstance: {fileID: 0}\n  m_PrefabAsset: {fileID: 0}\n  m_GameObject: {fileID: 0}\n  m_Enabled: 1\n  m_EditorHideFlags: 0\n  m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}\n  m_Name: \n  m_EditorClassIdentifier: \n  m_EnablePreReleasePackages: 1\n  m_AdvancedSettingsExpanded: 1\n  m_ScopedRegistriesSettingsExpanded: 1\n  m_SeeAllPackageVersions: 0\n  m_DismissPreviewPackagesInUse: 0\n  oneTimeWarningShown: 1\n  oneTimeDeprecatedPopUpShown: 0\n  m_Registries:\n  - m_Id: main\n    m_Name: \n    m_Url: https://packages.unity.com\n    m_Scopes: []\n    m_IsDefault: 1\n    m_Capabilities: 7\n    m_ConfigSource: 0\n  - m_Id: scoped:project:Keijiro\n    m_Name: Keijiro\n    m_Url: https://registry.npmjs.com\n    m_Scopes:\n    - jp.keijiro\n    m_IsDefault: 0\n    m_Capabilities: 0\n    m_ConfigSource: 4\n  m_UserSelectedRegistryName: Keijiro\n  m_UserAddingNewScopedRegistry: 0\n  m_RegistryInfoDraft:\n    m_Modified: 0\n    m_ErrorMessage: \n    m_UserModificationsInstanceId: -836\n    m_OriginalInstanceId: -838\n  m_LoadAssets: 0\n"
  },
  {
    "path": "ProjectSettings/Physics2DSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!19 &1\nPhysics2DSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 4\n  m_Gravity: {x: 0, y: -9.81}\n  m_DefaultMaterial: {fileID: 0}\n  m_VelocityIterations: 8\n  m_PositionIterations: 3\n  m_VelocityThreshold: 1\n  m_MaxLinearCorrection: 0.2\n  m_MaxAngularCorrection: 8\n  m_MaxTranslationSpeed: 100\n  m_MaxRotationSpeed: 360\n  m_BaumgarteScale: 0.2\n  m_BaumgarteTimeOfImpactScale: 0.75\n  m_TimeToSleep: 0.5\n  m_LinearSleepTolerance: 0.01\n  m_AngularSleepTolerance: 2\n  m_DefaultContactOffset: 0.01\n  m_JobOptions:\n    serializedVersion: 2\n    useMultithreading: 0\n    useConsistencySorting: 0\n    m_InterpolationPosesPerJob: 100\n    m_NewContactsPerJob: 30\n    m_CollideContactsPerJob: 100\n    m_ClearFlagsPerJob: 200\n    m_ClearBodyForcesPerJob: 200\n    m_SyncDiscreteFixturesPerJob: 50\n    m_SyncContinuousFixturesPerJob: 50\n    m_FindNearestContactsPerJob: 100\n    m_UpdateTriggerContactsPerJob: 100\n    m_IslandSolverCostThreshold: 100\n    m_IslandSolverBodyCostScale: 1\n    m_IslandSolverContactCostScale: 10\n    m_IslandSolverJointCostScale: 10\n    m_IslandSolverBodiesPerJob: 50\n    m_IslandSolverContactsPerJob: 50\n  m_AutoSimulation: 1\n  m_QueriesHitTriggers: 1\n  m_QueriesStartInColliders: 1\n  m_CallbacksOnDisable: 1\n  m_ReuseCollisionCallbacks: 1\n  m_AutoSyncTransforms: 0\n  m_AlwaysShowColliders: 0\n  m_ShowColliderSleep: 1\n  m_ShowColliderContacts: 0\n  m_ShowColliderAABB: 0\n  m_ContactArrowScale: 0.2\n  m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}\n  m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}\n  m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}\n  m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}\n  m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n"
  },
  {
    "path": "ProjectSettings/PresetManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!1386491679 &1\nPresetManager:\n  m_ObjectHideFlags: 0\n  serializedVersion: 2\n  m_DefaultPresets: {}\n"
  },
  {
    "path": "ProjectSettings/ProjectSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!129 &1\nPlayerSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 27\n  productGUID: 8b239564e23c943da9b8964d882fb409\n  AndroidProfiler: 0\n  AndroidFilterTouchesWhenObscured: 0\n  AndroidEnableSustainedPerformanceMode: 0\n  defaultScreenOrientation: 4\n  targetDevice: 2\n  useOnDemandResources: 0\n  accelerometerFrequency: 60\n  companyName: DefaultCompany\n  productName: UnityMLStableDiffusion\n  defaultCursor: {fileID: 0}\n  cursorHotspot: {x: 0, y: 0}\n  m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}\n  m_ShowUnitySplashScreen: 0\n  m_ShowUnitySplashLogo: 1\n  m_SplashScreenOverlayOpacity: 1\n  m_SplashScreenAnimation: 1\n  m_SplashScreenLogoStyle: 1\n  m_SplashScreenDrawMode: 0\n  m_SplashScreenBackgroundAnimationZoom: 1\n  m_SplashScreenLogoAnimationZoom: 1\n  m_SplashScreenBackgroundLandscapeAspect: 1\n  m_SplashScreenBackgroundPortraitAspect: 1\n  m_SplashScreenBackgroundLandscapeUvs:\n    serializedVersion: 2\n    x: 0\n    y: 0\n    width: 1\n    height: 1\n  m_SplashScreenBackgroundPortraitUvs:\n    serializedVersion: 2\n    x: 0\n    y: 0\n    width: 1\n    height: 1\n  m_SplashScreenLogos: []\n  m_VirtualRealitySplashScreen: {fileID: 0}\n  m_HolographicTrackingLossScreen: {fileID: 0}\n  defaultScreenWidth: 1920\n  defaultScreenHeight: 1080\n  defaultScreenWidthWeb: 960\n  defaultScreenHeightWeb: 600\n  m_StereoRenderingPath: 0\n  m_ActiveColorSpace: 1\n  m_SpriteBatchVertexThreshold: 300\n  m_MTRendering: 1\n  mipStripping: 0\n  numberOfMipsStripped: 0\n  numberOfMipsStrippedPerMipmapLimitGroup: {}\n  m_StackTraceTypes: 010000000100000001000000010000000100000001000000\n  iosShowActivityIndicatorOnLoading: -1\n  androidShowActivityIndicatorOnLoading: -1\n  iosUseCustomAppBackgroundBehavior: 0\n  allowedAutorotateToPortrait: 1\n  allowedAutorotateToPortraitUpsideDown: 1\n  allowedAutorotateToLandscapeRight: 1\n  allowedAutorotateToLandscapeLeft: 1\n  useOSAutorotation: 1\n  use32BitDisplayBuffer: 1\n  preserveFramebufferAlpha: 0\n  disableDepthAndStencilBuffers: 0\n  androidStartInFullscreen: 1\n  androidRenderOutsideSafeArea: 1\n  androidUseSwappy: 1\n  androidBlitType: 0\n  androidResizableWindow: 0\n  androidDefaultWindowWidth: 1920\n  androidDefaultWindowHeight: 1080\n  androidMinimumWindowWidth: 400\n  androidMinimumWindowHeight: 300\n  androidFullscreenMode: 1\n  androidApplicationEntry: 1\n  defaultIsNativeResolution: 1\n  macRetinaSupport: 1\n  runInBackground: 1\n  captureSingleScreen: 0\n  muteOtherAudioSources: 0\n  Prepare IOS For Recording: 0\n  Force IOS Speakers When Recording: 0\n  deferSystemGesturesMode: 0\n  hideHomeButton: 0\n  submitAnalytics: 1\n  usePlayerLog: 1\n  bakeCollisionMeshes: 0\n  forceSingleInstance: 0\n  useFlipModelSwapchain: 1\n  resizableWindow: 0\n  useMacAppStoreValidation: 0\n  macAppStoreCategory: public.app-category.games\n  gpuSkinning: 1\n  meshDeformation: 0\n  xboxPIXTextureCapture: 0\n  xboxEnableAvatar: 0\n  xboxEnableKinect: 0\n  xboxEnableKinectAutoTracking: 0\n  xboxEnableFitness: 0\n  visibleInBackground: 1\n  allowFullscreenSwitch: 1\n  fullscreenMode: 3\n  xboxSpeechDB: 0\n  xboxEnableHeadOrientation: 0\n  xboxEnableGuest: 0\n  xboxEnablePIXSampling: 0\n  metalFramebufferOnly: 0\n  xboxOneResolution: 0\n  xboxOneSResolution: 0\n  xboxOneXResolution: 3\n  xboxOneMonoLoggingLevel: 0\n  xboxOneLoggingLevel: 1\n  xboxOneDisableEsram: 0\n  xboxOneEnableTypeOptimization: 0\n  xboxOnePresentImmediateThreshold: 0\n  switchQueueCommandMemory: 0\n  switchQueueControlMemory: 16384\n  switchQueueComputeMemory: 262144\n  switchNVNShaderPoolsGranularity: 33554432\n  switchNVNDefaultPoolsGranularity: 16777216\n  switchNVNOtherPoolsGranularity: 16777216\n  switchGpuScratchPoolGranularity: 2097152\n  switchAllowGpuScratchShrinking: 0\n  switchNVNMaxPublicTextureIDCount: 0\n  switchNVNMaxPublicSamplerIDCount: 0\n  switchNVNGraphicsFirmwareMemory: 32\n  vulkanNumSwapchainBuffers: 3\n  vulkanEnableSetSRGBWrite: 0\n  vulkanEnablePreTransform: 1\n  vulkanEnableLateAcquireNextImage: 0\n  vulkanEnableCommandBufferRecycling: 1\n  loadStoreDebugModeEnabled: 0\n  bundleVersion: 0.1\n  preloadedAssets: []\n  metroInputSource: 0\n  wsaTransparentSwapchain: 0\n  m_HolographicPauseOnTrackingLoss: 1\n  xboxOneDisableKinectGpuReservation: 1\n  xboxOneEnable7thCore: 1\n  vrSettings:\n    enable360StereoCapture: 0\n  isWsaHolographicRemotingEnabled: 0\n  enableFrameTimingStats: 0\n  enableOpenGLProfilerGPURecorders: 1\n  useHDRDisplay: 0\n  hdrBitDepth: 0\n  m_ColorGamuts: 00000000\n  targetPixelDensity: 30\n  resolutionScalingMode: 0\n  resetResolutionOnWindowResize: 0\n  androidSupportedAspectRatio: 1\n  androidMaxAspectRatio: 2.1\n  applicationIdentifier:\n    Standalone: com.DefaultCompany.UnityMLStableDiffusion\n    iPhone: com.DefaultCompany.UnityMLStableDiffusion\n  buildNumber:\n    Standalone: 0\n    iPhone: 0\n    tvOS: 0\n  overrideDefaultApplicationIdentifier: 0\n  AndroidBundleVersionCode: 1\n  AndroidMinSdkVersion: 22\n  AndroidTargetSdkVersion: 0\n  AndroidPreferredInstallLocation: 1\n  aotOptions: \n  stripEngineCode: 1\n  iPhoneStrippingLevel: 0\n  iPhoneScriptCallOptimization: 0\n  ForceInternetPermission: 0\n  ForceSDCardPermission: 0\n  CreateWallpaper: 0\n  androidSplitApplicationBinary: 0\n  keepLoadedShadersAlive: 0\n  StripUnusedMeshComponents: 1\n  strictShaderVariantMatching: 0\n  VertexChannelCompressionMask: 4054\n  iPhoneSdkVersion: 988\n  iOSTargetOSVersionString: 13.0\n  tvOSSdkVersion: 0\n  tvOSRequireExtendedGameController: 0\n  tvOSTargetOSVersionString: 13.0\n  uIPrerenderedIcon: 0\n  uIRequiresPersistentWiFi: 0\n  uIRequiresFullScreen: 1\n  uIStatusBarHidden: 1\n  uIExitOnSuspend: 0\n  uIStatusBarStyle: 0\n  appleTVSplashScreen: {fileID: 0}\n  appleTVSplashScreen2x: {fileID: 0}\n  tvOSSmallIconLayers: []\n  tvOSSmallIconLayers2x: []\n  tvOSLargeIconLayers: []\n  tvOSLargeIconLayers2x: []\n  tvOSTopShelfImageLayers: []\n  tvOSTopShelfImageLayers2x: []\n  tvOSTopShelfImageWideLayers: []\n  tvOSTopShelfImageWideLayers2x: []\n  iOSLaunchScreenType: 0\n  iOSLaunchScreenPortrait: {fileID: 0}\n  iOSLaunchScreenLandscape: {fileID: 0}\n  iOSLaunchScreenBackgroundColor:\n    serializedVersion: 2\n    rgba: 0\n  iOSLaunchScreenFillPct: 100\n  iOSLaunchScreenSize: 100\n  iOSLaunchScreenCustomXibPath: \n  iOSLaunchScreeniPadType: 0\n  iOSLaunchScreeniPadImage: {fileID: 0}\n  iOSLaunchScreeniPadBackgroundColor:\n    serializedVersion: 2\n    rgba: 0\n  iOSLaunchScreeniPadFillPct: 100\n  iOSLaunchScreeniPadSize: 100\n  iOSLaunchScreeniPadCustomXibPath: \n  iOSLaunchScreenCustomStoryboardPath: \n  iOSLaunchScreeniPadCustomStoryboardPath: \n  iOSDeviceRequirements: []\n  iOSURLSchemes: []\n  macOSURLSchemes: []\n  iOSBackgroundModes: 0\n  iOSMetalForceHardShadows: 0\n  metalEditorSupport: 1\n  metalAPIValidation: 1\n  iOSRenderExtraFrameOnPause: 0\n  iosCopyPluginsCodeInsteadOfSymlink: 0\n  appleDeveloperTeamID: \n  iOSManualSigningProvisioningProfileID: \n  tvOSManualSigningProvisioningProfileID: \n  iOSManualSigningProvisioningProfileType: 0\n  tvOSManualSigningProvisioningProfileType: 0\n  appleEnableAutomaticSigning: 0\n  iOSRequireARKit: 0\n  iOSAutomaticallyDetectAndAddCapabilities: 1\n  appleEnableProMotion: 0\n  shaderPrecisionModel: 0\n  clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea\n  templatePackageId: com.unity.template.3d@8.1.3\n  templateDefaultScene: Assets/Scenes/SampleScene.unity\n  useCustomMainManifest: 0\n  useCustomLauncherManifest: 0\n  useCustomMainGradleTemplate: 0\n  useCustomLauncherGradleManifest: 0\n  useCustomBaseGradleTemplate: 0\n  useCustomGradlePropertiesTemplate: 0\n  useCustomGradleSettingsTemplate: 0\n  useCustomProguardFile: 0\n  AndroidTargetArchitectures: 1\n  AndroidTargetDevices: 0\n  AndroidSplashScreenScale: 0\n  androidSplashScreen: {fileID: 0}\n  AndroidKeystoreName: \n  AndroidKeyaliasName: \n  AndroidEnableArmv9SecurityFeatures: 0\n  AndroidBuildApkPerCpuArchitecture: 0\n  AndroidTVCompatibility: 0\n  AndroidIsGame: 1\n  AndroidEnableTango: 0\n  androidEnableBanner: 1\n  androidUseLowAccuracyLocation: 0\n  androidUseCustomKeystore: 0\n  m_AndroidBanners:\n  - width: 320\n    height: 180\n    banner: {fileID: 0}\n  androidGamepadSupportLevel: 0\n  chromeosInputEmulation: 1\n  AndroidMinifyRelease: 0\n  AndroidMinifyDebug: 0\n  AndroidValidateAppBundleSize: 1\n  AndroidAppBundleSizeToValidate: 150\n  AndroidReportGooglePlayAppDependencies: 1\n  m_BuildTargetIcons: []\n  m_BuildTargetPlatformIcons:\n  - m_BuildTarget: iPhone\n    m_Icons:\n    - m_Textures: []\n      m_Width: 180\n      m_Height: 180\n      m_Kind: 0\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 120\n      m_Height: 120\n      m_Kind: 0\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 167\n      m_Height: 167\n      m_Kind: 0\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 152\n      m_Height: 152\n      m_Kind: 0\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 76\n      m_Height: 76\n      m_Kind: 0\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 120\n      m_Height: 120\n      m_Kind: 3\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 80\n      m_Height: 80\n      m_Kind: 3\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 80\n      m_Height: 80\n      m_Kind: 3\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 40\n      m_Height: 40\n      m_Kind: 3\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 87\n      m_Height: 87\n      m_Kind: 1\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 58\n      m_Height: 58\n      m_Kind: 1\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 29\n      m_Height: 29\n      m_Kind: 1\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 58\n      m_Height: 58\n      m_Kind: 1\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 29\n      m_Height: 29\n      m_Kind: 1\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 60\n      m_Height: 60\n      m_Kind: 2\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 40\n      m_Height: 40\n      m_Kind: 2\n      m_SubKind: iPhone\n    - m_Textures: []\n      m_Width: 40\n      m_Height: 40\n      m_Kind: 2\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 20\n      m_Height: 20\n      m_Kind: 2\n      m_SubKind: iPad\n    - m_Textures: []\n      m_Width: 1024\n      m_Height: 1024\n      m_Kind: 4\n      m_SubKind: App Store\n  m_BuildTargetBatching:\n  - m_BuildTarget: Standalone\n    m_StaticBatching: 1\n    m_DynamicBatching: 0\n  - m_BuildTarget: tvOS\n    m_StaticBatching: 1\n    m_DynamicBatching: 0\n  - m_BuildTarget: Android\n    m_StaticBatching: 1\n    m_DynamicBatching: 0\n  - m_BuildTarget: iPhone\n    m_StaticBatching: 1\n    m_DynamicBatching: 0\n  - m_BuildTarget: WebGL\n    m_StaticBatching: 0\n    m_DynamicBatching: 0\n  m_BuildTargetShaderSettings: []\n  m_BuildTargetGraphicsJobs:\n  - m_BuildTarget: MacStandaloneSupport\n    m_GraphicsJobs: 0\n  - m_BuildTarget: Switch\n    m_GraphicsJobs: 1\n  - m_BuildTarget: MetroSupport\n    m_GraphicsJobs: 1\n  - m_BuildTarget: AppleTVSupport\n    m_GraphicsJobs: 0\n  - m_BuildTarget: BJMSupport\n    m_GraphicsJobs: 1\n  - m_BuildTarget: LinuxStandaloneSupport\n    m_GraphicsJobs: 1\n  - m_BuildTarget: PS4Player\n    m_GraphicsJobs: 1\n  - m_BuildTarget: iOSSupport\n    m_GraphicsJobs: 0\n  - m_BuildTarget: WindowsStandaloneSupport\n    m_GraphicsJobs: 1\n  - m_BuildTarget: XboxOnePlayer\n    m_GraphicsJobs: 1\n  - m_BuildTarget: LuminSupport\n    m_GraphicsJobs: 0\n  - m_BuildTarget: AndroidPlayer\n    m_GraphicsJobs: 0\n  - m_BuildTarget: WebGLSupport\n    m_GraphicsJobs: 0\n  m_BuildTargetGraphicsJobMode:\n  - m_BuildTarget: PS4Player\n    m_GraphicsJobMode: 0\n  - m_BuildTarget: XboxOnePlayer\n    m_GraphicsJobMode: 0\n  m_BuildTargetGraphicsAPIs:\n  - m_BuildTarget: AndroidPlayer\n    m_APIs: 150000000b000000\n    m_Automatic: 1\n  - m_BuildTarget: iOSSupport\n    m_APIs: 10000000\n    m_Automatic: 1\n  - m_BuildTarget: AppleTVSupport\n    m_APIs: 10000000\n    m_Automatic: 1\n  - m_BuildTarget: WebGLSupport\n    m_APIs: 0b000000\n    m_Automatic: 1\n  m_BuildTargetVRSettings:\n  - m_BuildTarget: Standalone\n    m_Enabled: 0\n    m_Devices:\n    - Oculus\n    - OpenVR\n  m_DefaultShaderChunkSizeInMB: 16\n  m_DefaultShaderChunkCount: 0\n  openGLRequireES31: 0\n  openGLRequireES31AEP: 0\n  openGLRequireES32: 0\n  m_TemplateCustomTags: {}\n  mobileMTRendering:\n    Android: 1\n    iPhone: 1\n    tvOS: 1\n  m_BuildTargetGroupLightmapEncodingQuality:\n  - m_BuildTarget: Android\n    m_EncodingQuality: 1\n  - m_BuildTarget: iPhone\n    m_EncodingQuality: 1\n  - m_BuildTarget: tvOS\n    m_EncodingQuality: 1\n  m_BuildTargetGroupHDRCubemapEncodingQuality: []\n  m_BuildTargetGroupLightmapSettings: []\n  m_BuildTargetGroupLoadStoreDebugModeSettings: []\n  m_BuildTargetNormalMapEncoding:\n  - m_BuildTarget: Android\n    m_Encoding: 1\n  - m_BuildTarget: iPhone\n    m_Encoding: 1\n  - m_BuildTarget: tvOS\n    m_Encoding: 1\n  m_BuildTargetDefaultTextureCompressionFormat:\n  - serializedVersion: 2\n    m_BuildTarget: Android\n    m_Formats: 03000000\n  playModeTestRunnerEnabled: 0\n  runPlayModeTestAsEditModeTest: 0\n  actionOnDotNetUnhandledException: 1\n  enableInternalProfiler: 0\n  logObjCUncaughtExceptions: 1\n  enableCrashReportAPI: 0\n  cameraUsageDescription: Requires camera for video Input.\n  locationUsageDescription: \n  microphoneUsageDescription: \n  bluetoothUsageDescription: \n  macOSTargetOSVersion: 10.13.0\n  switchNMETAOverride: \n  switchNetLibKey: \n  switchSocketMemoryPoolSize: 6144\n  switchSocketAllocatorPoolSize: 128\n  switchSocketConcurrencyLimit: 14\n  switchScreenResolutionBehavior: 2\n  switchUseCPUProfiler: 0\n  switchUseGOLDLinker: 0\n  switchLTOSetting: 0\n  switchApplicationID: 0x01004b9000490000\n  switchNSODependencies: \n  switchCompilerFlags: \n  switchTitleNames_0: \n  switchTitleNames_1: \n  switchTitleNames_2: \n  switchTitleNames_3: \n  switchTitleNames_4: \n  switchTitleNames_5: \n  switchTitleNames_6: \n  switchTitleNames_7: \n  switchTitleNames_8: \n  switchTitleNames_9: \n  switchTitleNames_10: \n  switchTitleNames_11: \n  switchTitleNames_12: \n  switchTitleNames_13: \n  switchTitleNames_14: \n  switchTitleNames_15: \n  switchPublisherNames_0: \n  switchPublisherNames_1: \n  switchPublisherNames_2: \n  switchPublisherNames_3: \n  switchPublisherNames_4: \n  switchPublisherNames_5: \n  switchPublisherNames_6: \n  switchPublisherNames_7: \n  switchPublisherNames_8: \n  switchPublisherNames_9: \n  switchPublisherNames_10: \n  switchPublisherNames_11: \n  switchPublisherNames_12: \n  switchPublisherNames_13: \n  switchPublisherNames_14: \n  switchPublisherNames_15: \n  switchIcons_0: {fileID: 0}\n  switchIcons_1: {fileID: 0}\n  switchIcons_2: {fileID: 0}\n  switchIcons_3: {fileID: 0}\n  switchIcons_4: {fileID: 0}\n  switchIcons_5: {fileID: 0}\n  switchIcons_6: {fileID: 0}\n  switchIcons_7: {fileID: 0}\n  switchIcons_8: {fileID: 0}\n  switchIcons_9: {fileID: 0}\n  switchIcons_10: {fileID: 0}\n  switchIcons_11: {fileID: 0}\n  switchIcons_12: {fileID: 0}\n  switchIcons_13: {fileID: 0}\n  switchIcons_14: {fileID: 0}\n  switchIcons_15: {fileID: 0}\n  switchSmallIcons_0: {fileID: 0}\n  switchSmallIcons_1: {fileID: 0}\n  switchSmallIcons_2: {fileID: 0}\n  switchSmallIcons_3: {fileID: 0}\n  switchSmallIcons_4: {fileID: 0}\n  switchSmallIcons_5: {fileID: 0}\n  switchSmallIcons_6: {fileID: 0}\n  switchSmallIcons_7: {fileID: 0}\n  switchSmallIcons_8: {fileID: 0}\n  switchSmallIcons_9: {fileID: 0}\n  switchSmallIcons_10: {fileID: 0}\n  switchSmallIcons_11: {fileID: 0}\n  switchSmallIcons_12: {fileID: 0}\n  switchSmallIcons_13: {fileID: 0}\n  switchSmallIcons_14: {fileID: 0}\n  switchSmallIcons_15: {fileID: 0}\n  switchManualHTML: \n  switchAccessibleURLs: \n  switchLegalInformation: \n  switchMainThreadStackSize: 1048576\n  switchPresenceGroupId: \n  switchLogoHandling: 0\n  switchReleaseVersion: 0\n  switchDisplayVersion: 1.0.0\n  switchStartupUserAccount: 0\n  switchSupportedLanguagesMask: 0\n  switchLogoType: 0\n  switchApplicationErrorCodeCategory: \n  switchUserAccountSaveDataSize: 0\n  switchUserAccountSaveDataJournalSize: 0\n  switchApplicationAttribute: 0\n  switchCardSpecSize: -1\n  switchCardSpecClock: -1\n  switchRatingsMask: 0\n  switchRatingsInt_0: 0\n  switchRatingsInt_1: 0\n  switchRatingsInt_2: 0\n  switchRatingsInt_3: 0\n  switchRatingsInt_4: 0\n  switchRatingsInt_5: 0\n  switchRatingsInt_6: 0\n  switchRatingsInt_7: 0\n  switchRatingsInt_8: 0\n  switchRatingsInt_9: 0\n  switchRatingsInt_10: 0\n  switchRatingsInt_11: 0\n  switchRatingsInt_12: 0\n  switchLocalCommunicationIds_0: \n  switchLocalCommunicationIds_1: \n  switchLocalCommunicationIds_2: \n  switchLocalCommunicationIds_3: \n  switchLocalCommunicationIds_4: \n  switchLocalCommunicationIds_5: \n  switchLocalCommunicationIds_6: \n  switchLocalCommunicationIds_7: \n  switchParentalControl: 0\n  switchAllowsScreenshot: 1\n  switchAllowsVideoCapturing: 1\n  switchAllowsRuntimeAddOnContentInstall: 0\n  switchDataLossConfirmation: 0\n  switchUserAccountLockEnabled: 0\n  switchSystemResourceMemory: 16777216\n  switchSupportedNpadStyles: 22\n  switchNativeFsCacheSize: 32\n  switchIsHoldTypeHorizontal: 0\n  switchSupportedNpadCount: 8\n  switchEnableTouchScreen: 1\n  switchSocketConfigEnabled: 0\n  switchTcpInitialSendBufferSize: 32\n  switchTcpInitialReceiveBufferSize: 64\n  switchTcpAutoSendBufferSizeMax: 256\n  switchTcpAutoReceiveBufferSizeMax: 256\n  switchUdpSendBufferSize: 9\n  switchUdpReceiveBufferSize: 42\n  switchSocketBufferEfficiency: 4\n  switchSocketInitializeEnabled: 1\n  switchNetworkInterfaceManagerInitializeEnabled: 1\n  switchPlayerConnectionEnabled: 1\n  switchUseNewStyleFilepaths: 0\n  switchUseLegacyFmodPriorities: 1\n  switchUseMicroSleepForYield: 1\n  switchEnableRamDiskSupport: 0\n  switchMicroSleepForYieldTime: 25\n  switchRamDiskSpaceSize: 12\n  ps4NPAgeRating: 12\n  ps4NPTitleSecret: \n  ps4NPTrophyPackPath: \n  ps4ParentalLevel: 11\n  ps4ContentID: ED1633-NPXX51362_00-0000000000000000\n  ps4Category: 0\n  ps4MasterVersion: 01.00\n  ps4AppVersion: 01.00\n  ps4AppType: 0\n  ps4ParamSfxPath: \n  ps4VideoOutPixelFormat: 0\n  ps4VideoOutInitialWidth: 1920\n  ps4VideoOutBaseModeInitialWidth: 1920\n  ps4VideoOutReprojectionRate: 60\n  ps4PronunciationXMLPath: \n  ps4PronunciationSIGPath: \n  ps4BackgroundImagePath: \n  ps4StartupImagePath: \n  ps4StartupImagesFolder: \n  ps4IconImagesFolder: \n  ps4SaveDataImagePath: \n  ps4SdkOverride: \n  ps4BGMPath: \n  ps4ShareFilePath: \n  ps4ShareOverlayImagePath: \n  ps4PrivacyGuardImagePath: \n  ps4ExtraSceSysFile: \n  ps4NPtitleDatPath: \n  ps4RemotePlayKeyAssignment: -1\n  ps4RemotePlayKeyMappingDir: \n  ps4PlayTogetherPlayerCount: 0\n  ps4EnterButtonAssignment: 1\n  ps4ApplicationParam1: 0\n  ps4ApplicationParam2: 0\n  ps4ApplicationParam3: 0\n  ps4ApplicationParam4: 0\n  ps4DownloadDataSize: 0\n  ps4GarlicHeapSize: 2048\n  ps4ProGarlicHeapSize: 2560\n  playerPrefsMaxSize: 32768\n  ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ\n  ps4pnSessions: 1\n  ps4pnPresence: 1\n  ps4pnFriends: 1\n  ps4pnGameCustomData: 1\n  playerPrefsSupport: 0\n  enableApplicationExit: 0\n  resetTempFolder: 1\n  restrictedAudioUsageRights: 0\n  ps4UseResolutionFallback: 0\n  ps4ReprojectionSupport: 0\n  ps4UseAudio3dBackend: 0\n  ps4UseLowGarlicFragmentationMode: 1\n  ps4SocialScreenEnabled: 0\n  ps4ScriptOptimizationLevel: 0\n  ps4Audio3dVirtualSpeakerCount: 14\n  ps4attribCpuUsage: 0\n  ps4PatchPkgPath: \n  ps4PatchLatestPkgPath: \n  ps4PatchChangeinfoPath: \n  ps4PatchDayOne: 0\n  ps4attribUserManagement: 0\n  ps4attribMoveSupport: 0\n  ps4attrib3DSupport: 0\n  ps4attribShareSupport: 0\n  ps4attribExclusiveVR: 0\n  ps4disableAutoHideSplash: 0\n  ps4videoRecordingFeaturesUsed: 0\n  ps4contentSearchFeaturesUsed: 0\n  ps4CompatibilityPS5: 0\n  ps4AllowPS5Detection: 0\n  ps4GPU800MHz: 1\n  ps4attribEyeToEyeDistanceSettingVR: 0\n  ps4IncludedModules: []\n  ps4attribVROutputEnabled: 0\n  monoEnv: \n  splashScreenBackgroundSourceLandscape: {fileID: 0}\n  splashScreenBackgroundSourcePortrait: {fileID: 0}\n  blurSplashScreenBackground: 1\n  spritePackerPolicy: \n  webGLMemorySize: 16\n  webGLExceptionSupport: 1\n  webGLNameFilesAsHashes: 0\n  webGLShowDiagnostics: 0\n  webGLDataCaching: 1\n  webGLDebugSymbols: 0\n  webGLEmscriptenArgs: \n  webGLModulesDirectory: \n  webGLTemplate: APPLICATION:Default\n  webGLAnalyzeBuildSize: 0\n  webGLUseEmbeddedResources: 0\n  webGLCompressionFormat: 1\n  webGLWasmArithmeticExceptions: 0\n  webGLLinkerTarget: 1\n  webGLThreadsSupport: 0\n  webGLDecompressionFallback: 0\n  webGLInitialMemorySize: 32\n  webGLMaximumMemorySize: 2048\n  webGLMemoryGrowthMode: 2\n  webGLMemoryLinearGrowthStep: 16\n  webGLMemoryGeometricGrowthStep: 0.2\n  webGLMemoryGeometricGrowthCap: 96\n  webGLPowerPreference: 2\n  scriptingDefineSymbols: {}\n  additionalCompilerArguments: {}\n  platformArchitecture: {}\n  scriptingBackend: {}\n  il2cppCompilerConfiguration: {}\n  il2cppCodeGeneration: {}\n  il2cppStacktraceInformation: {}\n  managedStrippingLevel: {}\n  incrementalIl2cppBuild: {}\n  suppressCommonWarnings: 0\n  allowUnsafeCode: 1\n  useDeterministicCompilation: 1\n  selectedPlatform: 0\n  additionalIl2CppArgs: \n  scriptingRuntimeVersion: 1\n  gcIncremental: 1\n  gcWBarrierValidation: 0\n  apiCompatibilityLevelPerPlatform: {}\n  editorAssembliesCompatibilityLevel: 1\n  m_RenderingPath: 1\n  m_MobileRenderingPath: 1\n  metroPackageName: Template_3D\n  metroPackageVersion: \n  metroCertificatePath: \n  metroCertificatePassword: \n  metroCertificateSubject: \n  metroCertificateIssuer: \n  metroCertificateNotAfter: 0000000000000000\n  metroApplicationDescription: Template_3D\n  wsaImages: {}\n  metroTileShortName: \n  metroTileShowName: 0\n  metroMediumTileShowName: 0\n  metroLargeTileShowName: 0\n  metroWideTileShowName: 0\n  metroSupportStreamingInstall: 0\n  metroLastRequiredScene: 0\n  metroDefaultTileSize: 1\n  metroTileForegroundText: 2\n  metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}\n  metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1}\n  metroSplashScreenUseBackgroundColor: 0\n  platformCapabilities: {}\n  metroTargetDeviceFamilies: {}\n  metroFTAName: \n  metroFTAFileTypes: []\n  metroProtocolName: \n  vcxProjDefaultLanguage: \n  XboxOneProductId: \n  XboxOneUpdateKey: \n  XboxOneSandboxId: \n  XboxOneContentId: \n  XboxOneTitleId: \n  XboxOneSCId: \n  XboxOneGameOsOverridePath: \n  XboxOnePackagingOverridePath: \n  XboxOneAppManifestOverridePath: \n  XboxOneVersion: 1.0.0.0\n  XboxOnePackageEncryption: 0\n  XboxOnePackageUpdateGranularity: 2\n  XboxOneDescription: \n  XboxOneLanguage:\n  - enus\n  XboxOneCapability: []\n  XboxOneGameRating: {}\n  XboxOneIsContentPackage: 0\n  XboxOneEnhancedXboxCompatibilityMode: 0\n  XboxOneEnableGPUVariability: 1\n  XboxOneSockets: {}\n  XboxOneSplashScreen: {fileID: 0}\n  XboxOneAllowedProductIds: []\n  XboxOnePersistentLocalStorageSize: 0\n  XboxOneXTitleMemory: 8\n  XboxOneOverrideIdentityName: \n  XboxOneOverrideIdentityPublisher: \n  vrEditorSettings: {}\n  cloudServicesEnabled:\n    UNet: 1\n  luminIcon:\n    m_Name: \n    m_ModelFolderPath: \n    m_PortalFolderPath: \n  luminCert:\n    m_CertPath: \n    m_SignPackage: 1\n  luminIsChannelApp: 0\n  luminVersion:\n    m_VersionCode: 1\n    m_VersionName: \n  hmiPlayerDataPath: \n  hmiForceSRGBBlit: 1\n  embeddedLinuxEnableGamepadInput: 1\n  hmiLogStartupTiming: 0\n  hmiCpuConfiguration: \n  apiCompatibilityLevel: 6\n  activeInputHandler: 0\n  windowsGamepadBackendHint: 0\n  cloudProjectId: \n  framebufferDepthMemorylessMode: 0\n  qualitySettingsNames: []\n  projectName: \n  organizationId: \n  cloudEnabled: 0\n  legacyClampBlendShapeWeights: 0\n  hmiLoadingImage: {fileID: 0}\n  virtualTexturingSupportEnabled: 0\n  insecureHttpOption: 0\n"
  },
  {
    "path": "ProjectSettings/ProjectVersion.txt",
    "content": "m_EditorVersion: 6000.0.20f1\nm_EditorVersionWithRevision: 6000.0.20f1 (05208a74e9aa)\n"
  },
  {
    "path": "ProjectSettings/QualitySettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!47 &1\nQualitySettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 5\n  m_CurrentQuality: 0\n  m_QualitySettings:\n  - serializedVersion: 3\n    name: High\n    pixelLightCount: 2\n    shadows: 2\n    shadowResolution: 1\n    shadowProjection: 1\n    shadowCascades: 2\n    shadowDistance: 10\n    shadowNearPlaneOffset: 3\n    shadowCascade2Split: 0.33333334\n    shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}\n    shadowmaskMode: 1\n    skinWeights: 2\n    globalTextureMipmapLimit: 0\n    textureMipmapLimitSettings: []\n    anisotropicTextures: 1\n    antiAliasing: 0\n    softParticles: 0\n    softVegetation: 1\n    realtimeReflectionProbes: 1\n    billboardsFaceCameraPosition: 1\n    useLegacyDetailDistribution: 1\n    vSyncCount: 1\n    lodBias: 1\n    maximumLODLevel: 0\n    enableLODCrossFade: 1\n    streamingMipmapsActive: 0\n    streamingMipmapsAddAllCameras: 1\n    streamingMipmapsMemoryBudget: 512\n    streamingMipmapsRenderersPerFrame: 512\n    streamingMipmapsMaxLevelReduction: 2\n    streamingMipmapsMaxFileIORequests: 1024\n    particleRaycastBudget: 256\n    asyncUploadTimeSlice: 2\n    asyncUploadBufferSize: 16\n    asyncUploadPersistentBuffer: 1\n    resolutionScalingFixedDPIFactor: 1\n    customRenderPipeline: {fileID: 0}\n    terrainQualityOverrides: 0\n    terrainPixelError: 1\n    terrainDetailDensityScale: 1\n    terrainBasemapDistance: 1000\n    terrainDetailDistance: 80\n    terrainTreeDistance: 5000\n    terrainBillboardStart: 50\n    terrainFadeLength: 5\n    terrainMaxTrees: 50\n    excludedTargetPlatforms: []\n  m_TextureMipmapLimitGroupNames: []\n  m_PerPlatformDefaultQuality:\n    Android: 0\n    GameCoreScarlett: 0\n    GameCoreXboxOne: 0\n    Lumin: 0\n    Nintendo 3DS: 0\n    Nintendo Switch: 0\n    PS4: 0\n    PS5: 0\n    Server: 0\n    Stadia: 0\n    Standalone: 0\n    WebGL: 0\n    Windows Store Apps: 0\n    XboxOne: 0\n    iPhone: 0\n    tvOS: 0\n"
  },
  {
    "path": "ProjectSettings/SceneTemplateSettings.json",
    "content": "{\n    \"templatePinStates\": [],\n    \"dependencyTypeInfos\": [\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.AnimationClip\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEditor.Animations.AnimatorController\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.AnimatorOverrideController\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEditor.Audio.AudioMixerController\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.ComputeShader\",\n            \"ignore\": true,\n            \"defaultInstantiationMode\": 1,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Cubemap\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.GameObject\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEditor.LightingDataAsset\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": false\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.LightingSettings\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Material\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEditor.MonoScript\",\n            \"ignore\": true,\n            \"defaultInstantiationMode\": 1,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.PhysicMaterial\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.PhysicsMaterial2D\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Rendering.PostProcessing.PostProcessProfile\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Rendering.PostProcessing.PostProcessResources\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Rendering.VolumeProfile\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEditor.SceneAsset\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": false\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Shader\",\n            \"ignore\": true,\n            \"defaultInstantiationMode\": 1,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.ShaderVariantCollection\",\n            \"ignore\": true,\n            \"defaultInstantiationMode\": 1,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Texture\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Texture2D\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        },\n        {\n            \"userAdded\": false,\n            \"type\": \"UnityEngine.Timeline.TimelineAsset\",\n            \"ignore\": false,\n            \"defaultInstantiationMode\": 0,\n            \"supportsModification\": true\n        }\n    ],\n    \"defaultDependencyTypeInfo\": {\n        \"userAdded\": false,\n        \"type\": \"<default_scene_template_dependencies>\",\n        \"ignore\": false,\n        \"defaultInstantiationMode\": 1,\n        \"supportsModification\": true\n    },\n    \"newSceneOverride\": 0\n}"
  },
  {
    "path": "ProjectSettings/TagManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!78 &1\nTagManager:\n  serializedVersion: 2\n  tags: []\n  layers:\n  - Default\n  - TransparentFX\n  - Ignore Raycast\n  - \n  - Water\n  - UI\n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  - \n  m_SortingLayers:\n  - name: Default\n    uniqueID: 0\n    locked: 0\n"
  },
  {
    "path": "ProjectSettings/TimeManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!5 &1\nTimeManager:\n  m_ObjectHideFlags: 0\n  Fixed Timestep: 0.02\n  Maximum Allowed Timestep: 0.33333334\n  m_TimeScale: 1\n  Maximum Particle Timestep: 0.03\n"
  },
  {
    "path": "ProjectSettings/UnityConnectSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!310 &1\nUnityConnectSettings:\n  m_ObjectHideFlags: 0\n  serializedVersion: 1\n  m_Enabled: 0\n  m_TestMode: 0\n  m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events\n  m_EventUrl: https://cdp.cloud.unity3d.com/v1/events\n  m_ConfigUrl: https://config.uca.cloud.unity3d.com\n  m_DashboardUrl: https://dashboard.unity3d.com\n  m_TestInitMode: 0\n  CrashReportingSettings:\n    m_EventUrl: https://perf-events.cloud.unity3d.com\n    m_Enabled: 0\n    m_LogBufferSize: 10\n    m_CaptureEditorExceptions: 1\n  UnityPurchasingSettings:\n    m_Enabled: 0\n    m_TestMode: 0\n  UnityAnalyticsSettings:\n    m_Enabled: 0\n    m_TestMode: 0\n    m_InitializeOnStartup: 1\n    m_PackageRequiringCoreStatsPresent: 0\n  UnityAdsSettings:\n    m_Enabled: 0\n    m_InitializeOnStartup: 1\n    m_TestMode: 0\n    m_IosGameId: \n    m_AndroidGameId: \n    m_GameIds: {}\n    m_GameId: \n  PerformanceReportingSettings:\n    m_Enabled: 0\n"
  },
  {
    "path": "ProjectSettings/VFXManager.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!937362698 &1\nVFXManager:\n  m_ObjectHideFlags: 0\n  m_IndirectShader: {fileID: 0}\n  m_CopyBufferShader: {fileID: 0}\n  m_SortShader: {fileID: 0}\n  m_StripUpdateShader: {fileID: 0}\n  m_RenderPipeSettingsPath: \n  m_FixedTimeStep: 0.016666668\n  m_MaxDeltaTime: 0.05\n"
  },
  {
    "path": "ProjectSettings/VersionControlSettings.asset",
    "content": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!890905787 &1\nVersionControlSettings:\n  m_ObjectHideFlags: 0\n  m_Mode: Visible Meta Files\n  m_CollabEditorSettings:\n    inProgressEnabled: 1\n"
  },
  {
    "path": "ProjectSettings/XRSettings.asset",
    "content": "{\n    \"m_SettingKeys\": [\n        \"VR Device Disabled\",\n        \"VR Device User Alert\"\n    ],\n    \"m_SettingValues\": [\n        \"False\",\n        \"False\"\n    ]\n}"
  },
  {
    "path": "README.md",
    "content": "Unity Core ML Stable Diffusion Plugin\n=====================================\n\n![gif](https://user-images.githubusercontent.com/343936/228759539-a35a37f2-77d6-4a10-8392-d875b968fea6.gif)\n\nStable Diffusion plugin for Unity, based on [Apple's Core ML port]. You can run\nthe model on-editor and at-runtime without needing any extra components.\n\n[Apple's Core ML port]: https://github.com/apple/ml-stable-diffusion\n\nSystem Requirements\n-------------------\n\n- Unity 2023.1 or later\n- Apple Silicon Mac (editor/runtime support) with macOS 13.1 or later\n- iPad Pro with Apple silicon (runtime support) with iOS 16.2 or later\n\nAlthough the plugin supports iOS, it requires huge amount of memory to run the\nmodel, so it only supports memory-rich iPad models.\n\nHow To Try\n----------\n\nBefore running the sample project, you must put the model files in the\n`Assets/StreamingAssets` directory.\n\n- Clone or download the [pre-converted Stable Diffusion 2 model repository].\n- Copy the `split_einsum/compiled` directory into `Assets/StreamingAssets`.\n- Rename the directory to `StableDiffusion`.\n\n[pre-converted Stable Diffusion 2 model repository]:\n  https://huggingface.co/apple/coreml-stable-diffusion-2-base\n\nIt takes a long time (a few minutes) for the first run. After this\ninitialization step, it only takes a few tens of seconds to generate an image.\n\nPerformance Considerations\n--------------------------\n\nYou can change which processing unit it uses by switching the \"Compute Units\"\nproperty in the Tester component.\n\nIt depends on the device model to choose the best option:\n\n- M1/M2 Mac and iOS: GPUs in those devices are not powerful enough, so you\n  should select \"CPU and NE\" (Neural Engine) or \"All\".\n- M1/M2 Pro/Max Mac: GPUs in those devices have enough processing power\n  compared to NE, so \"CPU and GPU\" can be a better option.\n\nWhen using \"CPU and GPU\" mode, you must use the \"original\" model instead of\nthe \"split_einsum\" model. Please overwrite the `StreamingAssets/StableDiffusion`\ndirectory with the `original/compiled` directory.\n\nLCM (SD-Turbo) Support\n----------------------\n\nYou can use [SD-Turbo] or other LCMs (latent consistency models) with setting\n`Pipeline.Scheduler` to `Lcm`. You might also have to change `StepCount` to 1\\~4\nand `GuidanceScale` to 1\\~2. Please refer to the model description to know the\ncorrect settings.\n\nYou can download the [pre-converted SD-Turbo model] from my Hugging Face\nrepository.\n\n[SD-Turbo]: https://huggingface.co/stabilityai/sd-turbo\n[pre-converted SD-Turbo model]:\n  https://huggingface.co/keijiro-tk/coreml-sd-turbo\n\nSample Projects\n---------------\n\n![gif](https://user-images.githubusercontent.com/343936/228760795-9e712684-2ee6-4e63-9241-06d8aa125a17.gif)\n\n- [Flipbook3](https://github.com/keijiro/Flipbook3): Running the image-to-image\n  pipeline with a real-time 3D scene.\n"
  }
]