mfranzon commited on
Commit
a372eb9
·
1 Parent(s): 7a443fd

fix utils and main

Browse files
Files changed (2) hide show
  1. main.py +2 -1
  2. utils.py +1 -1
main.py CHANGED
@@ -63,10 +63,11 @@ if st.button('Submit'):
63
 
64
  if prompt is None:
65
  raise "No prompt, no magic! :("
66
-
67
  with st.spinner('Wait for it...'):
68
  images = pipe_image(prompt=prompt,
69
  init_image=comp_img,
70
  strength=strength)
 
71
  for image in images:
72
  st.image(image)
 
63
 
64
  if prompt is None:
65
  raise "No prompt, no magic! :("
66
+
67
  with st.spinner('Wait for it...'):
68
  images = pipe_image(prompt=prompt,
69
  init_image=comp_img,
70
  strength=strength)
71
+ st.success("Image is ready!")
72
  for image in images:
73
  st.image(image)
utils.py CHANGED
@@ -15,7 +15,7 @@ def pipe_image(prompt,
15
  torch_dtype=torch.float32,
16
  use_auth_token=TOKEN
17
  )
18
- pipe = pipe.to(device)
19
  pipe.enable_attention_slicing()
20
  images = pipe(prompt=prompt,
21
  init_image=init_image,
 
15
  torch_dtype=torch.float32,
16
  use_auth_token=TOKEN
17
  )
18
+ pipe.to(device)
19
  pipe.enable_attention_slicing()
20
  images = pipe(prompt=prompt,
21
  init_image=init_image,