Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,12 @@ import random
|
|
10 |
import json
|
11 |
from math import floor
|
12 |
from typing import Any, Dict, List, Optional, Union
|
13 |
-
|
14 |
import torch
|
15 |
import numpy as np
|
16 |
import requests
|
17 |
from PIL import Image
|
18 |
-
|
19 |
# Diffusers imports
|
20 |
from diffusers import (
|
21 |
DiffusionPipeline,
|
@@ -28,6 +28,7 @@ from diffusers.utils import load_image
|
|
28 |
# Hugging Face Hub
|
29 |
from huggingface_hub import ModelCard, HfFileSystem
|
30 |
|
|
|
31 |
# Gradio (UI)
|
32 |
import gradio as gr
|
33 |
|
@@ -502,17 +503,7 @@ class ModelManager:
|
|
502 |
##############################
|
503 |
# ===== frontend.py =====
|
504 |
##############################
|
505 |
-
|
506 |
-
# If unavailable, we define a dummy decorator.
|
507 |
-
try:
|
508 |
-
import spaces
|
509 |
-
except ImportError:
|
510 |
-
class spaces:
|
511 |
-
@staticmethod
|
512 |
-
def GPU(duration):
|
513 |
-
def decorator(func):
|
514 |
-
return func
|
515 |
-
return decorator
|
516 |
|
517 |
class Frontend:
|
518 |
def __init__(self, model_manager: ModelManager):
|
|
|
10 |
import json
|
11 |
from math import floor
|
12 |
from typing import Any, Dict, List, Optional, Union
|
13 |
+
from flux_app.lora import loras
|
14 |
import torch
|
15 |
import numpy as np
|
16 |
import requests
|
17 |
from PIL import Image
|
18 |
+
import spaces
|
19 |
# Diffusers imports
|
20 |
from diffusers import (
|
21 |
DiffusionPipeline,
|
|
|
28 |
# Hugging Face Hub
|
29 |
from huggingface_hub import ModelCard, HfFileSystem
|
30 |
|
31 |
+
|
32 |
# Gradio (UI)
|
33 |
import gradio as gr
|
34 |
|
|
|
503 |
##############################
|
504 |
# ===== frontend.py =====
|
505 |
##############################
|
506 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
|
508 |
class Frontend:
|
509 |
def __init__(self, model_manager: ModelManager):
|