Spaces:
Sleeping
Sleeping
Update controlnet/callable_functions.py
Browse files
controlnet/callable_functions.py
CHANGED
@@ -17,7 +17,7 @@ def use_stylecode(model,image_path, prompt,negative_prompt, num_inference_steps,
|
|
17 |
stylecodes_model = StyleCodesModel.from_unet(unet, size_ratio=1.0).to(dtype=torch.float16, device="cuda")
|
18 |
|
19 |
|
20 |
-
print("running prompt = ",prompt, " negative_prompt = ",negative_prompt, " with code ", stylecode)
|
21 |
stylecodes_model.load_model(model)
|
22 |
|
23 |
pipe = StableDiffusionPipelineXSv2.from_pretrained(
|
@@ -41,7 +41,7 @@ def use_stylecode(model,image_path, prompt,negative_prompt, num_inference_steps,
|
|
41 |
if seed is not None and not -1:
|
42 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
43 |
else:
|
44 |
-
generator =
|
45 |
|
46 |
# Run the image through the pipeline with the specified prompt
|
47 |
output_images = pipe(
|
|
|
17 |
stylecodes_model = StyleCodesModel.from_unet(unet, size_ratio=1.0).to(dtype=torch.float16, device="cuda")
|
18 |
|
19 |
|
20 |
+
print("running prompt = ",prompt, " negative_prompt = ",negative_prompt, " with code ", stylecode, " and seed ",seed)
|
21 |
stylecodes_model.load_model(model)
|
22 |
|
23 |
pipe = StableDiffusionPipelineXSv2.from_pretrained(
|
|
|
41 |
if seed is not None and not -1:
|
42 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
43 |
else:
|
44 |
+
generator = torch.Generator(device="cuda")
|
45 |
|
46 |
# Run the image through the pipeline with the specified prompt
|
47 |
output_images = pipe(
|