Spaces:
Paused
Paused
minor
Browse files
app.py
CHANGED
|
@@ -150,12 +150,12 @@ if st.session_state.button_clicked:
|
|
| 150 |
|
| 151 |
prompt = combined_prompts[style].format(image_description=image_description, organ_description=organ_description)
|
| 152 |
print(prompt)
|
| 153 |
-
|
| 154 |
-
|
| 155 |
|
| 156 |
-
|
| 157 |
|
| 158 |
-
|
| 159 |
|
| 160 |
st.session_state.button_disabled = False
|
| 161 |
|
|
|
|
| 150 |
|
| 151 |
prompt = combined_prompts[style].format(image_description=image_description, organ_description=organ_description)
|
| 152 |
print(prompt)
|
| 153 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16")
|
| 154 |
+
pipe.to("cuda")
|
| 155 |
|
| 156 |
+
image = pipe(prompt=prompt).images[0]
|
| 157 |
|
| 158 |
+
st.image(image)
|
| 159 |
|
| 160 |
st.session_state.button_disabled = False
|
| 161 |
|