fdsodfs commited on
Commit
fbe7c5b
1 Parent(s): 3b213f1

Add requirements.txt

Browse files
.gitignore CHANGED
@@ -1 +1,2 @@
1
- flagged/
 
 
1
+ flagged/
2
+ .ipynb_checkpoints/
.ipynb_checkpoints/.gitignore-checkpoint CHANGED
@@ -1 +1,2 @@
1
- flagged/
 
 
1
+ flagged/
2
+ .ipynb_checkpoints/
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -10,7 +10,7 @@ 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).images[0]
14
  return image
15
 
16
 
 
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
 
app.py CHANGED
@@ -10,7 +10,7 @@ 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).images[0]
14
  return image
15
 
16
 
 
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
 
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ diffusers
2
+ transformers
3
+ nvidia-ml-py3
4
+ ftfy
5
+ --extra-index-url https://download.pytorch.org/whl/cu113 torch