fdsodfs commited on
Commit
526b755
1 Parent(s): fbe7c5b
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +3 -2
  2. app.py +3 -2
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -10,9 +10,10 @@ def get_stable_diffusion_random_image(prompt):
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True)
11
  pipe = pipe.to(device)
12
  with autocast("cuda"):
13
- image = pipe(prompt, guidance_scale=7.5)
 
14
  return image
15
 
16
 
17
- iface = gr.Interface(fn=get_stable_diffusion_random_image, inputs="text", outputs="image")
18
  iface.launch(share=True)
 
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True)
11
  pipe = pipe.to(device)
12
  with autocast("cuda"):
13
+ image = pipe(prompt, guidance_scale=7.5)["sample"][0]
14
+ print(image)
15
  return image
16
 
17
 
18
+ iface = gr.Interface(fn=get_stable_diffusion_random_image, inputs=["text", "audio"], outputs="video")
19
  iface.launch(share=True)
app.py CHANGED
@@ -10,9 +10,10 @@ def get_stable_diffusion_random_image(prompt):
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True)
11
  pipe = pipe.to(device)
12
  with autocast("cuda"):
13
- image = pipe(prompt, guidance_scale=7.5)
 
14
  return image
15
 
16
 
17
- iface = gr.Interface(fn=get_stable_diffusion_random_image, inputs="text", outputs="image")
18
  iface.launch(share=True)
 
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=True)
11
  pipe = pipe.to(device)
12
  with autocast("cuda"):
13
+ image = pipe(prompt, guidance_scale=7.5)["sample"][0]
14
+ print(image)
15
  return image
16
 
17
 
18
+ iface = gr.Interface(fn=get_stable_diffusion_random_image, inputs=["text", "audio"], outputs="video")
19
  iface.launch(share=True)