John6666 commited on
Commit
42c14ae
1 Parent(s): f1d6334

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -69,11 +69,11 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scal
69
  pipe.to("cuda")
70
  generator = torch.Generator(device="cuda").manual_seed(seed)
71
 
72
- progress(0, desc="Start Inference.")
73
  with calculateDuration("Generating image"):
74
  # Generate image
75
  modes, images, scales = get_control_params()
76
  if not cn_on or controlnet is None or len(modes) == 0:
 
77
  image = pipe(
78
  prompt=prompt_mash,
79
  num_inference_steps=steps,
@@ -84,7 +84,8 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scal
84
  joint_attention_kwargs={"scale": lora_scale},
85
  ).images[0]
86
  else:
87
-
 
88
  image = pipe(
89
  prompt=prompt_mash,
90
  control_image=images,
 
69
  pipe.to("cuda")
70
  generator = torch.Generator(device="cuda").manual_seed(seed)
71
 
 
72
  with calculateDuration("Generating image"):
73
  # Generate image
74
  modes, images, scales = get_control_params()
75
  if not cn_on or controlnet is None or len(modes) == 0:
76
+ progress(0, desc="Start Inference.")
77
  image = pipe(
78
  prompt=prompt_mash,
79
  num_inference_steps=steps,
 
84
  joint_attention_kwargs={"scale": lora_scale},
85
  ).images[0]
86
  else:
87
+ progress(0, desc="Start Inference with ControlNet.")
88
+ print(modes, scales) #
89
  image = pipe(
90
  prompt=prompt_mash,
91
  control_image=images,