Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,23 @@
|
|
1 |
import argparse
|
2 |
import os
|
|
|
|
|
3 |
from datetime import datetime
|
4 |
|
5 |
import gradio as gr
|
|
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
from diffusers.image_processor import VaeImageProcessor
|
9 |
from huggingface_hub import snapshot_download
|
10 |
from PIL import Image
|
11 |
-
|
12 |
from model.cloth_masker import AutoMasker, vis_mask
|
13 |
-
from model.pipeline import CatVTONPipeline
|
|
|
14 |
from utils import init_weight_dtype, resize_and_crop, resize_and_padding
|
15 |
|
|
|
16 |
def parse_args():
|
17 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
18 |
parser.add_argument(
|
|
|
1 |
import argparse
|
2 |
import os
|
3 |
+
os.environ['CUDA_HOME'] = '/usr/local/cuda'
|
4 |
+
os.environ['PATH'] = os.environ['PATH'] + ':/usr/local/cuda/bin'
|
5 |
from datetime import datetime
|
6 |
|
7 |
import gradio as gr
|
8 |
+
import spaces
|
9 |
import numpy as np
|
10 |
import torch
|
11 |
from diffusers.image_processor import VaeImageProcessor
|
12 |
from huggingface_hub import snapshot_download
|
13 |
from PIL import Image
|
14 |
+
torch.jit.script = lambda f: f
|
15 |
from model.cloth_masker import AutoMasker, vis_mask
|
16 |
+
from model.pipeline import CatVTONPipeline, CatVTONPix2PixPipeline
|
17 |
+
from model.flux.pipeline_flux_tryon import FluxTryOnPipeline
|
18 |
from utils import init_weight_dtype, resize_and_crop, resize_and_padding
|
19 |
|
20 |
+
|
21 |
def parse_args():
|
22 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
23 |
parser.add_argument(
|