yeonghoon.kim

  • 게시판
  • 갤러리

Stable Diffusion 설치 - rockylinux9 [테스트 - 나 / 정리 -chatgpt]

김영훈 2024.01.02 15:27 조회 수 : 2053

0. 환경 설정

  • 시스템: Rocky Linux 9
  • Python 버전: 3.9
  • 기타 설정: SELinux 및 방화벽 비활성화

1. Pip 설치

  1. Python 패키지 관리자 Pip 설치:
    dnf install -y python-pip   
  2. Pip 업그레이드:
    python -m pip install --upgrade pip   

2. Git 설치

  • Git 설치:
    dnf install -y git   

3. Stable Diffusion 소스 다운로드

  • Stable Diffusion 리포지토리 클론:
    git clone https://github.com/Stability-AI/stablediffusion   

4. Python 모듈 설치

  1. 클론된 디렉토리로 이동:
    cd stablediffusion   
  2. 필요한 Python 모듈 설치:
    pip install -r requirements.txt   

5. Classic Img2Img 사용 방법

  • 명령어:
    python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8 --ckpt <path/to/model.ckpt>   

6. Text-to-Image 사용 방법

  • 가중치 파일(SD2.1-v, SD2.1-base) 다운로드 필요
  • 명령어:
    python scripts/txt2img.py --prompt "a professional photograph of an astronaut riding a horse" --ckpt <path/to/768model.ckpt/> --config configs/stable-diffusion/v2-inference-v.yaml --H 768 --W 768    

참고사항:

  • SELinux 및 방화벽 비활성화는 시스템 보안에 영향을 줄 수 있으므로, 필요에 따라 적절한 보안 조치를 취하는 것이 중요합니다.
  • Stable Diffusion의 사용과 관련하여 추가 설정이 필요한 경우 해당 프로젝트의 공식 문서를 참조하십시오.

  • 추천 0

  • 비추천 0
이 게시물을
목록

댓글 1

  • 김영훈

    2024.01.02 15:29

    ### 인프라 엔지니어를 위한 Stable Diffusion 설치 및 사용 매뉴얼

    #### 0. 환경 설정
    - **시스템**: Rocky Linux 9
    - **Python 버전**: 3.9
    - **기타 설정**: SELinux 및 방화벽 비활성화

    #### 1. Pip 설치
    1. Python 패키지 관리자 Pip 설치:
       ```bash
       dnf install -y python-pip
       ```
    2. Pip 업그레이드:
       ```bash
       python -m pip install --upgrade pip
       ```

    #### 2. Git 설치
    - Git 설치:
      ```bash
      dnf install -y git
      ```

    #### 3. Stable Diffusion 소스 다운로드
    - Stable Diffusion 리포지토리 클론:
      ```bash
      git clone https://github.com/Stability-AI/stablediffusion
      ```

    #### 4. Python 모듈 설치
    1. 클론된 디렉토리로 이동:
       ```bash
       cd stablediffusion
       ```
    2. 필요한 Python 모듈 설치:
       ```bash
       pip install -r requirements.txt
       ```

    #### 5. Classic Img2Img 사용 방법
    - 명령어:
      ```bash
      python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8 --ckpt <path/to/model.ckpt>
      ```

    #### 6. Text-to-Image 사용 방법
    - 가중치 파일(SD2.1-v, SD2.1-base) 다운로드 필요
    - 명령어:
      ```bash
      python scripts/txt2img.py --prompt "a professional photograph of an astronaut riding a horse" --ckpt <path/to/768model.ckpt/> --config configs/stable-diffusion/v2-inference-v.yaml --H 768 --W 768  
      ```

    ---

    **참고사항:**
    - SELinux 및 방화벽 비활성화는 시스템 보안에 영향을 줄 수 있으므로, 필요에 따라 적절한 보안 조치를 취하는 것이 중요합니다.
    - Stable Diffusion의 사용과 관련하여 추가 설정이 필요한 경우 해당 프로젝트의 공식 문서를 참조하십시오.

    추천0 비추천0 댓글

번호 제목 글쓴이 날짜 조회 수
339 yeonghoon.kim php 업그레이드 김영훈 2026.07.09 113
338 GitLab Registry PAT 만료로 이미지 Pull 실패 김영훈 2026.07.08 125
337 Stateful과 Stateless 구분해보기 김영훈 2026.07.02 120
336 Git revert는 기록을 지우는 게 아니라 되돌리는 기록을 남기는 것 김영훈 2026.06.29 129
335 OutOfSync와 Degraded 구분하기 김영훈 2026.06.28 149
334 control-plane 장애 시나리오 관찰 김영훈 2026.06.27 114
333 worker 재부팅 전 drain 절차 정리 김영훈 2026.06.26 117
332 ImagePullBackOff와 registry pull secret 누락 김영훈 2026.06.22 110
331 ArgoCD 복구 중 GitLab 접근 문제 정리 김영훈 2026.06.22 126
330 관측 스택과 앱 배포 저장소 구조 정리 김영훈 2026.06.19 142
329 SOPS Secret 복구와 ArgoCD root Application 적용 김영훈 2026.06.18 146
328 복구 런북 초반 누락 사항 정리 김영훈 2026.06.17 106
327 CoreDNS로 GitLab Registry 내부 주소 고정 김영훈 2026.06.17 116
326 ArgoCD와 GitOps 구조 준비 김영훈 2026.06.16 112
325 SOPS age로 Kubernetes Secret 암복호화 김영훈 2026.06.15 129
324 yeonghoon.kim 배포 파일을 Helm Chart로 전환 [1] 김영훈 2026.06.12 126
323 Docker Compose 서비스를 Kubernetes로 이전(깃랩 도커 저장소 필요) [2] 김영훈 2026.06.10 131
322 Kubernetes 기본 클러스터, ingress-nginx 설치 김영훈 2026.06.09 109
321 DGX Kubernetes 구성 계획 김영훈 2026.06.08 122
320 2026년 일본 여행(21일) 요약 김영훈 2026.06.02 150
쓰기 태그
 첫 페이지 1 2 3 4 5 6 7 8 9 10 끝 페이지