Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,6 @@ from pipeline_flux_control_removal import FluxControlRemovalPipeline
|
|
| 16 |
|
| 17 |
torch.set_grad_enabled(False)
|
| 18 |
os.environ['GRADIO_TEMP_DIR'] = './tmp'
|
| 19 |
-
os.environ["flux_train"]
|
| 20 |
image_path = mask_path = None
|
| 21 |
image_examples = [...]
|
| 22 |
image_path = mask_path =None
|
|
@@ -54,7 +53,7 @@ image_examples = [
|
|
| 54 |
|
| 55 |
def load_model(base_model_path, lora_path):
|
| 56 |
global pipe
|
| 57 |
-
transformer = FluxTransformer2DModel.from_pretrained(base_model_path,
|
| 58 |
gr.Info(str(f"Model loading: {int((40 / 100) * 100)}%"))
|
| 59 |
# enable image inputs
|
| 60 |
with torch.no_grad():
|
|
|
|
| 16 |
|
| 17 |
torch.set_grad_enabled(False)
|
| 18 |
os.environ['GRADIO_TEMP_DIR'] = './tmp'
|
|
|
|
| 19 |
image_path = mask_path = None
|
| 20 |
image_examples = [...]
|
| 21 |
image_path = mask_path =None
|
|
|
|
| 53 |
|
| 54 |
def load_model(base_model_path, lora_path):
|
| 55 |
global pipe
|
| 56 |
+
transformer = FluxTransformer2DModel.from_pretrained(base_model_path, subfolder='transformer', torch_dtype=torch.bfloat16)
|
| 57 |
gr.Info(str(f"Model loading: {int((40 / 100) * 100)}%"))
|
| 58 |
# enable image inputs
|
| 59 |
with torch.no_grad():
|