Skip to content

bug fix #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 29, 2025
Prev Previous commit
Next Next commit
bug fix
  • Loading branch information
tenderness-git committed Apr 29, 2025
commit 25147817dde3ec52e74aa994e6e31a747b73c4fd
1 change: 1 addition & 0 deletions diffsynth_engine/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import torch.nn as nn
from typing import Dict, Union
from diffsynth_engine.utils.loader import load_file
from typing import List

from diffsynth_engine.models.basic.lora import LoRALinear, LoRAConv2d
from diffsynth_engine.models.utils import no_init_weights
Expand Down
10 changes: 0 additions & 10 deletions diffsynth_engine/models/flux/flux_dit.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@
config = json.load(f)



def default_patch_callback(hidden_states, controlnet_outputs, index, patch_point: FluxPatchPoint):
for controlnet_output in controlnet_outputs:
if len(controlnet_output) <= index:
continue
# 主模型第i层输出的hidden_states和每个controlnet第i层的输出结果相加
hidden_states = hidden_states + controlnet_output[index]
return hidden_states


class FluxDiTStateDictConverter(StateDictConverter):
def __init__(self):
pass
Expand Down
3 changes: 1 addition & 2 deletions diffsynth_engine/pipelines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import torch
import numpy as np
from typing import Dict, List, Tuple
from PIL import Image, ImageOps
from einops import repeat
from PIL import Image
from dataclasses import dataclass
from diffsynth_engine.utils.loader import load_file
from diffsynth_engine.utils.offload import enable_sequential_cpu_offload
Expand Down
3 changes: 1 addition & 2 deletions diffsynth_engine/pipelines/flux_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import torch
import torch.nn as nn
import math
from typing import Callable, Dict, List, Tuple, Optional
from diffsynth_engine.utils.loader import load_file
from typing import Callable, Dict, List, Optional
from tqdm import tqdm
from PIL import Image
from dataclasses import dataclass
Expand Down
3 changes: 1 addition & 2 deletions diffsynth_engine/pipelines/sd_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import numpy as np
from einops import repeat
from dataclasses import dataclass
from typing import Callable, Dict, Optional, List, Tuple
from diffsynth_engine.utils.loader import load_file
from typing import Callable, Dict, Optional
from tqdm import tqdm
from PIL import Image, ImageOps

Expand Down
3 changes: 1 addition & 2 deletions diffsynth_engine/pipelines/sdxl_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import torch
import numpy as np
from einops import repeat
from typing import Callable, Dict, List, Tuple, Optional
from diffsynth_engine.utils.loader import load_file
from typing import Callable, Dict, Optional
from tqdm import tqdm
from PIL import Image, ImageOps
from dataclasses import dataclass
Expand Down