Skip to content

Commit

Permalink
name changed
Browse files Browse the repository at this point in the history
Signed-off-by: ftgreat <[email protected]>
  • Loading branch information
ftgreat committed Apr 12, 2023
1 parent e38ad79 commit 8253a8e
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 1,307 deletions.
2 changes: 1 addition & 1 deletion examples/AltCLIP/altclip_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
tokenizer = loader.get_tokenizer()

def inference():
image = Image.open("./dog.jpeg")
image = Image.open("./examples/AltCLIP/dog.jpeg")
image = transform(image)
image = torch.tensor(image["pixel_values"]).to(device)
tokenizer_out = tokenizer(["a rat", "a dog", "a cat"],
Expand Down
6 changes: 3 additions & 3 deletions flagai/auto_model/auto_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __getattr__(self, name):
"cpm3_lm": ("flagai.model.cpm3_model", "CPM3"),
"cpm3_train": ("flagai.model.cpm3_train_model", "CPM3"),
"diffusion_text2img": ("flagai.model.mm.AltDiffusion", "LatentDiffusion"),
"diffusion2_text2img": ("flagai.model.mm.AltDiffusionM18", "LatentDiffusion"),
"diffusion_m18_text2img": ("flagai.model.mm.AltDiffusionM18", "LatentDiffusion"),
"altclip_txt_img_matching": ("flagai.model.mm.AltCLIP", "AltCLIP"),
"evaclip_txt_img_matching": ("flagai.model.mm.eva_clip_model", "EVA_CLIP"),
}
Expand Down Expand Up @@ -122,9 +122,9 @@ def __getattr__(self, name):
"altdiffusion":
["flagai.model.mm.diffusion", "LatentDiffusion", "diffusion", "mm","flagai.model.mm.AltCLIP", "AltCLIPProcess"],
"altdiffusion-m9":
["flagai.model.mm.diffusion2", "LatentDiffusion", "diffusion", "mm","flagai.model.mm.AltCLIP", "AltCLIPProcess"],
["flagai.model.mm.diffusionM18", "LatentDiffusion", "diffusion", "mm","flagai.model.mm.AltCLIP", "AltCLIPProcess"],
"altdiffusion-m18":
["flagai.model.mm.Altdiffusion2", "LatentDiffusion", "diffusion2", "mm","flagai.model.mm.AltCLIP", "AltCLIPProcess"],
["flagai.model.mm.AltdiffusionM18", "LatentDiffusion", "diffusion_m18", "mm","flagai.model.mm.AltCLIP", "AltCLIPProcess"],
"swinv1-base-patch4-window7-224":
["flagai.model.vision.swinv1", "SwinTransformer", "swinv1", "vision"],
"swinv2-base-patch4-window8-256":
Expand Down
2 changes: 0 additions & 2 deletions flagai/model/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,4 @@ def download(cls,
if not file_name.endswith("bin"):
_get_vocab_path(os.path.join(download_path, model_name), file_name, model_id)
else :
if only_download_config:
continue
_get_checkpoint_path(os.path.join(download_path, model_name), file_name, model_id)
File renamed without changes.
7 changes: 4 additions & 3 deletions flagai/model/mm/modules/diffusionmodules/openaimodel.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from abc import abstractmethod
import math
import inspect

import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.init import normal_, xavier_normal_, xavier_uniform_, kaiming_normal_, kaiming_uniform_, zeros_

from ldm.modules.diffusionmodules.util import (
from flagai.model.mm.modules.diffusionmodules.util import (
checkpoint,
conv_nd,
linear,
Expand All @@ -16,8 +17,8 @@
normalization,
timestep_embedding,
)
from ldm.modules.attention import SpatialTransformer
from ldm.util import exists
from flagai.model.mm.modules.attention import SpatialTransformer
from flagai.model.mm.utils import exists


# dummy replace
Expand Down
81 changes: 0 additions & 81 deletions flagai/model/mm/modules/diffusionmodules/upscaling.py

This file was deleted.

Empty file.
Loading

0 comments on commit 8253a8e

Please sign in to comment.