Futuretop commited on
Commit
25b1295
·
verified ·
1 Parent(s): 36b0cce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -7,13 +7,11 @@ REVISION = "ceaf371f01ef66192264811b390bccad475a4f02"
7
 
8
  LOCAL_FLORENCE = snapshot_download(
9
  repo_id="microsoft/Florence-2-base",
10
- revision=REVISION,
11
- trust_remote_code=True,
12
  )
13
 
14
  LOCAL_TURBOX = snapshot_download(
15
- repo_id="tensorart/stable-diffusion-3.5-large-TurboX",
16
- trust_remote_code=True,
17
  )
18
 
19
  LOCAL_FLORENCE_DIR = snapshot_download(
@@ -70,10 +68,10 @@ _PrC.__getattribute__ = _getattr
70
 
71
  # Florence-2 로드
72
  device = "cuda" if torch.cuda.is_available() else "cpu"
73
- florence_model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base', revision = REVISION, trust_remote_code=True, torch_dtype=torch.float16)
74
  florence_model.to("cpu")
75
  florence_model.eval()
76
- florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base', revision = REVISION, trust_remote_code=True)
77
 
78
  # Stable Diffusion TurboX 로드
79
 
@@ -81,7 +79,7 @@ diffusers.StableDiffusion3Pipeline = StableDiffusionPipeline
81
 
82
  model_repo = "tensorart/stable-diffusion-3.5-large-TurboX"
83
  pipe = DiffusionPipeline.from_pretrained(
84
- model_repo,
85
  trust_remote_code=True,
86
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32
87
  )
 
7
 
8
  LOCAL_FLORENCE = snapshot_download(
9
  repo_id="microsoft/Florence-2-base",
10
+ revision=REVISION
 
11
  )
12
 
13
  LOCAL_TURBOX = snapshot_download(
14
+ repo_id="tensorart/stable-diffusion-3.5-large-TurboX"
 
15
  )
16
 
17
  LOCAL_FLORENCE_DIR = snapshot_download(
 
68
 
69
  # Florence-2 로드
70
  device = "cuda" if torch.cuda.is_available() else "cpu"
71
+ florence_model = AutoModelForCausalLM.from_pretrained(LOCAL_FLORENCE, trust_remote_code=True, torch_dtype=torch.float16)
72
  florence_model.to("cpu")
73
  florence_model.eval()
74
+ florence_processor = AutoProcessor.from_pretrained(LOCAL_FLORENCE, trust_remote_code=True)
75
 
76
  # Stable Diffusion TurboX 로드
77
 
 
79
 
80
  model_repo = "tensorart/stable-diffusion-3.5-large-TurboX"
81
  pipe = DiffusionPipeline.from_pretrained(
82
+ LOCAL_TURBOX,
83
  trust_remote_code=True,
84
  torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32
85
  )