Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,8 @@ from diffusers import DiffusionPipeline
|
|
| 8 |
from huggingface_hub import InferenceClient
|
| 9 |
|
| 10 |
dtype = torch.bfloat16
|
| 11 |
-
device = "cuda"
|
|
|
|
| 12 |
|
| 13 |
#pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
| 14 |
sdxl = InferenceClient(model="stabilityai/stable-diffusion-xl-base-1.0", token=os.environ['HF_TOKEN'])
|
|
@@ -249,7 +250,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 249 |
# generator=generator,
|
| 250 |
# guidance_scale=guidance_scale
|
| 251 |
# ).images[0]
|
| 252 |
-
return
|
| 253 |
final_image_output = gr.Image(label="Final Image", show_label=False)
|
| 254 |
|
| 255 |
gr.on(
|
|
|
|
| 8 |
from huggingface_hub import InferenceClient
|
| 9 |
|
| 10 |
dtype = torch.bfloat16
|
| 11 |
+
device = "cuda"
|
| 12 |
+
#if torch.cuda.is_available() else "cpu"
|
| 13 |
|
| 14 |
#pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
|
| 15 |
sdxl = InferenceClient(model="stabilityai/stable-diffusion-xl-base-1.0", token=os.environ['HF_TOKEN'])
|
|
|
|
| 250 |
# generator=generator,
|
| 251 |
# guidance_scale=guidance_scale
|
| 252 |
# ).images[0]
|
| 253 |
+
return image2, seed
|
| 254 |
final_image_output = gr.Image(label="Final Image", show_label=False)
|
| 255 |
|
| 256 |
gr.on(
|