Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,15 +2,10 @@ import gradio as gr
|
|
| 2 |
import torch
|
| 3 |
from diffusers import FluxFillPipeline
|
| 4 |
from diffusers.utils import load_image
|
| 5 |
-
#from controlnet_flux import FluxControlNetModel
|
| 6 |
-
#from transformer_flux import FluxTransformer2DModel
|
| 7 |
-
#from pipeline_flux_controlnet_inpaint import FluxControlNetInpaintingPipeline
|
| 8 |
-
#from transformers import T5EncoderModel, CLIPTextModel
|
| 9 |
from PIL import Image, ImageDraw
|
| 10 |
import numpy as np
|
| 11 |
import spaces
|
| 12 |
from huggingface_hub import hf_hub_download
|
| 13 |
-
#from optimum.quanto import freeze, qfloat8, quantize
|
| 14 |
|
| 15 |
pipe = FluxFillPipeline.from_pretrained(
|
| 16 |
"black-forest-labs/FLUX.1-Fill-dev",
|
|
@@ -202,7 +197,7 @@ css = """
|
|
| 202 |
|
| 203 |
title = """<h1 align="center">FLUX Image Outpaint</h1>
|
| 204 |
<div align="center">Drop an image you would like to extend, pick your expected ratio and hit Generate.</div>
|
| 205 |
-
<div align="center">Using <a href="
|
| 206 |
"""
|
| 207 |
|
| 208 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 2 |
import torch
|
| 3 |
from diffusers import FluxFillPipeline
|
| 4 |
from diffusers.utils import load_image
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
import numpy as np
|
| 7 |
import spaces
|
| 8 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 9 |
|
| 10 |
pipe = FluxFillPipeline.from_pretrained(
|
| 11 |
"black-forest-labs/FLUX.1-Fill-dev",
|
|
|
|
| 197 |
|
| 198 |
title = """<h1 align="center">FLUX Image Outpaint</h1>
|
| 199 |
<div align="center">Drop an image you would like to extend, pick your expected ratio and hit Generate.</div>
|
| 200 |
+
<div align="center">Using <a href="https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev" target="_blank"><code>FLUX.1-Fill-dev</code></a></div>
|
| 201 |
"""
|
| 202 |
|
| 203 |
with gr.Blocks(css=css) as demo:
|