Spaces:
Sleeping
Sleeping
Srimanth Agastyaraju
commited on
Commit
·
00deb53
1
Parent(s):
51e3744
Add requirements.txt
Browse files- .ipynb_checkpoints/app-checkpoint.py +2 -1
- .ipynb_checkpoints/requirements-checkpoint.txt +5 -0
- app.py +2 -1
- requirements.txt +5 -0
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
from huggingface_hub import model_info
|
3 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
4 |
|
@@ -6,7 +7,7 @@ def inference(prompt, model, n_images, seed):
|
|
6 |
# Load the model
|
7 |
info = model_info(model)
|
8 |
model_base = info.cardData["base_model"]
|
9 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_base)
|
10 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
11 |
|
12 |
pipe.unet.load_attn_procs(model)
|
|
|
1 |
import streamlit as st
|
2 |
+
import torch
|
3 |
from huggingface_hub import model_info
|
4 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
5 |
|
|
|
7 |
# Load the model
|
8 |
info = model_info(model)
|
9 |
model_base = info.cardData["base_model"]
|
10 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_base, torch_dtype=torch.float32)
|
11 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
12 |
|
13 |
pipe.unet.load_attn_procs(model)
|
.ipynb_checkpoints/requirements-checkpoint.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
diffusers
|
3 |
+
huggingface_hub
|
4 |
+
streamlit
|
5 |
+
torch
|
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
from huggingface_hub import model_info
|
3 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
4 |
|
@@ -6,7 +7,7 @@ def inference(prompt, model, n_images, seed):
|
|
6 |
# Load the model
|
7 |
info = model_info(model)
|
8 |
model_base = info.cardData["base_model"]
|
9 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_base)
|
10 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
11 |
|
12 |
pipe.unet.load_attn_procs(model)
|
|
|
1 |
import streamlit as st
|
2 |
+
import torch
|
3 |
from huggingface_hub import model_info
|
4 |
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
5 |
|
|
|
7 |
# Load the model
|
8 |
info = model_info(model)
|
9 |
model_base = info.cardData["base_model"]
|
10 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_base, torch_dtype=torch.float32)
|
11 |
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
12 |
|
13 |
pipe.unet.load_attn_procs(model)
|
requirements.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
diffusers
|
3 |
+
huggingface_hub
|
4 |
+
streamlit
|
5 |
+
torch
|