Spaces:
Running
on
Zero
Running
on
Zero
Update controlnet/callable_functions.py
Browse files
controlnet/callable_functions.py
CHANGED
@@ -38,7 +38,7 @@ def use_stylecode(model,image_path, prompt,negative_prompt, num_inference_steps,
|
|
38 |
image = image.resize((512, 512))
|
39 |
|
40 |
# Set up generator with a fixed seed for reproducibility
|
41 |
-
if seed is not None and
|
42 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
43 |
else:
|
44 |
generator = torch.Generator(device="cuda")
|
|
|
38 |
image = image.resize((512, 512))
|
39 |
|
40 |
# Set up generator with a fixed seed for reproducibility
|
41 |
+
if seed is not None and seed != -1:
|
42 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
43 |
else:
|
44 |
generator = torch.Generator(device="cuda")
|