Skip to content

Commit

Permalink
added permanent path to the nsfw2 to be able to save the model
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan committed Jul 31, 2023
1 parent aacf784 commit 300816b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ RUN ls
RUN git clone https://github.com/danikhani/roop.git -b docker /roop
RUN pip install -r roop/requirements-docker.txt

RUN ls
RUN pwd
RUN rm -rf /roop

RUN git clone https://github.com/danikhani/roop.git -b docker /roop
CMD ["python", "/roop/api.py"]
3 changes: 0 additions & 3 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class RoopModel(BaseModel):
output_video_encoder: Optional[Literal['libx264', 'libx265', 'libvpx-vp9', 'h264_nvenc', 'hevc_nvenc']] = 'libx264'
max_memory: Optional[int] = 0
execution_threads: Optional[int] = suggest_execution_threads()
@app.get('/get_execution_providers')
async def get_execution_provider():
return suggest_execution_providers()


@app.post("/start_roop")
Expand Down
2 changes: 1 addition & 1 deletion roop/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_predictor() -> Model:

with THREAD_LOCK:
if PREDICTOR is None:
PREDICTOR = opennsfw2.make_open_nsfw_model()
PREDICTOR = opennsfw2.make_open_nsfw_model(weights_path='/roop/models/nsfw2')
return PREDICTOR


Expand Down

0 comments on commit 300816b

Please sign in to comment.