Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from diffusers.utils import load_image
|
|
| 8 |
|
| 9 |
from huggingface_hub import login
|
| 10 |
hf_token = os.environ.get("HF_TOKEN")
|
| 11 |
-
login(hf_token)
|
| 12 |
|
| 13 |
def load_pipeline(four_bit=False):
|
| 14 |
orig_pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
|
@@ -42,7 +42,7 @@ def get_canny(control_image):
|
|
| 42 |
)
|
| 43 |
return control_image
|
| 44 |
|
| 45 |
-
def main(ref_filepath, prompt, use_nf4):
|
| 46 |
pipe = load_pipeline(use_nf4)
|
| 47 |
control_image = load_image(ref_filepath)
|
| 48 |
control_image = get_canny(control_image)
|
|
|
|
| 8 |
|
| 9 |
from huggingface_hub import login
|
| 10 |
hf_token = os.environ.get("HF_TOKEN")
|
| 11 |
+
login(token=hf_token)
|
| 12 |
|
| 13 |
def load_pipeline(four_bit=False):
|
| 14 |
orig_pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
|
|
|
| 42 |
)
|
| 43 |
return control_image
|
| 44 |
|
| 45 |
+
def main(ref_filepath, prompt, use_nf4, progress=gr.Progress(track_tqdm=True)):
|
| 46 |
pipe = load_pipeline(use_nf4)
|
| 47 |
control_image = load_image(ref_filepath)
|
| 48 |
control_image = get_canny(control_image)
|