Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,11 +33,11 @@ def init_pool():
|
|
| 33 |
port_inc()
|
| 34 |
|
| 35 |
def pipe_t2i():
|
| 36 |
-
PIPE = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token"))
|
| 37 |
return PIPE
|
| 38 |
|
| 39 |
def pipe_i2i():
|
| 40 |
-
PIPE = StableDiffusionXLImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
| 41 |
PIPE.unet = torch.compile(PIPE.unet, mode="reduce-overhead", fullgraph=True)
|
| 42 |
return PIPE
|
| 43 |
|
|
|
|
| 33 |
port_inc()
|
| 34 |
|
| 35 |
def pipe_t2i():
|
| 36 |
+
PIPE = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16, token=os.getenv("hf_token")).to("cuda")
|
| 37 |
return PIPE
|
| 38 |
|
| 39 |
def pipe_i2i():
|
| 40 |
+
PIPE = StableDiffusionXLImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True).to("cuda")
|
| 41 |
PIPE.unet = torch.compile(PIPE.unet, mode="reduce-overhead", fullgraph=True)
|
| 42 |
return PIPE
|
| 43 |
|