gvecchio codersan commited on
Commit
4d45273
·
verified ·
1 Parent(s): bc6e13a

Update README.md (#3)

Browse files

- Update README.md (a1e238edcf168e7795bfa1c3551bb978bdb274fa)


Co-authored-by: Ali Mobarekati <[email protected]>

Files changed (1) hide show
  1. README.md +19 -15
README.md CHANGED
@@ -63,8 +63,11 @@ pipe = DiffusionPipeline.from_pretrained(
63
  torch_dtype=torch.float16
64
  )
65
 
 
 
 
66
  # Text prompt example
67
- material = pipeline(
68
  prompt="Old rusty metal bars with peeling paint",
69
  guidance_scale=10.0,
70
  tileable=True,
@@ -73,7 +76,7 @@ material = pipeline(
73
  ).images[0]
74
 
75
  # Image prompt example
76
- material = pipeline(
77
  prompt=load_image("path/to/input_image.jpg"),
78
  guidance_scale=10.0,
79
  tileable=True,
@@ -82,11 +85,11 @@ material = pipeline(
82
  ).images[0]
83
 
84
  # The output will include basecolor, normal, height, roughness, and metallic maps
85
- basecolor = image.basecolor
86
- normal = image.normal
87
- height = image.height
88
- roughness = image.roughness
89
- metallic = image.metallic
90
  ```
91
 
92
  ### Consistency model
@@ -113,10 +116,11 @@ pipe = DiffusionPipeline.from_pretrained(
113
  # Replace scheduler with LCM scheduler
114
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
115
 
116
- pipe.to(device)
 
117
 
118
  # Text prompt example
119
- material = pipeline(
120
  prompt="Old rusty metal bars with peeling paint",
121
  guidance_scale=10.0,
122
  tileable=True,
@@ -125,7 +129,7 @@ material = pipeline(
125
  ).images[0]
126
 
127
  # Image prompt example
128
- material = pipeline(
129
  prompt=load_image("path/to/input_image.jpg"),
130
  guidance_scale=10.0,
131
  tileable=True,
@@ -134,11 +138,11 @@ material = pipeline(
134
  ).images[0]
135
 
136
  # The output will include basecolor, normal, height, roughness, and metallic maps
137
- basecolor = image.basecolor
138
- normal = image.normal
139
- height = image.height
140
- roughness = image.roughness
141
- metallic = image.metallic
142
  ```
143
 
144
  ## 🗂️ Training Data
 
63
  torch_dtype=torch.float16
64
  )
65
 
66
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
67
+ pipe = pipe.to(device)
68
+
69
  # Text prompt example
70
+ material = pipe(
71
  prompt="Old rusty metal bars with peeling paint",
72
  guidance_scale=10.0,
73
  tileable=True,
 
76
  ).images[0]
77
 
78
  # Image prompt example
79
+ material = pipe(
80
  prompt=load_image("path/to/input_image.jpg"),
81
  guidance_scale=10.0,
82
  tileable=True,
 
85
  ).images[0]
86
 
87
  # The output will include basecolor, normal, height, roughness, and metallic maps
88
+ basecolor = material.basecolor
89
+ normal = material.normal
90
+ height = material.height
91
+ roughness = material.roughness
92
+ metallic = material.metallic
93
  ```
94
 
95
  ### Consistency model
 
116
  # Replace scheduler with LCM scheduler
117
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
118
 
119
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
120
+ pipe = pipe.to(device)
121
 
122
  # Text prompt example
123
+ material = pipe(
124
  prompt="Old rusty metal bars with peeling paint",
125
  guidance_scale=10.0,
126
  tileable=True,
 
129
  ).images[0]
130
 
131
  # Image prompt example
132
+ material = pipe(
133
  prompt=load_image("path/to/input_image.jpg"),
134
  guidance_scale=10.0,
135
  tileable=True,
 
138
  ).images[0]
139
 
140
  # The output will include basecolor, normal, height, roughness, and metallic maps
141
+ basecolor = material.basecolor
142
+ normal = material.normal
143
+ height = material.height
144
+ roughness = material.roughness
145
+ metallic = material.metallic
146
  ```
147
 
148
  ## 🗂️ Training Data