CiaraRowles commited on
Commit
24957ab
·
verified ·
1 Parent(s): 0dbe586

Update controlnet/callable_functions.py

Browse files
Files changed (1) hide show
  1. controlnet/callable_functions.py +2 -2
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 = None
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(