This file contains 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
# sd_unet = UNet2DConditionModel.from_pretrained("./stable-diffusion-v1-5", subfolder="unet") | |
# any_unet = UNet2DConditionModel.from_pretrained("./anything-v3", subfolder="unet") | |
# pipe = StableDiffusionPipeline( | |
# vae = , | |
# text_encoder = , | |
# tokenizer = , | |
# unet = MultiUnet([(sd_unet, 0.4), (any_unet, 0.6)], "cuda"), | |
# scheduler = , | |
# safety_checker = , | |
# feature_extractor = |
This file contains 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
type Tail<XS extends readonly any[]> = XS extends readonly [any, ...infer T] ? T : []; | |
type Last<XS extends readonly any[]> = XS extends readonly [...infer _, infer X] ? X : never; | |
type UnionToIntersection<U> = (U extends any ? (k: U)=>void : never) extends ((k: infer I)=>void) ? I : never; | |
type Equal<A, B> = A extends B ? B extends A ? true : false : false; | |
type PipelineStage<Input, Config extends Record<any, unknown>, Output> = (input: Input, config: Config) => Output; | |
type Input<Stage extends PipelineStage<any, any, any>> = Parameters<Stage>[0]; | |
type Config<Stage extends PipelineStage<any, any, any>> = Parameters<Stage>[1]; | |
type Output<Stage extends PipelineStage<any, any, any>> = ReturnType<Stage>; |
This file contains 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
name: AutomaticHost | |
on: | |
push: | |
branches: | |
- {BRANCH_NAME} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
This file contains 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
public class Duplicates { | |
private static <T> BiFunction<Processing<T>, T, Processing<T>> getReducer(){ | |
return (acc, elem) -> { | |
if (acc.uniques.contains(elem)) { | |
acc.dupes.add(elem); | |
} else { | |
acc.uniques.add(elem); | |
} | |
return acc; | |
}; |