Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def run(image, prompt, prompt_template, style_name):
|
|
88 |
torch.manual_seed(42)
|
89 |
B,C,H,W = c_t.shape
|
90 |
noise = torch.randn((1,4,H//8, W//8), device=c_t.device)
|
91 |
-
output_image = model(c_t, prompt, deterministic=False, r=
|
92 |
output_pil = TF.to_pil_image(output_image[0].cpu()*0.5+0.5)
|
93 |
input_sketch_uri = pil_image_to_data_uri(Image.fromarray(255-np.array(image)))
|
94 |
output_image_uri = pil_image_to_data_uri(output_pil)
|
|
|
88 |
torch.manual_seed(42)
|
89 |
B,C,H,W = c_t.shape
|
90 |
noise = torch.randn((1,4,H//8, W//8), device=c_t.device)
|
91 |
+
output_image = model(c_t, prompt, deterministic=False, r=0.5, noise_map=noise)
|
92 |
output_pil = TF.to_pil_image(output_image[0].cpu()*0.5+0.5)
|
93 |
input_sketch_uri = pil_image_to_data_uri(Image.fromarray(255-np.array(image)))
|
94 |
output_image_uri = pil_image_to_data_uri(output_pil)
|