Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
naifu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
naifu
Commits
ee7c2797
Commit
ee7c2797
authored
Oct 18, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add full build and support all vram modes
parent
ff28793e
Pipeline
#17251
failed with stages
in 17 minutes and 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
Dockerfile
Dockerfile
+1
-0
Dockerfile.full
Dockerfile.full
+5
-2
docker-compose.yml
docker-compose.yml
+3
-2
hydra_node/config.py
hydra_node/config.py
+5
-1
No files found.
Dockerfile
View file @
ee7c2797
...
...
@@ -26,5 +26,6 @@ ENV ENABLE_EMA="1"
ENV
VAE_PATH="models/animevae.pt"
ENV
PENULTIMATE="1"
ENV
PYTHONDONTWRITEBYTECODE=1
ENV
VRAM_MODE="medvram"
CMD ["python3", "-m", "uvicorn", "--host", "0.0.0.0", "--port=6969", "main:app"]
Dockerfile.full
View file @
ee7c2797
ARG BASE=git-registry.mycard.moe/novelai-storage/naifu:latest
FROM node:lts-bullseye as frontend
RUN apt update && apt -y install git && npm install -g pnpm && \
RUN apt update && apt -y install
wget tar
git && npm install -g pnpm && \
git clone https://code.mycard.moe/novelai-storage/naifu-frontend.git /frontend && \
cd /frontend && pnpm install && pnpm run build
cd /frontend && pnpm install && pnpm run build && \
mkdir /models && cd /models && \
wget -O - https://cdn02.moecube.com:444/nanahira/naifu/models.tar.gz | tar -zxf -
FROM $BASE
COPY --from=frontend /frontend/build ./static
COPY --from=frontend /models ./models
ENV WITH_STATIC=1
docker-compose.yml
View file @
ee7c2797
...
...
@@ -10,6 +10,7 @@ services:
-
./hydra_node:/app/hydra_node:ro
#- ./static:/app/static:ro
environment
:
VRAM_MODE
:
lowvram
# TOKEN_SERVER: https://api.moecube.com/accounts/authUser
TOKEN
:
mycard
#WITH_STATIC: 1
#
TOKEN: mycard
#
WITH_STATIC: 1
hydra_node/config.py
View file @
ee7c2797
...
...
@@ -178,7 +178,11 @@ def init_config_model():
#attach it to the model
model
.
premodules
=
modules
lowvram
.
setup_for_low_vram
(
model
.
model
,
True
)
vramMode
=
os
.
getenv
(
"VRAM_MODE"
,
"medvram"
)
if
vramMode
!=
"highvram"
:
lowvram
.
setup_for_low_vram
(
model
.
model
,
vramMode
==
"medvram"
)
else
:
model
.
model
.
to
(
torch
.
device
(
"cuda"
))
config
.
model
=
model
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment