ahmedfaiyaz commited on
Commit
109d584
Β·
verified Β·
1 Parent(s): 71c5c87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -8,15 +8,14 @@ pipeline = DiffusionPipeline.from_pretrained(
8
  "CompVis/stable-diffusion-v1-4",
9
  text_encoder = AutoModel.from_pretrained("csebuetnlp/banglabert"),
10
  custom_pipeline="gr33nr1ng3r/Mukh-Oboyob",
11
- no_safe_serialization=True
12
  )
13
  pipeline.unet.load_attn_procs("gr33nr1ng3r/Mukh-Oboyob")
14
 
15
 
16
  def diffusion(text,num_inference_steps,guidance_scale):
17
  prompt=text
18
- with torch.no_grad():
19
- image = pipeline(prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale,height=128,width=128).images[0]
20
  return image
21
 
22
  mukh_biboron_app = gr.Interface(
 
8
  "CompVis/stable-diffusion-v1-4",
9
  text_encoder = AutoModel.from_pretrained("csebuetnlp/banglabert"),
10
  custom_pipeline="gr33nr1ng3r/Mukh-Oboyob",
11
+
12
  )
13
  pipeline.unet.load_attn_procs("gr33nr1ng3r/Mukh-Oboyob")
14
 
15
 
16
  def diffusion(text,num_inference_steps,guidance_scale):
17
  prompt=text
18
+ image = pipeline(prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale,height=128,width=128).images[0]
 
19
  return image
20
 
21
  mukh_biboron_app = gr.Interface(