uripper commited on
Commit
f8e8a2d
1 Parent(s): 195f198
.gitignore CHANGED
@@ -3,3 +3,4 @@ model.pth
3
  scratch.ipynb
4
  sparsify.ipynb
5
  Untitled-1.py
 
 
3
  scratch.ipynb
4
  sparsify.ipynb
5
  Untitled-1.py
6
+ testing_pipelines.ipynb
GIANNIS CHANGED
@@ -1 +1 @@
1
- Subproject commit ac14f85ffa5e31a729781061172ecc4042644bc2
 
1
+ Subproject commit 7a0f21e34b5fc9d30ada99349d6be6fed9301845
app.py CHANGED
@@ -1,14 +1,14 @@
1
  import gradio as gr
2
- from diffusers import DDPMPipeline, DDPMScheduler
3
  import torch
4
  import random
5
  import PIL
6
  import os
7
 
8
- scheduler = DDPMScheduler(num_train_timesteps=200,beta_schedule="linear")
9
- pipeline = DDPMPipeline.from_pretrained("uripper/GIANNIS", revision="ONNX", scheduler=scheduler)
10
- num_imgs = len(os.listdir("GIANNIS\stored_images"))
11
- imgs = os.listdir("GIANNIS\stored_images")
12
 
13
 
14
  def generate_img():
@@ -27,13 +27,13 @@ def generate_img():
27
  pass
28
  images= pipeline().images
29
  im = images[0]
30
- im.save(f"GIANNIS\stored_images\{filename}.png")
31
  return im
32
 
33
- def show_random_image(num_imgs = num_imgs, imgs = imgs):
34
- ran_img = random.randint(1, num_imgs)-1
35
- display_img = "GIANNIS\\stored_images\\"+imgs[ran_img]
36
- return PIL.Image.open(display_img)
37
 
38
  # for i in range(100):
39
  # generate_img()
 
1
  import gradio as gr
2
+ from diffusers import PNDMPipeline, PNDMScheduler
3
  import torch
4
  import random
5
  import PIL
6
  import os
7
 
8
+ scheduler = PNDMScheduler(num_train_timesteps=1000,beta_schedule="linear")
9
+ pipeline = PNDMPipeline.from_pretrained("uripper/GIANNIS", scheduler=scheduler)
10
+ # num_imgs = len(os.listdir("\stored_images"))
11
+ # imgs = os.listdir("\stored_images")
12
 
13
 
14
  def generate_img():
 
27
  pass
28
  images= pipeline().images
29
  im = images[0]
30
+ # im.save(f"GIANNIS\stored_images\{filename}.png")
31
  return im
32
 
33
+ # def show_random_image(num_imgs = num_imgs, imgs = imgs):
34
+ # ran_img = random.randint(1, num_imgs)-1
35
+ # display_img = "GIANNIS\\stored_images\\"+imgs[ran_img]
36
+ # return PIL.Image.open(display_img)
37
 
38
  # for i in range(100):
39
  # generate_img()
stored_images/banana_20_shark_71_bear.png ADDED
stored_images/butterfly_92_orange_29_parrot.png ADDED
stored_images/camel_73_kitten_22_zebra.png ADDED
stored_images/duck_43_apple_57_frog.png ADDED
stored_images/fish_76_goat_25_banana.png ADDED
stored_images/octopus_34_wolf_91_elephant.png ADDED
stored_images/seal_6_chicken_44_zebra.png ADDED
stored_images/snake_29_giraffe_52_raccoon.png ADDED