Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
IrisRainbowNeko committed Aug 29, 2023
1 parent fb89f25 commit 02fb46b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Compared to DreamArtist, DreamArtist++ is more stable with higher image quality
* Min-SNR loss
* Custom optimizer (Lion, DAdaptation, pytorch-optimizer, ...)
* Custom lr scheduler
* SDXL support

## Install

Expand Down
1 change: 1 addition & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ HCP-Diffusion可以通过一个```.yaml```配置文件统一现有大多数训
* Min-SNR loss
* 自定义优化器 (Lion, DAdaptation, pytorch-optimizer, ...)
* 自定义学习率调整器
* SDXL 支持

## 安装
通过pip安装:
Expand Down
7 changes: 7 additions & 0 deletions cfgs/infer/text2img_sdxl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_base_: [cfgs/infer/text2img.yaml]

prompt: ''
neg_prompt: ''

clip_skip: 1
clip_final_norm: False
6 changes: 4 additions & 2 deletions hcpdiff/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from torch.cuda.amp import autocast

from hcpdiff.models import EmbeddingPTHook, TEEXHook, TokenizerHook, LoraBlock
from hcpdiff.models.compose import ComposeTEEXHook, ComposeEmbPTHook
from hcpdiff.models.compose import ComposeTEEXHook, ComposeEmbPTHook, ComposeTextEncoder
from hcpdiff.utils.cfg_net_tools import load_hcpdiff, make_plugin
from hcpdiff.utils.net_utils import to_cpu, to_cuda, auto_tokenizer, auto_text_encoder
from hcpdiff.utils.pipe_hook import HookPipe_T2I, HookPipe_I2I, HookPipe_Inpaint
Expand All @@ -36,7 +36,9 @@ def __init__(self, cfgs):
self.merge_model()

self.pipe = self.pipe.to(torch_dtype=self.dtype)
self.pipe.vae = self.pipe.vae.to(dtype=torch.float32)

if isinstance(self.pipe.text_encoder, ComposeTextEncoder):
self.pipe.vae = self.pipe.vae.to(dtype=torch.float32)

if 'save_model' in self.cfgs and self.cfgs.save_model is not None:
self.save_model(self.cfgs.save_model)
Expand Down

0 comments on commit 02fb46b

Please sign in to comment.