Spaces:
Runtime error
Runtime error
sudharshan106
commited on
Commit
•
622c81b
1
Parent(s):
1a9d888
Update app.py
Browse files
app.py
CHANGED
@@ -69,18 +69,19 @@ elif selected_choice=="Captured":
|
|
69 |
image_file = Image.open(uploaded_file)
|
70 |
image_file = image_file.resize((360,360), Image.LANCZOS)
|
71 |
st.image(image_file)
|
|
|
|
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
depth2image = StableDiffusionDepth2ImgPipeline.from_pretrained(
|
76 |
"stabilityai/stable-diffusion-2-depth",
|
77 |
torch_dtype=torch.float32,
|
78 |
).to("cpu")
|
79 |
|
80 |
-
prompt = st.text_input("write prompt for depth to image")
|
81 |
|
82 |
-
|
83 |
strength=0.8,num_inference_steps=10).images[0]
|
84 |
-
|
|
|
|
|
85 |
with col2:
|
86 |
st.image(image)
|
|
|
69 |
image_file = Image.open(uploaded_file)
|
70 |
image_file = image_file.resize((360,360), Image.LANCZOS)
|
71 |
st.image(image_file)
|
72 |
+
|
73 |
+
prompt = st.text_input("write prompt for depth to image")
|
74 |
|
75 |
+
depth2image = StableDiffusionDepth2ImgPipeline.from_pretrained(
|
|
|
|
|
76 |
"stabilityai/stable-diffusion-2-depth",
|
77 |
torch_dtype=torch.float32,
|
78 |
).to("cpu")
|
79 |
|
|
|
80 |
|
81 |
+
image = depth2image(prompt=prompt, image=image_file,
|
82 |
strength=0.8,num_inference_steps=10).images[0]
|
83 |
+
|
84 |
+
if st.button("Get Variations"):
|
85 |
+
|
86 |
with col2:
|
87 |
st.image(image)
|