Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
import torch
|
7 |
from PIL import Image
|
8 |
from torchvision import transforms
|
9 |
-
from dataclasses import dataclass
|
10 |
import math
|
11 |
from typing import Callable
|
12 |
|
@@ -434,7 +434,7 @@ class FluxParams:
|
|
434 |
num_heads: int = 24
|
435 |
depth: int = 19
|
436 |
depth_single_blocks: int = 38
|
437 |
-
axes_dim: list = [16, 56, 56]
|
438 |
theta: int = 10000
|
439 |
qkv_bias: bool = True
|
440 |
guidance_embed: bool = True
|
@@ -567,7 +567,7 @@ def get_schedule(
|
|
567 |
return timesteps.tolist()
|
568 |
|
569 |
def denoise(
|
570 |
-
model: Flux,
|
571 |
img: Tensor,
|
572 |
img_ids: Tensor,
|
573 |
txt: Tensor,
|
|
|
6 |
import torch
|
7 |
from PIL import Image
|
8 |
from torchvision import transforms
|
9 |
+
from dataclasses import dataclass, field
|
10 |
import math
|
11 |
from typing import Callable
|
12 |
|
|
|
434 |
num_heads: int = 24
|
435 |
depth: int = 19
|
436 |
depth_single_blocks: int = 38
|
437 |
+
axes_dim: list[int] = field(default_factory=lambda: [16, 56, 56])
|
438 |
theta: int = 10000
|
439 |
qkv_bias: bool = True
|
440 |
guidance_embed: bool = True
|
|
|
567 |
return timesteps.tolist()
|
568 |
|
569 |
def denoise(
|
570 |
+
model: "Flux",
|
571 |
img: Tensor,
|
572 |
img_ids: Tensor,
|
573 |
txt: Tensor,
|