Update app.py
Browse files
app.py
CHANGED
|
@@ -5,11 +5,15 @@ import torch
|
|
| 5 |
from diffusers import FluxPipeline
|
| 6 |
from diffusers import FluxImg2ImgPipeline
|
| 7 |
from diffusers.utils import load_image
|
|
|
|
|
|
|
| 8 |
from huggingface_hub.utils import RepositoryNotFoundError
|
| 9 |
|
| 10 |
pipeline = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16).to("cuda")
|
| 11 |
pipelineImg = FluxImg2ImgPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16).to("cuda")
|
| 12 |
|
|
|
|
|
|
|
| 13 |
@spaces.GPU(duration=70)
|
| 14 |
def generate(image, prompt, negative_prompt, width, height, sample_steps, lora_id):
|
| 15 |
try:
|
|
|
|
| 5 |
from diffusers import FluxPipeline
|
| 6 |
from diffusers import FluxImg2ImgPipeline
|
| 7 |
from diffusers.utils import load_image
|
| 8 |
+
|
| 9 |
+
|
| 10 |
from huggingface_hub.utils import RepositoryNotFoundError
|
| 11 |
|
| 12 |
pipeline = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16).to("cuda")
|
| 13 |
pipelineImg = FluxImg2ImgPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16).to("cuda")
|
| 14 |
|
| 15 |
+
|
| 16 |
+
|
| 17 |
@spaces.GPU(duration=70)
|
| 18 |
def generate(image, prompt, negative_prompt, width, height, sample_steps, lora_id):
|
| 19 |
try:
|