Spaces:
Runtime error
Runtime error
Mobil-DataLab
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import torch
|
2 |
from controlnet_aux import CannyDetector
|
3 |
-
from diffusers import
|
4 |
from diffusers.utils import load_image
|
5 |
import gradio as gr
|
6 |
import random
|
@@ -17,12 +17,9 @@ os.system("pip install -U diffusers controlnet_aux mediapipe")
|
|
17 |
MAX_SEED = 2**32 - 1
|
18 |
MAX_IMAGE_SIZE = 1024
|
19 |
|
20 |
-
# Inicializaci贸n del
|
21 |
-
|
22 |
"black-forest-labs/FLUX.1-Canny-dev", torch_dtype=torch.float16
|
23 |
-
)
|
24 |
-
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
25 |
-
"CompVis/stable-diffusion-v1-4", controlnet=controlnet, torch_dtype=torch.float16
|
26 |
).to("cuda" if torch.cuda.is_available() else "cpu")
|
27 |
|
28 |
# Procesador Canny
|
|
|
1 |
import torch
|
2 |
from controlnet_aux import CannyDetector
|
3 |
+
from diffusers import FluxControlPipeline
|
4 |
from diffusers.utils import load_image
|
5 |
import gradio as gr
|
6 |
import random
|
|
|
17 |
MAX_SEED = 2**32 - 1
|
18 |
MAX_IMAGE_SIZE = 1024
|
19 |
|
20 |
+
# Inicializaci贸n del pipeline Flux Canny Dev
|
21 |
+
pipe = FluxControlPipeline.from_pretrained(
|
22 |
"black-forest-labs/FLUX.1-Canny-dev", torch_dtype=torch.float16
|
|
|
|
|
|
|
23 |
).to("cuda" if torch.cuda.is_available() else "cpu")
|
24 |
|
25 |
# Procesador Canny
|