Devticks commited on
Commit
7f9d0aa
·
verified ·
1 Parent(s): 12864d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -56,9 +56,13 @@ if image is not None:
56
 
57
  with st.spinner("🤖 AI is at Work! "):
58
 
59
-
60
- # result = reader.readtext(np.array(input_image))
 
 
 
61
  images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
 
62
  images[0].show()
63
 
64
 
 
56
 
57
  with st.spinner("🤖 AI is at Work! "):
58
 
59
+ model_id = "timbrooks/instruct-pix2pix"
60
+ pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
61
+ pipe.to("cuda")
62
+ pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
63
+
64
  images = pipe(prompt, image=image, num_inference_steps=10, image_guidance_scale=1).images
65
+
66
  images[0].show()
67
 
68