Mujeeb603 commited on
Commit
1c9fb1a
1 Parent(s): 0d60beb

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +100 -24
README.md CHANGED
@@ -1,41 +1,117 @@
1
  ---
 
 
2
  tags:
3
- - text-to-image
4
- - stable-diffusion
5
- - lora
6
- - diffusers
7
- - template:sd-lora
 
 
 
8
  widget:
9
- - text: >-
10
- A simple, clear line drawing of a right-angled triangle. The right angle is
11
- positioned at the bottom left corner. The base of the triangle is labeled as
12
- '4 cm' and the height is labeled as '5 cm' The hypotenuse connects the top
13
- of the height to the end of the base. The triangle is drawn on a plain white
14
- background.
15
  parameters:
16
- negative_prompt: blurry, cropped, ugly, 3d, colorful
17
  output:
18
- url: images/right_triangle_4_5.png
19
- base_model: stabilityai/stable-diffusion-3-medium
20
- instance_prompt: >-
21
- a clean diagram of right triangle with base label "5cm" and height label
22
- "3cm", plane white background
23
- license: apache-2.0
24
  ---
 
25
  # SD3-medium-Geometry-Diagrams-Lora
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  <Gallery />
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- ## Trigger words
31
 
32
- You should use `a clean diagram of right triangle with base label &quot;5cm&quot; and height label &quot;3cm&quot;` to trigger the image generation.
33
 
34
- You should use `plane white background` to trigger the image generation.
35
 
 
 
 
36
 
37
- ## Download model
 
 
 
38
 
39
- Weights for this model are available in Safetensors format.
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
- [Download](/Mujeeb603/SD3-medium-Geometry-Diagrams-Lora/tree/main) them in the Files & versions tab.
 
1
  ---
2
+ license: other
3
+ base_model: "stabilityai/stable-diffusion-3-medium-diffusers"
4
  tags:
5
+ - sd3
6
+ - sd3-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - simpletuner
10
+ - lora
11
+ - template:sd-lora
12
+ inference: true
13
  widget:
14
+ - text: 'unconditional (blank prompt)'
 
 
 
 
 
15
  parameters:
16
+ negative_prompt: 'blurry, cropped, ugly, 3d, colorful'
17
  output:
18
+ url: ./assets/image_0_0.png
19
+ - text: 'A simple, clear line drawing of a right-angled triangle. The right angle is positioned at the bottom left corner. The base of the triangle is labeled as ''4 cm'' and the height is labeled as ''5 cm''. The triangle is drawn on a plain white background.'
20
+ parameters:
21
+ negative_prompt: 'blurry, cropped, ugly, 3d, colorful'
22
+ output:
23
+ url: ./assets/image_1_0.png
24
  ---
25
+
26
  # SD3-medium-Geometry-Diagrams-Lora
27
 
28
+ This is a standard PEFT LoRA derived from [stabilityai/stable-diffusion-3-medium-diffusers](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers).
29
+
30
+
31
+ The main validation prompt used during training was:
32
+
33
+
34
+
35
+ ```
36
+ A simple, clear line drawing of a right-angled triangle. The right angle is positioned at the bottom left corner. The base of the triangle is labeled as '4 cm' and the height is labeled as '5 cm'. The triangle is drawn on a plain white background.
37
+ ```
38
+
39
+ ## Validation settings
40
+ - CFG: `3.0`
41
+ - CFG Rescale: `0.0`
42
+ - Steps: `25`
43
+ - Sampler: `None`
44
+ - Seed: `42`
45
+ - Resolution: `512`
46
+
47
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
48
+
49
+ You can find some example images in the following gallery:
50
+
51
+
52
  <Gallery />
53
 
54
+ The text encoder **was not** trained.
55
+ You may reuse the base model text encoder for inference.
56
+
57
+
58
+ ## Training settings
59
+
60
+ - Training epochs: 0
61
+ - Training steps: 100
62
+ - Learning rate: 0.0008
63
+ - Effective batch size: 1
64
+ - Micro-batch size: 1
65
+ - Gradient accumulation steps: 1
66
+ - Number of GPUs: 1
67
+ - Prediction type: flow-matching
68
+ - Rescaled betas zero SNR: False
69
+ - Optimizer: adamw_bf16
70
+ - Precision: bf16
71
+ - Quantised: No
72
+ - Xformers: Not used
73
+ - LoRA Rank: 32
74
+ - LoRA Alpha: None
75
+ - LoRA Dropout: 0.1
76
+ - LoRA initialisation style: default
77
+
78
+
79
+ ## Datasets
80
+
81
+ ### right-triangles
82
+ - Repeats: 0
83
+ - Total number of images: 348
84
+ - Total number of aspect buckets: 1
85
+ - Resolution: 512 px
86
+ - Cropped: True
87
+ - Crop style: center
88
+ - Crop aspect: square
89
 
 
90
 
91
+ ## Inference
92
 
 
93
 
94
+ ```python
95
+ import torch
96
+ from diffusers import DiffusionPipeline
97
 
98
+ model_id = 'stabilityai/stable-diffusion-3-medium-diffusers'
99
+ adapter_id = 'Mujeeb603/SD3-medium-Geometry-Diagrams-Lora'
100
+ pipeline = DiffusionPipeline.from_pretrained(model_id)
101
+ pipeline.load_lora_weights(adapter_id)
102
 
103
+ prompt = "A simple, clear line drawing of a right-angled triangle. The right angle is positioned at the bottom left corner. The base of the triangle is labeled as '4 cm' and the height is labeled as '5 cm'. The triangle is drawn on a plain white background."
104
+ negative_prompt = 'blurry, cropped, ugly, 3d, colorful'
105
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
106
+ image = pipeline(
107
+ prompt=prompt,
108
+ negative_prompt=negative_prompt,
109
+ num_inference_steps=25,
110
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
111
+ width=512,
112
+ height=512,
113
+ guidance_scale=3.0,
114
+ ).images[0]
115
+ image.save("output.png", format="PNG")
116
+ ```
117