vluz commited on
Commit
829f49a
1 Parent(s): 5a3522c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -0
README.md CHANGED
@@ -1,3 +1,60 @@
1
  ---
2
  license: cc0-1.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc0-1.0
3
+ language:
4
+ - en
5
  ---
6
+ # Generalis V1.1
7
+
8
+ <hr>
9
+
10
+ ### Second attempt at merging several models v1.5 into one general purpose model.
11
+
12
+ Focus has been put into simple prompts, good one-off generation, muted colours, low memory usage, small model size.
13
+
14
+ It is intended as easy model for use in larger projects where image generation is needed.
15
+
16
+ Published under CC0
17
+
18
+ <hr>
19
+
20
+ Use example:
21
+
22
+ ```python
23
+ import torch # Tested with 2.0.1+cu118
24
+ from diffusers import StableDiffusionPipeline # <3
25
+
26
+
27
+ # Model location in HF
28
+ model = "https://huggingface.co/vluz/Generalis_V1/blob/main/Generalis_v1.safetensors"
29
+
30
+ # Create pipe
31
+ pipe = StableDiffusionPipeline.from_ckpt(model,
32
+ torch_dtype=torch.float16,
33
+ safety_checker=None,
34
+ feature_extractor=None,
35
+ requires_safety_checker=False,)
36
+
37
+ # Cleanup
38
+ del pipe.vae.encoder
39
+ torch.cuda.empty_cache()
40
+
41
+ # Send to GPU
42
+ pipe = pipe.to("cuda")
43
+
44
+ # Optimize for low vram use and clear cache again
45
+ pipe.enable_vae_tiling()
46
+ pipe.enable_attention_slicing("max")
47
+ pipe.enable_xformers_memory_efficient_attention(attention_op=None)
48
+ pipe.unet.to(memory_format=torch.channels_last)
49
+ pipe.enable_sequential_cpu_offload()
50
+ torch.cuda.empty_cache()
51
+
52
+ # Set a prompt
53
+ prompt = "a cat"
54
+
55
+ # Generate image based on prompt
56
+ image = pipe(prompt).images[0]
57
+
58
+ # Save result image to disk
59
+ image.save("cat.png")
60
+ ```