This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This supports merging as many adapters as you want. | |
| # python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model> | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| from peft import PeftModel | |
| import torch | |
| import os | |
| import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def quat_from_xform(ts): | |
| return quat_normalize( | |
| torch.where((ts[...,2,2] < 0.0)[...,None], | |
| torch.where((ts[...,0,0] > ts[...,1,1])[...,None], | |
| torch.cat([ | |
| (ts[...,2,1]-ts[...,1,2])[...,None], | |
| (1.0 + ts[...,0,0] - ts[...,1,1] - ts[...,2,2])[...,None], | |
| (ts[...,1,0]+ts[...,0,1])[...,None], | |
| (ts[...,0,2]+ts[...,2,0])[...,None]], dim=-1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using UnityEditor.Build; | |
| using UnityEditor.Rendering; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| class ShaderBuildProcessor : IPreprocessShaders | |
| { | |
| ShaderVariantCollection whitelist; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You will now act as a prompt generator. | |
| I will describe an image to you, and you will create a prompt that could be used for image-generation. | |
| Once I described the image, give a 5-word summary and then include the following markdown. | |
|  | |
| where {description} is: | |
| {sceneDetailed}%20{adjective}%20{charactersDetailed}%20{visualStyle}%20{genre}%20{artistReference} | |
| Make sure the prompts in the URL are encoded. Don't quote the generated markdown or put any code box around it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.UIElements; | |
| #if ENABLE_INPUT_SYSTEM | |
| using UnityEngine.InputSystem.UI; | |
| #endif | |
| #if UNITY_EDITOR | |
| using UnityEditor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Runtime.CompilerServices; | |
| using System.Runtime.InteropServices; | |
| public unsafe class NetStandardPlus | |
| { | |
| [UnmanagedFunctionPointer(CallingConvention.StdCall)] | |
| public delegate void MyStdcallDelegate(); | |
| public static void Call(delegate*<void> action) => action(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Original shader by @bgolus, modified slightly by @alexanderameye for URP, modified slightly more | |
| // by @gravitonpunch for ECS/DOTS/HybridRenderer. | |
| // https://twitter.com/bgolus | |
| // https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9 | |
| // https://alexanderameye.github.io/ | |
| // https://twitter.com/alexanderameye/status/1332286868222775298 | |
| Shader "Hidden/Outline" | |
| { | |
| Properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| using UnityEngine; | |
| public class CustomMaxSizeSetter : EditorWindow | |
| { | |
| private const int MINIMUM_MAX_SIZE = 32; | |
| private const int MAXIMUM_MAX_SIZE = 2048; | |
| private int initialMaxSize = -1; | |
| private int currentMaxSize = -1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| /* | |
| - Renders DepthOnly pass to _CameraDepthTexture, filtered by LayerMask | |
| - If the depth texture is generated via a Depth Prepass, URP uses the Opaque Layer Mask at the top of the Forward/Universal Renderer asset | |
| to determine which objects should be rendered to the depth texture. This feature can be used to render objects on *other layers* into the depth texture as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| #endif | |
| [ExecuteInEditMode] | |
| public class GlobalShaderParams : MonoBehaviour | |
| { |
NewerOlder