fix(dtype): fix undefined variable
Browse files- README.md +1 -1
- svgdreamer/painter/VPSD_pipeline.py +2 -2
README.md
CHANGED
@@ -114,7 +114,7 @@ python svgdreamer.py x=iconography-s1 skip_sive=False "prompt='an astronaut walk
|
|
114 |
**Script:**
|
115 |
|
116 |
```shell
|
117 |
-
python svgdreamer.py x=iconography "prompt='Sydney opera house. oil painting. by Van Gogh'" result_path='./logs/SydneyOperaHouse-OilPainting'
|
118 |
```
|
119 |
|
120 |
#### ✍️ Painting style
|
|
|
114 |
**Script:**
|
115 |
|
116 |
```shell
|
117 |
+
python svgdreamer.py x=iconography "prompt='Sydney opera house. oil painting. by Van Gogh'" result_path='./logs/SydneyOperaHouse-OilPainting' state.mprec='fp16'
|
118 |
```
|
119 |
|
120 |
#### ✍️ Painting style
|
svgdreamer/painter/VPSD_pipeline.py
CHANGED
@@ -26,7 +26,7 @@ class VectorizedParticleSDSPipeline(torch.nn.Module):
|
|
26 |
diffuser_cfg: DictConfig,
|
27 |
guidance_cfg: DictConfig,
|
28 |
device: torch.device,
|
29 |
-
|
30 |
super().__init__()
|
31 |
self.device = device
|
32 |
self.dtype = torch.float16 if precision == 'fp16' else torch.float32
|
@@ -35,7 +35,7 @@ class VectorizedParticleSDSPipeline(torch.nn.Module):
|
|
35 |
|
36 |
pipe_kwargs = {
|
37 |
"device": self.device,
|
38 |
-
"torch_dtype": torch.float16 if
|
39 |
"local_files_only": not diffuser_cfg.download,
|
40 |
"force_download": diffuser_cfg.force_download,
|
41 |
"resume_download": diffuser_cfg.resume_download,
|
|
|
26 |
diffuser_cfg: DictConfig,
|
27 |
guidance_cfg: DictConfig,
|
28 |
device: torch.device,
|
29 |
+
precision: str):
|
30 |
super().__init__()
|
31 |
self.device = device
|
32 |
self.dtype = torch.float16 if precision == 'fp16' else torch.float32
|
|
|
35 |
|
36 |
pipe_kwargs = {
|
37 |
"device": self.device,
|
38 |
+
"torch_dtype": torch.float16 if precision == 'fp16' else torch.float32,
|
39 |
"local_files_only": not diffuser_cfg.download,
|
40 |
"force_download": diffuser_cfg.force_download,
|
41 |
"resume_download": diffuser_cfg.resume_download,
|